search for: nr_drives

Displaying 20 results from an estimated 24 matches for "nr_drives".

2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
.../options.c index c9948d7..1965e1f 100644 --- a/common/options/options.c +++ b/common/options/options.c @@ -67,7 +67,6 @@ option_a (const char *arg, const char *format, struct drv **drvsp) error (EXIT_FAILURE, errno, "access: %s", uri.path); drv->type = drv_a; - drv->nr_drives = -1; drv->a.filename = uri.path; drv->a.format = format; @@ -76,7 +75,6 @@ option_a (const char *arg, const char *format, struct drv **drvsp) else { /* Remote storage. */ drv->type = drv_uri; - drv->nr_drives = -1; drv->uri.path = uri.path; drv-...
2012 Aug 06
1
[PATCH V2] virt-diff: add new virt-diff tool
...printf(stderr, _("Only one seed device")); + exit (EXIT_FAILURE); + } + sdrv = calloc (1, sizeof (struct drv)); + if (!sdrv) { + perror ("malloc"); + exit (EXIT_FAILURE); + } + sdrv->type = drv_d; + sdrv->nr_drives = -1; + sdrv->d.guest = optarg; + sdrv->next = NULL; + } else if (STREQ (long_options[option_index].name, "domain")) { + if (ddrv) { + fprintf (stderr, _("Only one diff device")); + exit (EXIT_FAILURE); + } + ddrv =...
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.
2015 Nov 09
6
[PATCH 0/5] build: Enable some more warnings.
Add some warnings. Well, the first patch is a miscellaneous change, but patches 2-5 add some warnings. Rich.
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...e *d, size_t drv_index) @@ -162,7 +246,7 @@ guestfs___add_dummy_appliance_drive (guestfs_h *g) { struct drive *drv; - drv = create_dummy_drive_struct (g); + drv = create_drive_dummy (g); add_drive_to_handle (g, drv); } @@ -183,6 +267,48 @@ guestfs___free_drives (guestfs_h *g) g->nr_drives = 0; } +/* The low-level function that adds a drive. */ +static int +add_drive (guestfs_h *g, struct drive *drv) +{ + size_t i, drv_index; + + if (g->state == CONFIG) { + /* Not hotplugging, so just add it to the handle. */ + add_drive_to_handle (g, drv); + return 0; + } + + /* ....
2017 Apr 28
0
[PATCH] launch: Error if you try to launch with too many drives.
..._impl_launch (guestfs_h *g) { + int r; + /* Configured? */ if (g->state != CONFIG) { error (g, _("the libguestfs handle has already been launched")); return -1; } + /* Too many drives? */ + r = guestfs_max_disks (g); + if (r == -1) + return -1; + if (g->nr_drives > (size_t) r) { + error (g, _("too many drives have been added, the current backend only supports %d drives"), r); + return -1; + } + /* Start the clock ... */ gettimeofday (&g->launch_t, NULL); TRACE0 (launch_start); -- 2.9.3
2017 May 02
2
[PATCH v2] launch: Error if you try to launch with too many drives.
v1 was here: https://www.redhat.com/archives/libguestfs/2017-April/msg00268.html v1 broke some tests because the guestfs_max_disks API isn't supported by some backends, specifically ?unix:?. This makes failure of guestfs_max_disks non-fatal. Rich.
2017 May 02
0
[PATCH v2] launch: Error if you try to launch with too many drives.
...; } + /* Too many drives? + * + * Some backends such as ?unix:? don't allow us to query max_disks. + * Don't fail in this case. + */ + guestfs_push_error_handler (g, NULL, NULL); + r = guestfs_max_disks (g); + guestfs_pop_error_handler (g); + if (r >= 0 && g->nr_drives > (size_t) r) { + error (g, _("too many drives have been added, the current backend only supports %d drives"), r); + return -1; + } + /* Start the clock ... */ gettimeofday (&g->launch_t, NULL); TRACE0 (launch_start); -- 2.9.3
2019 May 24
0
[PATCH 2/2] launch: libvirt: fix custom hypervisor check
...ibvirt_data *data); static int is_blk (const char *path); static void ignore_errors (void *ignore, virErrorPtr ignore2); static void set_socket_create_context (guestfs_h *g); @@ -606,7 +606,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) params.appliance_index = g->nr_drives; strcpy (params.appliance_dev, "/dev/sd"); guestfs_int_drive_name (params.appliance_index, &params.appliance_dev[7]); - params.enable_svirt = ! is_custom_hv (g); + params.enable_svirt = ! is_custom_hv (g, data); xml = construct_libvirt_xml (g, &params); if (!xml) @...
2013 Mar 12
1
[PATCH] launch: appliance: Add custom parameters last.
...27 mitigation: Disable SCSI ioctls on virtio-blk * devices. The -global option must exist, but you can pass any * strings to it so we don't need to check for the specific virtio @@ -347,13 +340,6 @@ launch_appliance (guestfs_h *g, const char *arg) guestfs___drive_name (g->nr_drives, &appliance_dev[7]); } - if (STRNEQ (QEMU_OPTIONS, "")) { - /* Add the extra options for the qemu command line specified - * at configure time. - */ - add_cmdline_shell_unquoted (g, QEMU_OPTIONS); - } - /* The qemu -machine option (added 2010-12...
2017 Apr 19
1
[PATCH] appliance: Pass root=UUID=... to supermin.
By passing root=UUID=... to supermin, we make the appliance boot process less sensitive to the non-deterministic process of scanning SCSI disks (of which much more to come). This patch should be tested alongside the supermin patch posted here: https://www.redhat.com/archives/libguestfs/2017-April/msg00174.html which in turn requires this supermin patch series:
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here: https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html This now works, to some extent. The main problem now is that devices are named /dev/ubd[a-] which of course confuses everything. I'm thinking it may be easier to add a udev rule to rename them. Rich.
2013 Aug 09
5
[PATCH 0/4] Not quite working User-Mode Linux backend.
This is a User-Mode Linux backend for libguestfs. You can select it by doing: export LIBGUESTFS_BACKEND=uml export LIBGUESTFS_QEMU=/path/to/vmlinux Note we're reusing the 'qemu' variable in the handle for convenience. QEmu is not involved when using the UML backend. This almost works. UML itself crashes when the daemon tries to connect to the serial port. I suspect it's
2019 May 24
3
[PATCH 0/2] libvirt: fix check of custom QEMU
In case you configure libguestfs with a custom QEMU, e.g.: $ ./configure [...] QEMU=/path/to/qemu then the libvirt backend did not use to override it, launching the appliance with the default QEMU for libvirt. This does not change the manual emulator overriding using set-hv. Pino Toscano (2): launch: libvirt: get default QEMU from domcapabilities launch: libvirt: fix custom hypervisor
2015 Jul 01
2
Re: URI Handling Patch
Hi All, Here's the latest patch. I think this should address the problem. The query string is now only appended to the end of a URI in the HTTP and HTTPS cases. The add-uri test now passes, and 'make check' still passes. -- Gabriel
2016 Mar 22
0
[PATCH v3 09/11] launch: Remove guestfs_int_print_timestamped_message function.
...7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) } /* Construct the libvirt XML. */ - if (g->verbose) - guestfs_int_print_timestamped_message (g, "create libvirt XML"); + debug (g, "create libvirt XML"); params.appliance_index = g->nr_drives; strcpy (params.appliance_dev, "/dev/sd"); @@ -522,8 +517,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) } /* Launch the libvirt guest. */ - if (g->verbose) - guestfs_int_print_timestamped_message (g, "launch libvirt guest"); + debug...
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.
2020 Mar 05
5
[PATCH v2 0/4] daemon: Translate device names if Linux device is unstable (RHBZ#1804207).
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00220.html This patch series is a little bit better. It's still a bit of a hack. The _real_ fix for this is outlined in the TODO file (see patch 1) but that requires a lot more work than we could do before 1.42 is released, unless we delay 1.42 for a lot longer. I'm hoping with this to have something which works
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...exit (EXIT_SUCCESS); } drv = calloc (1, sizeof (struct drv)); - if (!drv) { - perror ("calloc"); - exit (EXIT_FAILURE); - } + if (!drv) + error (EXIT_FAILURE, errno, "calloc"); drv->type = drv_N; drv->nr_drives = -1; p = strchr (optarg, '='); @@ -371,16 +370,12 @@ main (int argc, char *argv[]) *p = '\0'; p = p+1; drv->N.filename = strdup (optarg); - if (drv->N.filename == NULL) { - perror ("strdup"); - exit (EXIT_FA...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.