[PATCH] qemuxml2xmloutdata: Make more symlinks
by Michal Privoznik
I've found two files under qemuxml2xmloutdata/ that are the same
as in qemuxml2argvdata/. Replace them with symlinks.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/qemuxml2xmloutdata/downscript.xml | 61 +------------------
.../video-qxl-resolution.xml | 43 +------------
2 files changed, 2 insertions(+), 102 deletions(-)
mode change 100644 => 120000 tests/qemuxml2xmloutdata/downscript.xml
mode change 100644 => 120000 tests/qemuxml2xmloutdata/video-qxl-resolution.xml
diff --git a/tests/qemuxml2xmloutdata/downscript.xml b/tests/qemuxml2xmloutdata/downscript.xml
deleted file mode 100644
index 4d0fb1beab..0000000000
--- a/tests/qemuxml2xmloutdata/downscript.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='x86_64' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <cpu mode='custom' match='exact' check='none'>
- <model fallback='forbid'>qemu64</model>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
- <source file='/var/lib/libvirt/images/img1'/>
- <target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
- </disk>
- <controller type='usb' index='0' model='piix3-uhci'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
- </controller>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
- </controller>
- <filesystem type='mount' accessmode='passthrough'>
- <source dir='/export/fs1'/>
- <target dir='fs1'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
- </filesystem>
- <filesystem type='mount' accessmode='mapped'>
- <driver type='path'/>
- <source dir='/export/fs2'/>
- <target dir='fs2'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
- </filesystem>
- <interface type='ethernet'>
- <mac address='52:54:00:f6:66:88'/>
- <script path='/home/ifup.sh'/>
- <downscript path='/home/ifdown.sh'/>
- <model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
- </interface>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/downscript.xml b/tests/qemuxml2xmloutdata/downscript.xml
new file mode 120000
index 0000000000..5edee5a7c4
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/downscript.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/downscript.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/video-qxl-resolution.xml b/tests/qemuxml2xmloutdata/video-qxl-resolution.xml
deleted file mode 100644
index e693cbce47..0000000000
--- a/tests/qemuxml2xmloutdata/video-qxl-resolution.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='disk'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
- </controller>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <video>
- <model type='qxl' ram='65536' vram='65536' vgamem='8192' heads='1' primary='yes'>
- <resolution x='1280' y='720'/>
- </model>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
- </video>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/video-qxl-resolution.xml b/tests/qemuxml2xmloutdata/video-qxl-resolution.xml
new file mode 120000
index 0000000000..f2d0595dda
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/video-qxl-resolution.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/video-qxl-resolution.xml
\ No newline at end of file
--
2.26.2
4 years, 1 month
[PATCH] NEWS: Mention <transient/> disk support for qemu
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 7663cf4208..56ccfefe4a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -13,6 +13,12 @@ v6.9.0 (unreleased)
* **New features**
+ * qemu: Implement support for ``<transient/>`` disks
+
+ VM's based on the QEMU hypervisor now can use ``<transient/>`` option for
+ local file-backed disks to configure a disk which discards changes to the
+ disk which happened while it was active.
+
* **Improvements**
* **Bug fixes**
--
2.26.2
4 years, 1 month
[rust PATCH] add list_volumes function
by rodolpheche
---
src/storage_pool.rs | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/storage_pool.rs b/src/storage_pool.rs
index 96258f0..ad0a51a 100644
--- a/src/storage_pool.rs
+++ b/src/storage_pool.rs
@@ -18,7 +18,7 @@
extern crate libc;
-use std::str;
+use std::{ptr, str};
use connect::sys::virConnectPtr;
use storage_vol::sys::virStorageVolPtr;
@@ -101,6 +101,11 @@ extern "C" {
info: sys::virStoragePoolInfoPtr,
) -> libc::c_int;
fn virStoragePoolNumOfVolumes(ptr: sys::virStoragePoolPtr) -> libc::c_int;
+ fn virStoragePoolListVolumes(
+ ptr: sys::virStoragePoolPtr,
+ names: *mut *mut libc::c_char,
+ maxnames: libc::c_int,
+ ) -> libc::c_int;
}
pub type StoragePoolXMLFlags = self::libc::c_uint;
@@ -276,6 +281,22 @@ impl StoragePool {
}
}
+ pub fn list_volumes(&self) -> Result<Vec<String>, Error> {
+ unsafe {
+ let mut names: [*mut libc::c_char; 1024] = [ptr::null_mut(); 1024];
+ let size = virStoragePoolListVolumes(self.as_ptr(), names.as_mut_ptr(), 1024);
+ if size == -1 {
+ return Err(Error::new());
+ }
+
+ let mut array: Vec<String> = Vec::new();
+ for x in 0..size as usize {
+ array.push(c_chars_to_string!(names[x]));
+ }
+ return Ok(array);
+ }
+ }
+
pub fn get_uuid_string(&self) -> Result<String, Error> {
unsafe {
let mut uuid: [libc::c_char; 37] = [0; 37];
--
2.28.0
4 years, 1 month
[libvirt PATCH 0/6] conf: split some funcs out of virDomainDefParseXML
by Ján Tomko
Ján Tomko (6):
conf: split out virDomainDefParseIDs
conf: split out virDomainDefParseMemory
conf: introduce virDomainDefTunablesParse
conf: introduce virDomainDefLifecycleParse
conf: introduce virDomainDefClockParse
conf: introduce virDomainDefControllersParse
src/conf/domain_conf.c | 728 ++++++++++++++++++++++++-----------------
1 file changed, 419 insertions(+), 309 deletions(-)
--
2.26.2
4 years, 1 month
[PATCH 0/2] qemu: Use .hostdevice attribute for usb-host
by Michal Privoznik
See 2/2 for explanation why we need this.
Also, .hostdevice uses qemu_open() under the hood which enables Libvirt
to pass FD instead of /dev/bus/usb/... path. However, qemu_open() does
not support getfd style of passing FD (which is what we use), but so
called FD sets which require some more work. I'm working on it as we
speak but I figured, let's fix this bug first and post FD passing after
that.
For curious ones, here is the raw, unclean version with FD sets:
https://gitlab.com/MichalPrivoznik/libvirt/-/commits/qemu_hostdev_alt/
Michal Prívozník (2):
qemu_capabilities: Add QEMU_CAPS_USB_HOST_HOSTDEVICE
qemu: Use .hostdevice attribute for usb-host
src/qemu/qemu_capabilities.c | 10 ++
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 21 ++-
.../caps_1.5.3.x86_64.replies | 126 ++++++++++++--
.../caps_1.6.0.x86_64.replies | 126 ++++++++++++--
.../caps_1.7.0.x86_64.replies | 126 ++++++++++++--
.../caps_2.1.1.x86_64.replies | 126 ++++++++++++--
.../caps_2.10.0.aarch64.replies | 134 +++++++++++++--
.../caps_2.10.0.ppc64.replies | 130 ++++++++++++--
.../caps_2.10.0.s390x.replies | 134 +++++++++++++--
.../caps_2.10.0.x86_64.replies | 146 +++++++++++++---
.../caps_2.11.0.s390x.replies | 134 +++++++++++++--
.../caps_2.11.0.x86_64.replies | 146 +++++++++++++---
.../caps_2.12.0.aarch64.replies | 150 +++++++++++++---
.../caps_2.12.0.ppc64.replies | 142 ++++++++++++---
.../caps_2.12.0.s390x.replies | 142 ++++++++++++---
.../caps_2.12.0.x86_64.replies | 162 ++++++++++++++----
.../caps_2.4.0.x86_64.replies | 126 ++++++++++++--
.../caps_2.5.0.x86_64.replies | 130 ++++++++++++--
.../caps_2.6.0.aarch64.replies | 134 +++++++++++++--
.../caps_2.6.0.ppc64.replies | 130 ++++++++++++--
.../caps_2.6.0.x86_64.replies | 130 ++++++++++++--
.../caps_2.7.0.s390x.replies | 130 ++++++++++++--
.../caps_2.7.0.x86_64.replies | 130 ++++++++++++--
.../caps_2.8.0.s390x.replies | 134 +++++++++++++--
.../caps_2.8.0.x86_64.replies | 130 ++++++++++++--
.../caps_2.9.0.ppc64.replies | 130 ++++++++++++--
.../caps_2.9.0.s390x.replies | 134 +++++++++++++--
.../caps_2.9.0.x86_64.replies | 146 +++++++++++++---
.../caps_3.0.0.ppc64.replies | 142 ++++++++++++---
.../caps_3.0.0.riscv32.replies | 138 +++++++++++++--
.../caps_3.0.0.riscv64.replies | 138 +++++++++++++--
.../caps_3.0.0.s390x.replies | 142 ++++++++++++---
.../caps_3.0.0.x86_64.replies | 162 ++++++++++++++----
.../caps_3.1.0.ppc64.replies | 142 ++++++++++++---
.../caps_3.1.0.x86_64.replies | 162 ++++++++++++++----
.../caps_4.0.0.aarch64.replies | 150 +++++++++++++---
.../caps_4.0.0.ppc64.replies | 142 ++++++++++++---
.../caps_4.0.0.riscv32.replies | 138 +++++++++++++--
.../caps_4.0.0.riscv64.replies | 138 +++++++++++++--
.../caps_4.0.0.s390x.replies | 142 ++++++++++++---
.../caps_4.0.0.x86_64.replies | 162 ++++++++++++++----
.../caps_4.1.0.x86_64.replies | 154 ++++++++++++++---
.../caps_4.2.0.aarch64.replies | 154 ++++++++++++++---
.../caps_4.2.0.ppc64.replies | 142 ++++++++++++---
.../caps_4.2.0.s390x.replies | 142 ++++++++++++---
.../caps_4.2.0.x86_64.replies | 154 ++++++++++++++---
.../caps_5.0.0.aarch64.replies | 154 ++++++++++++++---
.../caps_5.0.0.ppc64.replies | 142 ++++++++++++---
.../caps_5.0.0.riscv64.replies | 138 +++++++++++++--
.../caps_5.0.0.x86_64.replies | 154 ++++++++++++++---
.../caps_5.1.0.x86_64.replies | 158 ++++++++++++++---
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.x86_64.replies | 158 ++++++++++++++---
.../caps_5.2.0.x86_64.xml | 1 +
55 files changed, 6110 insertions(+), 982 deletions(-)
--
2.26.2
4 years, 1 month
Release of libvirt-6.8.0
by Jiri Denemark
The 6.8.0 release of both libvirt and libvirt-python is tagged and
signed tarballs and source RPMs are available at
https://libvirt.org/sources/
https://libvirt.org/sources/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing any other feedback. Your work is
greatly appreciated.
* New features
* xen: Add ``writeFiltering`` attribute for PCI devices
By default Xen filters guest writes to the PCI configuration space of a
PCI hostdev, which may cause problems for some devices. The ``writeFiltering``
attribute of the device's ``<source>`` element can be used to disable the
filtering and allow all guest writes to the configuration space.
* bhyve: Support setting the framebuffer resolution
Libvirt can now set the framebuffer's "w" and "h" parameters
using the ``resolution`` element.
* bhyve: Support VNC password authentication
Libvirt can now probe whether the bhyve binary supports
VNC password authentication. In case it does, a VNC password
can now be passed using the ``passwd`` attribute on
the ``<graphics>`` element.
* remote: ``virt-ssh-helper`` replaces ``nc`` for SSH tunnelling
Libvirt now provides a ``virt-ssh-helper`` binary on the server
side. The libvirt remote client will use this binary for setting
up an SSH tunnelled connection to hosts. If not present, it will
transparently fallback to the traditional ``nc`` tunnel. The new
binary makes it possible for libvirt to transparently connect
across hosts even if libvirt is built with a different installation
prefix on the client vs server. It also enables remote access to
the unprivileged per-user libvirt daemons (e.g. using a URI such as
``qemu+ssh://hostname/session``). The only requirement is that
``virt-ssh-helper`` is present in ``$PATH`` of the remote host.
* esx: implement few APIs
The ``virConnectListAllNetworks()``, ``virDomainGetHostname()``, and
``virDomainInterfaceAddresses()`` (only for
``VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT`` source) APIs were implemented
in the esx driver.
* Improvements
* qemu: Allow migration over UNIX sockets
QEMU migration can now be performed completely over UNIX sockets. This is
useful for containerised scenarios and can be used in both peer2peer and
direct migrations.
* dbus: Use GLib implementation instead of libdbus
Adopting GLib DBus implementation simplifies our code as libdbus provides
low-level APIs where we had to have a lot of helper functions. With this
change we also remove dependency on libdbus and possibly fix all the DBus
related libvirtd crashes seen over the time.
* Re-introduce NVDIMM auto-alignment for pSeries Guests
The auto-alignment logic was removed in v6.7.0 in favor of requiring the
size provided by the user to be already aligned; however, this had the
unintended consequence of breaking some existing guests. v6.8.0 restores
the previous behavior with an improvement: it also reflects the auto-aligned
value in the domain XML.
* qemu: Preserve qcow2 cluster size after external snapshots
The new overlay image which is installed on top of the current chain when
taking an external snapshot now preserves the cluser size of the original
top image to preserve any performance tuning done on the original image.
* Bug fixes
* qemu: Various (i)SCSI backed hostdev fixes
(i)SCSI backed hostdevs now work again with an arbitrarily long
user-specified device alias and also honor the 'readonly' property after a
recent rewrite.
* Removed features
* node_device: Remove HAL node device backend
HAL is deprecated on all supported OS so there is no need to keep it
in libvirt. udev backend is used on Linux OSes and devd can be eventually
implemented as replacement for FreeBSD.
Enjoy.
Jirka
4 years, 1 month
[PATCH 0/3] get rid of virDomainNetDefClear()
by Laine Stump
While looking for something else, I noticed that there were only 2
callers to virDomainNetDefClear(), and one of those was virDomain
NetDefFree(). virDomainNetDefClear() necessarily has a lot of
VIR_FREE() in it that couldn't be changed to g_free() (because it's
possible the object will be used after it is cleared). This series
eliminates the actual practical usage of virDomainNetDefClear() by
just creating a new object instead of clearing and re-using the old
object, then moves the contents of virDomainNetDefClear() into
virDomainNetDefFree(), and finally changes all the uses of VIR_FREE()
to g_free() (now that it's safe to do so).
Laine Stump (3):
qemu: eliminate use of virDomainNetDefClear() in
qemuConnectDomainXMLToNative()
conf: eliminate virDomainNetDefClear()
conf: use g_free() instead of VIR_FREE in virDomainNetDefFree()
src/conf/domain_conf.c | 51 +++++++++++++++++-----------------------
src/conf/domain_conf.h | 1 -
src/libvirt_private.syms | 1 -
src/qemu/qemu_driver.c | 26 +++++++++-----------
4 files changed, 33 insertions(+), 46 deletions(-)
--
2.26.2
4 years, 1 month