search for: construct_libvirt_xml_disk

Displaying 20 results from an estimated 32 matches for "construct_libvirt_xml_disk".

2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...\ + perrorf (g, _("%s:%d: error constructing libvirt XML near call to \"%s\""), \ + __FILE__, __LINE__, (fn)); \ + return -1; + /* Fixes for Mac OS X */ #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC O_CLOEXEC @@ -909,79 +919,6 @@ static int construct_libvirt_xml_disk_source_hosts (guestfs_h *g, xmlTextWriterP static int construct_libvirt_xml_disk_source_seclabel (guestfs_h *g, const struct backend_libvirt_data *data, xmlTextWriterPtr xo); static int construct_libvirt_xml_appliance (guestfs_h *g, const struct libvirt_xml_params *params, xmlTextWriterPtr xo);...
2017 Jun 29
1
[PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML.
...ng virt-v2v against VMware servers. Thanks: Kun Wei. --- lib/launch-libvirt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index 948350b..72f86ba 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1593,7 +1593,8 @@ construct_libvirt_xml_disk (guestfs_h *g, if (construct_libvirt_xml_disk_driver_qemu (g, data, drv, xo, format, drv->cachemode ? : "writeback", - drv->discard, false) +...
2012 Oct 08
3
[PATCH v3 0/3] Add support for disk labels and hotplugging.
This is, I guess, version 3 of this patch series which adds disk labels and hotplugging (only hot-add implemented so far). The good news is .. it works! Rich.
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.
2013 Feb 28
5
[PATCH v2 0/5] Fix SELinux security contexts so we can access shared disks (RHBZ#912499).
Link to version 1: https://www.redhat.com/archives/libguestfs/2013-February/thread.html#00122 Changes since version 1: - I've pushed two (of the three) code refactoring patches. The third one proved rather hard to move. - selinuxnorelabel option is no more. Instead there is a second internal API (internal_set_libvirt_selinux_norelabel_disks). - fixed bogus commit message -
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...PIs. > > If you're using domain <disk>s which use type=volume, > then you'll need the storage pool APIs & any impls > that are relevant The way we tell libvirt to access disks in remote protocols is using <disk> with type=file, type=block, and type=network. See construct_libvirt_xml_disk() in lib/launch-libvirt.c: https://github.com/libguestfs/libguestfs/blob/c9543de73d264943fef88f5e53403bbe32917b01/lib/launch-libvirt.c#L1372 AFAICT that way does not use the storage pool drivers. > > virStoragePoolFree ( > > virStoragePoolGetInfo ( > > virStoragePoolLookupByName...
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...params (g, qopts, drv) == -1) > + return -1; > } end_list (); > } > > diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c > index f2cad9300..4ce2fa683 100644 > --- a/lib/launch-libvirt.c > +++ b/lib/launch-libvirt.c > @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir > static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); > static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo...
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
...from the secret + * to its UUID. + */ + ITER_DRIVES (g, i, drv) { + if (add_secret (g, data, drv) == -1) + goto cleanup; + } + /* Construct the libvirt XML. */ if (g->verbose) guestfs___print_timestamped_message (g, "create libvirt XML"); @@ -1272,6 +1306,8 @@ construct_libvirt_xml_disk (guestfs_h *g, CLEANUP_FREE char *path = NULL; int is_host_device; CLEANUP_FREE char *format = NULL; + const char *type, *uuid; + int r; /* XXX We probably could support this if we thought about it some more. */ if (drv->iface) { @@ -1383,9 +1419,15 @@ construct_libvirt_xml_di...
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...s + * may be that we create qcow2 overlays for drives. + */ ITER_DRIVES (g, i, drv) { - if (make_qcow2_overlay_for_drive (g, drv, g->virt_selinux_imagelabel) == -1) + if (make_drive_priv (g, drv, g->virt_selinux_imagelabel) == -1) goto cleanup; } @@ -1044,7 +1045,8 @@ construct_libvirt_xml_disk (guestfs_h *g, { char drive_name[64] = "sd"; char scsi_target[64]; - struct drive_libvirt *drv_priv; + char port_str[64]; + struct drive_libvirt *drv_priv = (struct drive_libvirt *) drv->priv; CLEANUP_FREE char *format = NULL; int is_host_device; @@ -1057,47 +1059,86...
2014 Oct 31
1
[PATCH v2] launch: libvirt: Implement drive secrets (RHBZ#1159016).
Since v1: - Base64 decode the Ceph secret before passing it to libvirt. - Don't call virSecretFree (NULL) [libvirt bug?] - Small cleanups.
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...t;disk_label); + if (add_device_blockio_params (g, qopts, drv) == -1) + return -1; } end_list (); } diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index f2cad9300..4ce2fa683 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo, const ch...
2020 Jan 10
0
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...using domain <disk>s which use type=volume, > > then you'll need the storage pool APIs & any impls > > that are relevant > > The way we tell libvirt to access disks in remote protocols is using > <disk> with type=file, type=block, and type=network. > See construct_libvirt_xml_disk() in lib/launch-libvirt.c: > https://github.com/libguestfs/libguestfs/blob/c9543de73d264943fef88f5e53403bbe32917b01/lib/launch-libvirt.c#L1372 > > AFAICT that way does not use the storage pool drivers. YEs, that is correct. > > > virStoragePoolFree ( > > > virStoragePo...
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2018 Nov 02
0
[PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
.../qemu-kvm). */ - else { - start_element ("emulator") { - string (QEMU); - } end_element (); - } + else + single_element ("emulator", QEMU); #endif /* Add a random number generator (backend for virtio-rng). This @@ -1533,11 +1501,8 @@ construct_libvirt_xml_disk (guestfs_h *g, return -1; } - if (drv->disk_label) { - start_element ("serial") { - string (drv->disk_label); - } end_element (); - } + if (drv->disk_label) + single_element ("serial", drv->disk_label); if (constr...
2016 Aug 02
0
[PATCH] launch: libvirt: Autodetect backing format for drive overlays (RHBZ#1354335).
...return NULL; - overlay = make_qcow2_overlay (g, backing_drive, drv->src.format); + format = get_source_format_or_autodetect (g, drv); + if (!format) + return NULL; + + overlay = make_qcow2_overlay (g, backing_drive, format); if (!overlay) return NULL; @@ -1480,36 +1529,9 @@ construct_libvirt_xml_disk (guestfs_h *g, if (construct_libvirt_xml_disk_target (g, xo, drv_index) == -1) return -1; - if (drv->src.format) - format = safe_strdup (g, drv->src.format); - else if (drv->src.protocol == drive_protocol_file) { - /* libvirt has disabled the featu...
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2018 Aug 09
0
Using SPDK as QEMU's rootfs disk && A patch for libguestfs to support SPDK
...se if (drv->iface) { ADD_CMDLINE ("-drive"); ADD_CMDLINE_PRINTF ("%s,if=%s", param, drv->iface); diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index 05c398b..468ece9 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1548,6 +1548,9 @@ construct_libvirt_xml_disk (guestfs_h *g, case drive_protocol_tftp: error (g, _("libvirt does not support the qemu curl driver protocols (ftp, http, etc.); try setting LIBGUESTFS_BACKEND=direct")); return -1; + case drive_protocol_spdk: + error (g, _("libvirt does not suppo...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
On Fri, Jan 10, 2020 at 02:15:10PM +0000, Daniel P. Berrangé wrote: > Do you use the libvirt "secret" APIs at all (disk encryption, network > disk auth passwords) ? If so you will need "libvirt-daemon-driver-secret" > too. How about any other libvirt sub-driver APIs ? Networking ? Host > dev, etc ? The full list of APIs we use is attached, assuming I got my