search for: construct_libvirt_xml_devices

Displaying 20 results from an estimated 36 matches for "construct_libvirt_xml_devices".

2016 Oct 10
2
[PATCH] aarch64: Enable virtio-pci, replacing virtio-mmio.
This patch causes aarch64 to use virtio-pci instead of virtio-mmio. Virtio-pci is considerably faster than virtio-mmio, it's more like how other architectures work, and it supports hotplugging (although it's not likely we'd use the latter feature). I'm not necessarily suggesting that we apply this. Laine (CC'd) has some further patches to libvirt lined up which AIUI would
2016 Oct 10
0
[PATCH] aarch64: Enable virtio-pci, replacing virtio-mmio.
...e slot 1, since can be used by video. */ +#define VIRTIO_PCI_SLOT_RNG 2 +#define VIRTIO_PCI_SLOT_SCSI 3 +#define VIRTIO_PCI_SLOT_SERIAL 4 +#define VIRTIO_PCI_SLOT_NETWORK 5 + /* These macros make it easier to write XML, but they also make a lot * of assumptions: * @@ -1337,6 +1344,9 @@ construct_libvirt_xml_devices (guestfs_h *g, attribute ("model", "random"); string ("/dev/urandom"); } end_element (); + if (construct_libvirt_xml_virtio_pci_address (g, xo, + VIRTIO_PCI_SLOT_RNG) == -1) +...
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...>selinux_label); } end_element (); start_element ("imagelabel") { - string (params->data->selinux_imagelabel); + string ("%s", params->data->selinux_imagelabel); } end_element (); } end_element (); } @@ -1292,7 +1229,7 @@ construct_libvirt_xml_devices (guestfs_h *g, */ if (is_custom_hv (g)) { start_element ("emulator") { - string (g->hv); + string ("%s", g->hv); } end_element (); } #if defined(__arm__) @@ -1301,7 +1238,7 @@ construct_libvirt_xml_devices (guestfs_h *g, *...
2014 Oct 01
1
Re: [PATCH 2/2] launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012).
...ibvirt.c | 34 +++++++++++++--------------------- > 1 file changed, 13 insertions(+), 21 deletions(-) > > diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c > index 706ae38..50c3f9d 100644 > --- a/src/launch-libvirt.c > +++ b/src/launch-libvirt.c > @@ -1236,6 +1236,19 @@ construct_libvirt_xml_devices (guestfs_h *g, > } end_element (); > } end_element (); > > + /* Connect to libvirt bridge virbr0 (see: RHBZ#1148012). */ > + if (g->enable_network) { > + start_element ("interface") { > + attribute ("type", "bridge&quo...
2014 Jan 17
0
[PATCH INCOMPLETE] launch: libvirt: Use C macros to simplify XML generation.
...construct_libvirt_xml_cpu (g, params, xo) == -1) - return -1; - if (construct_libvirt_xml_boot (g, params, xo) == -1) - return -1; - if (construct_libvirt_xml_seclabel (g, params, xo) == -1) - return -1; - if (construct_libvirt_xml_lifecycle (g, params, xo) == -1) - return -1; - if (construct_libvirt_xml_devices (g, params, xo) == -1) - return -1; - if (construct_libvirt_xml_qemu_cmdline (g, params, xo) == -1) - return -1; + if (construct_libvirt_xml_name (g, params, xo) == -1) + return -1; + if (construct_libvirt_xml_cpu (g, params, xo) == -1) + return -1; + if (construct_libvirt...
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.
2014 Sep 30
4
[PATCH 1/2] appliance: Use dhclient instead of hard-coding IP address of appliance.
qemu in SLIRP mode offers DHCP services to the appliance. We don't use them, but use a fixed IP address intead. This changes the appliance to get its IP address using DHCP. Note: This is only used when the network is enabled. dhclient is somewhat slower, but the penalty (a few seconds) is only paid for network users. We could consider using the faster systemd dhcp client instead. ---
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
2017 May 17
7
[PATCH 1/5] s390x: launch: libvirt: Use <console> device sclp for appliance debug messages (RHBZ#1376547).
Thanks: Cole Robinson, Dan Horak, Thomas Huth. --- lib/launch-libvirt.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index f66c8e0ef..4adb2cfb3 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1359,6 +1359,7 @@ construct_libvirt_xml_devices (guestfs_h *g, return -1; } +#ifndef __s390x__ /* Console. */ start_element ("serial") { attribute ("type", "unix"); @@ -1370,6 +1371,22 @@ construct_libvirt_xml_devices (guestfs_h *g, attribute ("port", "0"...
2016 Mar 22
0
[PATCH v3 10/11] launch: Add a virtio-rng device to the guest.
...ADD_CMDLINE ("virtio-rng-pci,rng=rng0"); + } + /* Add drives */ virtio_scsi = qemu_supports_virtio_scsi (g, data); diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 9f2672d..c6cc740 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -1251,6 +1251,20 @@ construct_libvirt_xml_devices (guestfs_h *g, } #endif + /* Add a random number generator (backend for virtio-rng). */ + start_element ("rng") { + attribute ("model", "virtio"); + start_element ("backend") { + attribute ("model", "random")...
2016 Oct 06
1
[PATCH] launch: libvirt: Remove unused USB and memballoon devices.
...dhat.com/archives/libvir-list/2016-October/msg00246.html --- src/launch-libvirt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index d8479dc..8779dcb 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -1397,6 +1397,18 @@ construct_libvirt_xml_devices (guestfs_h *g, } end_element (); } + /* Libvirt adds some devices by default. Indicate to libvirt + * that we don't want them. + */ + start_element ("controller") { + attribute ("type", "usb"); + attribute ("model",...
2019 May 24
0
[PATCH 2/2] launch: libvirt: fix custom hypervisor check
...if (g->hv && STRNEQ (g->hv, data->default_qemu)) + return 1; #ifdef QEMU - return g->hv && STRNEQ (g->hv, QEMU); -#else - return 1; + if (STRNEQ (data->default_qemu, QEMU)) + return 1; #endif + return 0; } #if HAVE_LIBSELINUX @@ -1265,7 +1267,7 @@ construct_libvirt_xml_devices (guestfs_h *g, /* Path to hypervisor. Only write this if the user has changed the * default, otherwise allow libvirt to choose the best one. */ - if (is_custom_hv (g)) + if (is_custom_hv (g, params->data)) single_element ("emulator", g->hv); #if defin...
2014 Sep 30
0
[PATCH 2/2] launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012).
...various reasons). --- src/launch-libvirt.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 706ae38..50c3f9d 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -1236,6 +1236,19 @@ construct_libvirt_xml_devices (guestfs_h *g, } end_element (); } end_element (); + /* Connect to libvirt bridge virbr0 (see: RHBZ#1148012). */ + if (g->enable_network) { + start_element ("interface") { + attribute ("type", "bridge"); + start_element ("...
2018 Dec 06
1
[PATCH] Revert "launch: libvirt: Use qemu-bridge-helper to implement
Possibly for post 1.40. Rich.
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.
2014 Mar 27
3
[PATCH 0/2] launch: libvirt: Use libvirt to set up the user network.
Use libvirt to set up the user network instead of a custom qemu argument. Note this requires a non-upstream patch being discussed on the libvirt mailing list at the moment. https://bugzilla.redhat.com/show_bug.cgi?id=1075520#c6 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.
2018 Nov 02
0
[PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
...struct libvirt_xml_params *params, xmlTextWriterPtr xo) { - start_element ("on_reboot") { - string ("destroy"); - } end_element (); - + single_element ("on_reboot", "destroy"); return 0; } @@ -1249,20 +1223,14 @@ construct_libvirt_xml_devices (guestfs_h *g, /* Path to hypervisor. Only write this if the user has changed the * default, otherwise allow libvirt to choose the best one. */ - if (is_custom_hv (g)) { - start_element ("emulator") { - string (g->hv); - } end_element (); - } +...
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
2018 Dec 06
0
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
...g, "virbr0"); - } guestfs_pop_error_handler (g); - if (g->enable_network && check_bridge_exists (g, data->network_bridge) == -1) - goto cleanup; - /* Locate and/or build the appliance. */ TRACE0 (launch_build_libvirt_appliance_start); @@ -1276,19 +1265,6 @@ construct_libvirt_xml_devices (guestfs_h *g, } end_element (); } end_element (); - /* Connect to libvirt bridge (see: RHBZ#1148012). */ - if (g->enable_network) { - start_element ("interface") { - attribute ("type", "bridge"); - start_element ("source&...