[PATCH RFC 0/3] Add checkpoint/restore support to LXC using CRIU
by Julio Faracco
This patch series implements a way to do checkpoint/restore to LXC driver using
CRIU operations. This respects the other methods to save and restore processes
states: using a file with a header with some metadata. The only difference here
is basically the way LXC drivers join the files produced by CRIU. CRIU generates
a lots of 'img' files and it is compresses using TAR to fit into the libvirt
state file.
Julio Faracco (3):
meson: Add support to CRIU binary into meson
lxc: Including CRIU functions and functions to support C/R.
lxc: Adding support to LXC driver to restore a container
meson.build | 10 +
meson_options.txt | 1 +
src/lxc/lxc_conf.c | 3 +
src/lxc/lxc_conf.h | 2 +
src/lxc/lxc_container.c | 188 +++++++++++++++++-
src/lxc/lxc_container.h | 3 +-
src/lxc/lxc_controller.c | 93 ++++++++-
src/lxc/lxc_criu.c | 405 +++++++++++++++++++++++++++++++++++++++
src/lxc/lxc_criu.h | 50 +++++
src/lxc/lxc_driver.c | 341 +++++++++++++++++++++++++++++++-
src/lxc/lxc_process.c | 26 ++-
src/lxc/lxc_process.h | 1 +
src/lxc/meson.build | 2 +
13 files changed, 1106 insertions(+), 19 deletions(-)
create mode 100644 src/lxc/lxc_criu.c
create mode 100644 src/lxc/lxc_criu.h
--
2.27.0
3 years, 7 months
[PATCH] XML <source bridge='VMnet0'/> update in <interface type='bridge'/>
by Kristina Hanicova
Previously, we accepted empty bridge name, because some old versions of
VMWare Workstation did not put it into the config. But this doesn't make
much sense - to have an interface type bridge with no name. We
circumvented this problem by generating an empty name but that is
equally wrong.
Therefore, fill in missing bridge names (according to the documentation
[1] the default bridge name is VMnet0) and error out if bridge name is
missing.
This partially reverts f246cdb5aca13ac9409b2ad43087e3078615ffcb
1: https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/16.0/com.v...
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/vmx/vmx.c | 10 +++-------
tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx | 2 ++
tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 4 ++--
tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx | 1 +
tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml | 2 +-
tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx | 2 ++
tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml | 4 ++--
tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx | 1 +
tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.xml | 2 +-
9 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 76d01a36de..82d3409c79 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2803,11 +2803,8 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
STRCASEEQ(connectionType, "bridged") ||
STRCASEEQ(connectionType, "custom")) {
if (virVMXGetConfigString(conf, networkName_name, &networkName,
- true) < 0)
+ false) < 0)
goto cleanup;
-
- if (!networkName)
- networkName = g_strdup("");
}
/* vmx:vnet -> def:data.ifname */
@@ -3924,9 +3921,8 @@ virVMXFormatEthernet(virDomainNetDefPtr def, int controller,
/* def:type, def:ifname -> vmx:connectionType */
switch (def->type) {
case VIR_DOMAIN_NET_TYPE_BRIDGE:
- if (STRNEQ(def->data.bridge.brname, ""))
- virBufferAsprintf(buffer, "ethernet%d.networkName = \"%s\"\n",
- controller, def->data.bridge.brname);
+ virBufferAsprintf(buffer, "ethernet%d.networkName = \"%s\"\n",
+ controller, def->data.bridge.brname);
if (def->ifname != NULL) {
virBufferAsprintf(buffer, "ethernet%d.connectionType = \"custom\"\n",
diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx
index ef6af19b49..75583bdc53 100644
--- a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx
+++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx
@@ -12,9 +12,11 @@ sound.filename = "-1"
sound.autodetect = "TRUE"
usb.present = "TRUE"
ethernet0.present = "TRUE"
+ethernet0.networkName = "VMnet0"
ethernet0.addressType = "generated"
ethernet0.connectionType = "bridged"
ethernet1.present = "TRUE"
+ethernet1.networkName = "VMnet0"
ethernet1.addressType = "generated"
ethernet1.connectionType = "bridged"
scsi0:0.present = "TRUE"
diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
index 2dd46eb2b1..f6e9f4acdf 100644
--- a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
+++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
@@ -26,11 +26,11 @@
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:0c:29:3b:64:ea' type='generated'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
</interface>
<interface type='bridge'>
<mac address='00:0c:29:3b:64:f4' type='generated'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
</interface>
<video>
<model type='vmvga' vram='4096' primary='yes'/>
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx
index 6e078d4d92..172aa686ed 100644
--- a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.vmx
@@ -18,6 +18,7 @@ floppy0.startConnected = "FALSE"
floppy0.fileName = ""
floppy0.autodetect = "TRUE"
ethernet0.present = "TRUE"
+ethernet0.networkName = "VMnet0"
ethernet0.connectionType = "bridged"
ethernet0.virtualDev = "e1000"
ethernet0.wakeOnPcktRcv = "FALSE"
diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml
index 628dfbaff0..6f8f30393c 100644
--- a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml
+++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml
@@ -26,7 +26,7 @@
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:50:56:2f:d3:46' type='static'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
<model type='e1000'/>
</interface>
<video>
diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx
index 9605e2d6ac..2a81cc0137 100644
--- a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx
+++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx
@@ -18,11 +18,13 @@ ide0:0.fileName = "auto detect"
floppy0.present = "false"
floppy1.present = "false"
ethernet0.present = "true"
+ethernet0.networkName = "VMnet0"
ethernet0.connectionType = "bridged"
ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:3b:64:ea"
ethernet0.generatedAddressOffset = "0"
ethernet1.present = "true"
+ethernet1.networkName = "VMnet0"
ethernet1.connectionType = "bridged"
ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:3b:64:f4"
diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
index 0bfc7e88af..3052abd740 100644
--- a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
+++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml
@@ -27,11 +27,11 @@
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:0c:29:3b:64:ea'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
</interface>
<interface type='bridge'>
<mac address='00:0c:29:3b:64:f4'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
</interface>
<video>
<model type='vmvga' vram='4096'/>
diff --git a/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx b/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx
index f7f40ec300..eba18eb320 100644
--- a/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx
+++ b/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.vmx
@@ -15,6 +15,7 @@ floppy0.present = "false"
floppy1.present = "false"
ethernet0.present = "true"
ethernet0.virtualDev = "e1000"
+ethernet0.networkName = "VMnet0"
ethernet0.connectionType = "bridged"
ethernet0.addressType = "static"
ethernet0.address = "00:90:b9:dc:ea:81"
diff --git a/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.xml b/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.xml
index 30fb76c818..2bf8699149 100644
--- a/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.xml
+++ b/tests/xml2vmxdata/xml2vmx-ws-in-the-wild-2.xml
@@ -20,7 +20,7 @@
<controller type='scsi' index='0' model='lsilogic'/>
<interface type='bridge'>
<mac address='00:90:b9:dc:ea:81'/>
- <source bridge=''/>
+ <source bridge='VMnet0'/>
<model type='e1000'/>
</interface>
<video>
--
2.30.2
3 years, 7 months
Gsoc2021
by Aaryan Singh
Hello,
This is Aaryan, a 2nd-year undergraduate student at Kalinga institute of
industrial technology.
I have a keen interest in the " test driver API coverage " project. since I
have worked in cloud computing and DevOps that's why I am this interested
in this project and would love to share my idea and develop it.
Thank you
3 years, 7 months
[PATCH 0/6] qemu: Allow control of deprecation behaviour
by Peter Krempa
For debugging purposes it's very useful to disable all deprecated
commands and fields in qemu. This series implements a qemu.conf knob and
a qemu namespace element to control this.
The implementation tries to be very conservative to allow downgrades of
qemu and such without breaking the startup of the VM.
The intention is that developers and CI deployments use the 'crash'
option to catch any unexpected qemu disappearance.
Note that this applies on top of my series for -object QAPIfication.
Based on Markus' -compat series which was now merged to upstream qemu.
Peter Krempa (6):
docs/drvqemu: Convert to RST
qemu: capabilities: Introduce QEMU_CAPS_COMPAT_DEPRECATED
qemu: conf: Add 'deprecation_behavior' setting to qemu.conf
qemuxml2xmltest: Enable 'qemu-ns' case
qemu: Add per-VM control of deprecation behavior
qemu: command: Handle formatting of '-compat' options
docs/drvqemu.html.in | 743 ------------------
docs/drvqemu.rst | 636 +++++++++++++++
docs/formatdomain.rst | 2 +-
docs/manpages/virt-qemu-run.rst | 2 +-
docs/meson.build | 2 +-
docs/schemas/domaincommon.rng | 16 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 31 +
src/qemu/qemu_capabilities.c | 8 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 80 ++
src/qemu/qemu_conf.c | 4 +
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.c | 10 +-
src/qemu/qemu_domain.h | 5 +
src/qemu/test_libvirtd_qemu.aug.in | 1 +
.../caps_6.0.0.x86_64.xml | 1 +
.../qemu-ns.x86_64-latest.args | 1 +
tests/qemuxml2argvdata/qemu-ns.xml | 1 +
.../qemu-ns.x86_64-latest.xml | 52 ++
tests/qemuxml2xmltest.c | 1 +
21 files changed, 853 insertions(+), 747 deletions(-)
delete mode 100644 docs/drvqemu.html.in
create mode 100644 docs/drvqemu.rst
create mode 100644 tests/qemuxml2xmloutdata/qemu-ns.x86_64-latest.xml
--
2.29.2
3 years, 7 months
[libvirt PATCH 0/2] qemu: wire up support for rotation rate for disks
by Daniel P. Berrangé
By default QEMU doesn't report any rotation information to guests, so
guests assume rotational media. This lets the user specify an explicit
speed in RPM, or 1 for SSD. This may allow the user to achieve better
performance for their virtual disks. Note, however, this doesn't mean
that the guest should be given the same setting as the host storage.
It is possible that better performance may be achieved with contrary
settings from the host. Testing is required to determine this on a
case by case basis.
Daniel P. Berrangé (2):
conf: add support for disk "rotation_rate" property
qemu: implement setting of rotation rate for SCSI/IDE disks
docs/formatdomain.rst | 13 ++++-
docs/schemas/domaincommon.rng | 5 ++
src/conf/domain_conf.c | 11 ++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 3 +
src/qemu/qemu_validate.c | 22 ++++++++
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
.../caps_5.2.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../caps_6.0.0.x86_64.xml | 1 +
.../disk-rotation.x86_64-latest.args | 56 +++++++++++++++++++
tests/qemuxml2argvdata/disk-rotation.xml | 38 +++++++++++++
tests/qemuxml2argvtest.c | 1 +
.../disk-rotation.x86_64-latest.xml | 55 ++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
37 files changed, 230 insertions(+), 3 deletions(-)
create mode 100644 tests/qemuxml2argvdata/disk-rotation.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-rotation.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-rotation.x86_64-latest.xml
--
2.30.2
3 years, 7 months
[PATCH] docs: Fix broken link in migrationinternals
by Han Han
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/kbase/migrationinternals.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/kbase/migrationinternals.rst b/docs/kbase/migrationinternals.rst
index 2e187936a7..f7b4b5a10e 100644
--- a/docs/kbase/migrationinternals.rst
+++ b/docs/kbase/migrationinternals.rst
@@ -7,7 +7,7 @@ Libvirt migration internals
Migration is a multi-step operation with at least two distinct actors,
the source and the destination libvirtd daemons, and a lot of failure
points. This document describes the basic migration workflow in the
-code level, as a way to complement `the base migration docs <migration.html>`_
+code level, as a way to complement `the base migration docs <../migration.html>`_
and help developers to get up to speed quicker with the code.
In this document, unless stated otherwise, these conventions are followed:
--
2.30.2
3 years, 7 months
[PATCH] NEWS: Fix typo swtmp -> swtpm
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
NEWS.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NEWS.rst b/NEWS.rst
index 9eb771cd0b..3f4380ff23 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -91,7 +91,7 @@ v7.2.0 (unreleased)
* Restore security context of swtpm.log
If a guest with emulated TPM was started and the daemon was restarted
- afterwards, the security context of the per-domain ``swtmp.log`` file was
+ afterwards, the security context of the per-domain ``swtpm.log`` file was
not restored on domain shutdown leaving it unable to be started again.
* virtlogd|virtlockd: Fixed crash when upgrading the daemons in-place
--
2.26.3
3 years, 7 months
[Libvirt] Attach qemu commands to an running xml domain
by Waleed Musa
Hi all,
I see in libvirt you are supporting attach/detach devices to existing xml domain using attachDeviceFlags and detachDeviceFlags APIs.
Now we are adding some qemu command to the xml domain related to some interfaces using alias names before starting the VM, but we will face an issue with hot plug such devices, so I have two question here:
1. Is it applicable to set the alias names for interfaces because I saw it's ignored when I add it to xml domain before starting the VM?
2. Is there a way or API to attach qemu commands to running domain as you are doing in attaching the device using attachDeviceFlags?
Example of my xml
<domain type='kvm' id='5' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<devices>
<interface type='vhostuser'>
<mac address='fa:16:3e:ac:12:4c'/>
<source type='unix' path='/var/lib/vhost_sockets/sockbbb6bbe9-eb5' mode='server'/>
<target dev='tapbbb6bbe9-eb'/>
<model type='virtio'/>
<driver queues='4' rx_queue_size='512' tx_queue_size='512'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
<qemu:commandline>
<qemu:arg value='-set'/>
<qemu:arg value='device.net0.page-per-vq=on'/>
<qemu:arg value='-set'/>
<qemu:arg value='device.net0.host_mtu=8942'/>
</qemu:commandline>
</domain>
Regards,
Waleed Mousa
Software Engineer,
Nvidia <https://www.nvidia.com/en-me/geforce/>
3 years, 7 months