[libvirt] [PATCH] qemu.conf: Make nvram list obsolete
by Michal Privoznik
Now that libvirt has firmware auto selection feature the nvram
config knob is more or less obsolete. It still makes sense in
cases where distro users are using does not provide FW descriptor
files, therefore I'm not removing it.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu.conf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 334b4cd4ee..ecde8f0181 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -740,6 +740,8 @@
# Location of master nvram file
#
+# This is now obsoleted by firmware auto selection feature.
+# Prefer that before this.
# When a domain is configured to use UEFI instead of standard
# BIOS it may use a separate storage for UEFI variables. If
# that's the case libvirt creates the variable store per domain
--
2.21.0
5 years, 8 months
[libvirt] [PATCH v2 00/11] conf: partial net model enum conversion
by Cole Robinson
v1 here:
https://www.redhat.com/archives/libvir-list/2019-January/msg00763.html
Changes since v1:
- patch #7, case insensitive model input comparison
- Add xml2xml testing
- compile tested on freebsd12.0
This series partially converts the net->model value from a string
to an enum. We wrap the existing ->model string in accessor functions,
rename it to ->modelstr, add a ->model enum, and convert internal
driver usage bit by bit. At the end, all driver code that is acting
on specific network model values is comparing against an enum, not
a string.
This is only partial because of xen/libxl/xm and qemu drivers, which
if they don't know anything particular about the model string will
just place it on the qemu command line/xen config and see what happens.
So basically if I were to pass in
<model type='idontexist'/>
qemu would turn that into
-device idontexist,...
That behavior is untouched by this series, as fully unwinding that
will take some more work:
* Figuring out all reasonable qemu + xen values that could actually
result in a working VM config, and adding them to the enum
* Figuring out a long term plan for disabling passthrough entirely.
There's some discussion in the v1 thread about this.
Some caveats:
* vz driver is not compile tested. What's the sdk magic to actually
get this building?
* net model enum lookup is done case insensitive. this is to maintain
the behavior of the vmx and virtualbox drivers, but it's different
than all our other enum usage.
Cole Robinson (11):
tests: Add several net model passthrough tests
conf: net: Add wrapper functions for <model> value
conf: net: Rename 'model' to 'modelstr'
conf: net: Add model enum, and netfront value
vz: convert to net model enum
bhyve: convert to net model enum
qemu: Partially convert to net model enum
conf: Make net model enum compare case insensitive
vmx: convert to net model enum
vbox: Convert to net enum model
conf: Add VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING
src/bhyve/bhyve_command.c | 15 +--
src/bhyve/bhyve_parse_command.c | 10 +-
src/conf/domain_conf.c | 111 ++++++++++++++----
src/conf/domain_conf.h | 35 +++++-
src/libvirt_private.syms | 4 +
src/libxl/libxl_conf.c | 8 +-
src/libxl/libxl_domain.c | 1 +
src/qemu/qemu_command.c | 13 +-
src/qemu/qemu_domain.c | 32 +++--
src/qemu/qemu_domain_address.c | 13 +-
src/qemu/qemu_driver.c | 14 ++-
src/qemu/qemu_hotplug.c | 15 ++-
src/qemu/qemu_parse_command.c | 5 +-
src/security/virt-aa-helper.c | 3 +-
src/vbox/vbox_common.c | 29 ++---
src/vmx/vmx.c | 55 ++++-----
src/vz/vz_driver.c | 7 +-
src/vz/vz_sdk.c | 17 ++-
src/xenconfig/xen_common.c | 31 ++---
src/xenconfig/xen_sxpr.c | 30 ++---
tests/qemuxml2argvdata/net-many-models.args | 39 ++++++
tests/qemuxml2argvdata/net-many-models.xml | 38 ++++++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/net-many-models.xml | 53 +++++++++
tests/qemuxml2xmltest.c | 1 +
tests/xlconfigdata/test-net-fakemodel.cfg | 24 ++++
tests/xlconfigdata/test-net-fakemodel.xml | 39 ++++++
tests/xlconfigtest.c | 1 +
.../test-paravirt-net-fakemodel.cfg | 13 ++
.../test-paravirt-net-fakemodel.xml | 40 +++++++
.../test-paravirt-net-modelstr.cfg | 13 ++
tests/xmconfigtest.c | 1 +
.../xml2sexpr-fv-net-many-models.sexpr | 1 +
.../xml2sexpr-fv-net-many-models.xml | 43 +++++++
tests/xml2sexprtest.c | 1 +
35 files changed, 586 insertions(+), 170 deletions(-)
create mode 100644 tests/qemuxml2argvdata/net-many-models.args
create mode 100644 tests/qemuxml2argvdata/net-many-models.xml
create mode 100644 tests/qemuxml2xmloutdata/net-many-models.xml
create mode 100644 tests/xlconfigdata/test-net-fakemodel.cfg
create mode 100644 tests/xlconfigdata/test-net-fakemodel.xml
create mode 100644 tests/xmconfigdata/test-paravirt-net-fakemodel.cfg
create mode 100644 tests/xmconfigdata/test-paravirt-net-fakemodel.xml
create mode 100644 tests/xmconfigdata/test-paravirt-net-modelstr.cfg
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-many-models.sexpr
create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-many-models.xml
--
2.20.1
5 years, 8 months
[libvirt] [PATCH v3 0/4] Don't pm suspend guest if it's unable to wake up
by Michal Privoznik
This is v3 of:
https://www.redhat.com/archives/libvir-list/2019-April/msg00690.html
I've taken Daniel's patches and reworked them.
Diff to v2:
- Patches 1-2/3 are split into three patches
- Capability is checked for when querying other capabilities
- Fixed a small security issue in 3/3
Daniel Henrique Barboza (2):
qemu_capabilities: Add QEMU_CAPS_QUERY_CURRENT_MACHINE
qemuDomainPMSuspendForDuration: check for QEMU_CAPS_PM_WAKEUP_SUPPORT
Michal Prívozník (2):
qemu_monitor: Introduce handler for 'query-current-machine' command
qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT
src/qemu/qemu_capabilities.c | 26 ++++++++++
src/qemu/qemu_capabilities.h | 4 ++
src/qemu/qemu_driver.c | 21 ++++++++
src/qemu/qemu_monitor.c | 10 ++++
src/qemu/qemu_monitor.h | 9 ++++
src/qemu/qemu_monitor_json.c | 50 +++++++++++++++++++
src/qemu/qemu_monitor_json.h | 5 ++
.../caps_4.0.0.riscv32.replies | 11 ++++
.../caps_4.0.0.riscv32.xml | 2 +
.../caps_4.0.0.riscv64.replies | 11 ++++
.../caps_4.0.0.riscv64.xml | 2 +
.../caps_4.0.0.x86_64.replies | 11 ++++
.../caps_4.0.0.x86_64.xml | 2 +
13 files changed, 164 insertions(+)
--
2.21.0
5 years, 8 months
[libvirt] [PATCH v2 0/3] Add 'label' arg to VIR_ENUM_IMPL
by Cole Robinson
v1: https://www.redhat.com/archives/libvir-list/2019-April/msg00589.html
v2 changes:
- First two patches applied
- Turn on the error reporting, but only for label != NULL
- Fill in label == NULL for all VIR_ENUM_IMPL calls
- Patch #3 is added as an example conversion
Cole Robinson (3):
util: enum: Add 'label' arg to virEnum*String
util: enum: Add NULL 'label' arg VIR_ENUM_IMPL calls
conf: Add virDomainVirtType enum error label
docs/apibuild.py | 14 ++
src/access/viraccessperm.c | 20 +--
src/bhyve/bhyve_driver.c | 6 +-
src/conf/capabilities.c | 2 +-
src/conf/cpu_conf.c | 14 +-
src/conf/device_conf.c | 2 +-
src/conf/domain_capabilities.c | 2 +-
src/conf/domain_conf.c | 250 +++++++++++++++---------------
src/conf/interface_conf.c | 2 +-
src/conf/netdev_vlan_conf.c | 2 +-
src/conf/network_conf.c | 10 +-
src/conf/node_device_conf.c | 8 +-
src/conf/numa_conf.c | 6 +-
src/conf/nwfilter_conf.c | 14 +-
src/conf/snapshot_conf.c | 4 +-
src/conf/storage_adapter_conf.c | 2 +-
src/conf/storage_conf.c | 18 +--
src/libxl/libxl_domain.c | 2 +-
src/libxl/libxl_driver.c | 6 +-
src/locking/lock_daemon.c | 2 +-
src/logging/log_daemon.c | 2 +-
src/lxc/lxc_domain.c | 6 +-
src/lxc/lxc_native.c | 2 +-
src/network/leaseshelper.c | 2 +-
src/qemu/qemu_agent.c | 4 +-
src/qemu/qemu_capabilities.c | 7 +-
src/qemu/qemu_command.c | 18 +--
src/qemu/qemu_domain.c | 8 +-
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_firmware.c | 6 +-
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_migration_cookie.c | 2 +-
src/qemu/qemu_migration_params.c | 6 +-
src/qemu/qemu_monitor.c | 8 +-
src/qemu/qemu_monitor_json.c | 8 +-
src/remote/remote_daemon.c | 2 +-
src/util/vircgroup.c | 2 +-
src/util/vircgroupbackend.c | 2 +-
src/util/vircgroupv1.c | 2 +-
src/util/vircgroupv2.c | 2 +-
src/util/virconf.c | 2 +-
src/util/virenum.c | 25 ++-
src/util/virenum.h | 14 +-
src/util/virerror.c | 2 +-
src/util/virfirewall.c | 2 +-
src/util/virfirewalld.c | 4 +-
src/util/virgic.c | 2 +-
src/util/virhook.c | 14 +-
src/util/virkeycode.c | 2 +-
src/util/virlog.c | 2 +-
src/util/virmdev.c | 2 +-
src/util/virnetdev.c | 6 +-
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 4 +-
src/util/virpci.c | 6 +-
src/util/virperf.c | 2 +-
src/util/virprocess.c | 2 +-
src/util/virresctrl.c | 8 +-
src/util/virsecret.c | 2 +-
src/util/virstorageencryption.c | 4 +-
src/util/virstoragefile.c | 14 +-
src/util/virsysinfo.c | 2 +-
src/util/virtypedparam.c | 2 +-
src/vmware/vmware_conf.c | 2 +-
src/vmx/vmx.c | 2 +-
tools/virsh-domain-monitor.c | 24 +--
tools/virsh-domain.c | 54 +++----
tools/virsh-host.c | 2 +-
tools/virsh-network.c | 8 +-
tools/virsh-nodedev.c | 2 +-
tools/virsh-pool.c | 4 +-
tools/virsh-secret.c | 2 +-
tools/virsh-volume.c | 4 +-
tools/virt-admin.c | 2 +-
tools/virt-host-validate-common.c | 2 +-
75 files changed, 364 insertions(+), 350 deletions(-)
--
2.21.0
5 years, 8 months
[libvirt] On the content of 'nvram' section in /etc/libvirt/qemu.conf
by Kashyap Chamarthy
I learnt from Dan Berrangé that the 'nvram' section in
`/etc/libvirt/qemu.conf` will now go away in light of all the work done
in QEMU ('firmware.json', et al) and libvirt (the firmware
auto-selection).
But for my own education, can anyone confirm that the current content of
'nvram' is out of date in terms of mapping of OVMF binaries to their
corresponding variable store ("VARS") files?
Let's see what I mean.
On my Fedora 29 box, in `/etc/libvirt/qemu.conf`, I see the following
mapping of OVMF binaries to their correspoindg "VARS" file under the
'nvram' section:
#nvram = [
# "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd",
# "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd",
# "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd",
# "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd"
#]
Now let's enumerate the content of 'edk2-ovmf' package:
$> rpm -ql edk2-ovmf
/usr/share/OVMF
/usr/share/OVMF/OVMF_CODE.fd
/usr/share/OVMF/OVMF_CODE.secboot.fd
/usr/share/OVMF/OVMF_VARS.fd
/usr/share/OVMF/OVMF_VARS.secboot.fd
/usr/share/OVMF/UefiShell.iso
/usr/share/doc/edk2-ovmf
/usr/share/doc/edk2-ovmf/README
/usr/share/doc/edk2-ovmf/ovmf-whitepaper-c770f8c.txt
/usr/share/edk2
/usr/share/edk2/ovmf
/usr/share/edk2/ovmf/EnrollDefaultKeys.efi
/usr/share/edk2/ovmf/OVMF_CODE.fd
/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
/usr/share/edk2/ovmf/OVMF_VARS.fd
/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd
/usr/share/edk2/ovmf/Shell.efi
/usr/share/edk2/ovmf/UefiShell.iso
/usr/share/licenses/edk2-ovmf
/usr/share/licenses/edk2-ovmf/LICENSE.openssl
/usr/share/licenses/edk2-ovmf/License.txt
There is the /usr/share/edk2/ovmf/OVMF_VARS.secboot.fd file (which comes
with the default UEFI keys enrolled).
So, the mapping of OVMF binary to VARS file in the earlier mentioned
'nvram' section should have been:
/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd
Yes?
--
/kashyap
5 years, 8 months
[libvirt] Virtual machine
by achamusse@isutc.transcom.co.mz
My Ubuntu16.04.5 server is installed qemo-kvm and libvirt-manager but
virt-manager is not starting. consequently when I install vncserver the
keyboard does not work on the virtual machine.
But in ubuntu 14.04 it works perfectly.
can my help ??
ERRO when try run : virt-manager
Could not connect: Connection refused
Failed to connect to Mir: Failed to connect to server socket: No such file
or directory
Unable to init server: Could not connect: Connection refused
(virt-manager:7676): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion
'GDK_IS_SCREEN (screen)' failed
Melhores Cumprimentos
Armando Chamusse
Departamento de Operações e Infraestruturas
Prolongamento Av. Kim Il Sung, Edf. D1, C.P. 2088 - Maputo - Moçambique
Telefone: (+258) 21 48 87 92/5
Celular: (+258) 82 30 62 620 |82 31 26 200 | 84 31 29 246 | 87 16 28 785
<http://www.facebook.com/isutc> www.facebook.com/isutc
<http://www.transcom.co.mz/isutc/> www.transcom.co.mz/isutc
5 years, 8 months
[libvirt] [PATCH] qemu: Simplify interface handling in qemuConnectDomainXMLToNative()
by Michal Privoznik
Firstly, VIR_STRDUP() accepts NULL, so there is no need to check
if the string we want to duplicate is not-NULL. Secondly,
virDomainNetSetModelString() also accepts NULL. Thirdly, we have
VIR_AUTOFREE().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_driver.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0fb90c4049..c443c881d5 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7411,12 +7411,11 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
for (i = 0; i < vm->def->nnets; i++) {
virDomainNetDefPtr net = vm->def->nets[i];
unsigned int bootIndex = net->info.bootIndex;
- char *model = NULL;
+ VIR_AUTOFREE(char *) model = NULL;
virMacAddr mac = net->mac;
char *script = net->script;
- if (virDomainNetGetModelString(net) &&
- VIR_STRDUP(model, virDomainNetGetModelString(net)) < 0)
+ if (VIR_STRDUP(model, virDomainNetGetModelString(net)) < 0)
goto cleanup;
net->script = NULL;
@@ -7428,11 +7427,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
net->mac = mac;
net->script = script;
- if (model && virDomainNetSetModelString(net, model) < 0) {
- VIR_FREE(model);
+ if (virDomainNetSetModelString(net, model) < 0)
goto cleanup;
- }
- VIR_FREE(model);
}
if (!(cmd = qemuProcessCreatePretendCmd(driver, vm, NULL,
--
2.21.0
5 years, 8 months
[libvirt] [PATCH] docs: index.html.in: Deduplicate the link of QEMU and KVM
by Han Han
Because the page of QEMU and KVM use the same doc drvqemu.html, merge the into
one and name it as QEMU/KVM.
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/index.html.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/index.html.in b/docs/index.html.in
index f593445d06..97a4e9eef7 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -31,8 +31,8 @@
<li>is a toolkit to manage <a href="platforms.html">virtualization platforms</a></li>
<li>is accessible from C, Python, Perl, Java and more</li>
<li>is licensed under open source licenses</li>
- <li>supports <a href="drvqemu.html">KVM</a>,
- <a href="drvqemu.html">QEMU</a>, <a href="drvxen.html">Xen</a>,
+ <li>supports <a href="drvqemu.html">QEMU/KVM</a>,
+ <a href="drvxen.html">Xen</a>,
<a href="drvvirtuozzo.html">Virtuozzo</a>,
<a href="drvesx.html">VMWare ESX</a>,
<a href="drvlxc.html">LXC</a>,
--
2.20.1
5 years, 8 months
[libvirt] [PATCH] qemu: Fix uninitialized variable
by Andrea Bolognani
It has made Clang very unhappy ever since 6bf7c6769925.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the build breaker rule.
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index aac50475ee..0fb90c4049 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7411,7 +7411,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
for (i = 0; i < vm->def->nnets; i++) {
virDomainNetDefPtr net = vm->def->nets[i];
unsigned int bootIndex = net->info.bootIndex;
- char *model;
+ char *model = NULL;
virMacAddr mac = net->mac;
char *script = net->script;
--
2.20.1
5 years, 8 months
[libvirt] [PATCH 0/2] rpc: client: stream bugfix and improvement
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
rpc: client: fix race on stream error and stream creation
rpc: client: stream: notify streams of closing connection
src/rpc/virnetclient.c | 13 ++++++++++---
src/rpc/virnetclientstream.c | 30 ++++++++++++++++++++++++++++--
src/rpc/virnetclientstream.h | 2 ++
3 files changed, 40 insertions(+), 5 deletions(-)
--
1.8.3.1
5 years, 8 months