[libvirt] [PATCH] initial version of the bhyve driver
by Roman Bogorodskiy
Hi,
This is an initial version of the bhyve driver. bhyve is a hypervisor for
FreeBSD: http://bhyve.org/.
I've tried to make this initial version as small as possible but functional, e.g.
so it could be tested without lots of manual actions outside of libvirt. Hopefully
it's not large enough for review, because I have no idea how to make it smaller yet
functional.
About the driver itself.
It supports the following operations on domains (not counting service ones):
* define
* start
* destroy
Domain configuration is limited, user can define RAM, vcpus, can specify only one
block device and attach the domain to only one network of 'bridge' type (default
network works fine).
Having that, you can start a bhyve VM and it will get a network connectivity.
Network supported added at the early state, because the only way to get inside VM
but network is via stdout/stdin, which is not convenient at all. That was fixed
in -CURRENT and one could use tty device, but I haven't upgrade my development box
to that version yet.
Testing information:
I use an domain xml like that:
https://gist.github.com/novel/8151244
On both host and guest I use FreeBSD amd64 10-BETA3. Guest image doesn't have much
configuration except:
ifconfig_vtnet0="DHCP"
in /etc/rc.conf
And allowing root loging for sshd.
Also, if one wants to manually test the image outside of libvirt, this line is needed
in /etc/ttys to be able to login from console:
ttyu2 "/usr/libexec/getty std.9600" vt100 on secure
Roman Bogorodskiy (1):
bhyve: add a basic driver
configure.ac | 37 ++++
daemon/libvirtd.c | 9 +
include/libvirt/virterror.h | 1 +
src/Makefile.am | 35 +++
src/bhyve/bhyve_driver.c | 529 ++++++++++++++++++++++++++++++++++++++++++++
src/bhyve/bhyve_driver.h | 28 +++
src/bhyve/bhyve_process.c | 386 ++++++++++++++++++++++++++++++++
src/bhyve/bhyve_process.h | 36 +++
src/bhyve/bhyve_utils.h | 48 ++++
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/driver.h | 1 +
src/libvirt.c | 3 +
src/util/virerror.c | 1 +
14 files changed, 1117 insertions(+), 1 deletion(-)
create mode 100644 src/bhyve/bhyve_driver.c
create mode 100644 src/bhyve/bhyve_driver.h
create mode 100644 src/bhyve/bhyve_process.c
create mode 100644 src/bhyve/bhyve_process.h
create mode 100644 src/bhyve/bhyve_utils.h
--
1.8.4.3
10 years, 11 months
[libvirt] fail to live migration
by yue
hi,all
i have no idea why?
does this error have anything to do with virtio-channel via which outside process can communicate with guest's process.
------------------my app log--------
File "/usr/lib64/python2.6/site-packages/mcvda/libvirtconnection.py", line 87, in wrapper
ret = f(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1178, in migrateToURI2
if ret == -1: raise libvirtError ('virDomainMigrateToURI2() failed', dom=self)
libvirtError: Failed to inquire lock: No such process
--log libvirtd.log
2013-12-26 09:09:15.514+0000: 18953: error : qemuMonitorIORead:513 : Unable to read from monitor: Connection reset by peer
2013-12-26 09:09:15.514+0000: 18953: debug : qemuMonitorIO:646 : Error on monitor Unable to read from monitor: Connection reset by peer
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0530
2013-12-26 09:09:15.514+0000: 18953: debug : qemuMonitorIO:680 : Triggering error callback
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessHandleMonitorError:357 : Received error on 0x7fd6940cd410 'QY-n1'
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectRef:168 : OBJECT_REF: obj=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: error : qemuAgentIO:642 : internal error End of file from monitor
2013-12-26 09:09:15.514+0000: 18953: debug : qemuAgentIO:675 : Error on monitor internal error End of file from monitor
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : qemuAgentIO:698 : Triggering EOF callback
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessHandleAgentEOF:125 : Received EOF from agent on 0x7fd6940cd410 'QY-n1'
2013-12-26 09:09:15.514+0000: 18953: debug : qemuAgentClose:814 : mon=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : virFileClose:72 : Closed fd 29
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:137 : OBJECT_DISPOSE: obj=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : qemuAgentDispose:169 : mon=0x7fd6940d0640
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessHandleAgentDestroy:186 : Received destroy agent=0x7fd6940d0640 vm=0x7fd6940cd410
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940cd410
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectRef:168 : OBJECT_REF: obj=0x7fd6940d0530
2013-12-26 09:09:15.514+0000: 18953: debug : qemuMonitorIO:646 : Error on monitor Unable to read from monitor: Connection reset by peer
2013-12-26 09:09:15.514+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0530
2013-12-26 09:09:15.514+0000: 18953: debug : qemuMonitorIO:669 : Triggering EOF callback
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessHandleMonitorEOF:298 : Received EOF on 0x7fd6940cd410 'QY-n1'
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessHandleMonitorEOF:317 : Monitor connection to 'QY-n1' closed without SHUTDOWN event; assuming the domain crashed
2013-12-26 09:09:15.514+0000: 18953: debug : qemuProcessStop:4192 : Shutting down VM 'QY-n1' pid=20542 flags=0
2013-12-26 09:09:15.515+0000: 18953: debug : virFileClose:72 : Closed fd 28
2013-12-26 09:09:15.515+0000: 18953: debug : qemuMonitorClose:837 : QEMU_MONITOR_CLOSE: mon=0x7fd6940d0530 refs=3
2013-12-26 09:09:15.515+0000: 18953: debug : virFileClose:72 : Closed fd 30
2013-12-26 09:09:15.515+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940d0530
2013-12-26 09:09:15.515+0000: 18953: debug : qemuProcessKill:4090 : vm=QY-n1 pid=20542 flags=5
2013-12-26 09:09:15.515+0000: 18957: debug : qemuMonitorSend:915 : Send command resulted in error Unable to read from monitor: Connection reset by peer
2013-12-26 09:09:15.715+0000: 18953: debug : virObjectRef:168 : OBJECT_REF: obj=0x7fd6940cd410
2013-12-26 09:09:15.715+0000: 18957: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940cd410
2013-12-26 09:09:15.715+0000: 18957: debug : virDomainLockProcessPause:194 : plugin=0x7fd698003020 dom=0x7fd6940cd410 state=0x7fd6940d93d8
2013-12-26 09:09:15.715+0000: 18957: debug : virDomainLockManagerNew:128 : plugin=0x7fd698003020 dom=0x7fd6940cd410 withResources=1
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerPluginGetDriver:283 : plugin=0x7fd698003020
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerNew:307 : driver=0x7fd69d17e900 type=0 nparams=5 params=0x7fd6a2f33720 flags=0
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerLogParams:107 : key=uuid type=uuid value=2619ef7c-d047-4468-b047-3099695f95b7
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerLogParams:100 : key=name type=string value=QY-n1
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerLogParams:88 : key=id type=uint value=4294967295
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerLogParams:88 : key=pid type=uint value=20542
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerLogParams:103 : key=uri type=cstring value=(null)
2013-12-26 09:09:15.715+0000: 18957: debug : virDomainLockManagerNew:140 : Adding leases
2013-12-26 09:09:15.715+0000: 18957: debug : virDomainLockManagerNew:145 : Adding disks
2013-12-26 09:09:15.715+0000: 18957: debug : virDomainLockManagerAddDisk:86 : Add disk /rhev/data-center/e0495ee4-cc01-41ca-9530-a58e184f6e29/c3a83221-1393-4bec-bc3a-214d82e7433c/images/cae86c44-d7fd-45d4-9c2c-ffba89ae31ad/1d04094d-9d76-407e-8924-63d2015f17ed
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerAddResource:336 : lock=0x7fd6880018f0 type=0 name=/rhev/data-center/e0495ee4-cc01-41ca-9530-a58e184f6e29/c3a83221-1393-4bec-bc3a-214d82e7433c/images/cae86c44-d7fd-45d4-9c2c-ffba89ae31ad/1d04094d-9d76-407e-8924-63d2015f17ed nparams=0 params=(nil) flags=0
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerRelease:369 : lock=0x7fd6880018f0 state=0x7fd6940d93d8 flags=0
2013-12-26 09:09:15.715+0000: 18957: error : virLockManagerSanlockRelease:1047 : Failed to inquire lock: No such process
2013-12-26 09:09:15.715+0000: 18957: debug : virLockManagerFree:391 : lock=0x7fd6880018f0
2013-12-26 09:09:15.715+0000: 18957: warning : qemuProcessStartCPUs:2846 : Unable to release lease on QY-n1
2013-12-26 09:09:15.715+0000: 18957: debug : qemuProcessStartCPUs:2847 : Preserving lock state '(null)'
2013-12-26 09:09:15.715+0000: 18957: debug : qemuProcessStop:4192 : Shutting down VM 'QY-n1' pid=20542 flags=1
2013-12-26 09:09:15.715+0000: 18957: debug : qemuProcessStop:4195 : VM 'QY-n1' not active
2013-12-26 09:09:15.715+0000: 18957: debug : qemuDomainObjEndAsyncJob:955 : Stopping async job: migration in
2013-12-26 09:09:15.715+0000: 18957: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940cd410
2013-12-26 09:09:15.715+0000: 18957: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940cd410
2013-12-26 09:09:15.715+0000: 18957: debug : virNetServerProgramSendError:150 : prog=536903814 ver=1 proc=217 type=1 serial=6 msg=0x2263720 rerr=0x7fd6a2f33b80
2013-12-26 09:09:15.715+0000: 18953: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7fd6940cd410
2013-12-26 09:09:15.715+0000: 18953: debug : qemuDomainCleanupRun:1995 : driver=0x7fd69801fe50, vm=QY-n1
2013-12-26 09:09:15.715+0000: 18953: debug : qemuProcessAutoDestroyRemove:4670 : vm=QY-n1
10 years, 11 months
[libvirt] python setMetadata issue
by Umar Draz
Hi
I am trying to set Metada of running virtual machine, but its giving me an
error.
Here is my code
import libvirt
conn = libvirt.open('qemu+tcp://10.0.128.12/system')
dom = conn.lookupByName('virtspace')
type = 'VIR_DOMAIN_METADATA_DESCRIPTION'
key = ''
uri = ''
dom.setMetadata(conn, type, 'myDescription', key, uri)
and here is the error.
Traceback (most recent call last):
File "setMeta.py", line 11, in <module>
dom.setMetadata(conn, type, 'meta_test', key, uri)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1460, in
setMetadata
ret = libvirtmod.virDomainSetMetadata(self._o, type, metadata, key,
uri, flags)
AttributeError: virConnect instance has no attribute '__trunc__'
10 years, 11 months
[libvirt] [PATCH] domain: don't try to interpret <driver> as virtio config for hostdev interfaces
by Laine Stump
This resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1046337
The <driver> type attribute of an interface is interpreted in two
different ways depending on the <interface> type - if the interface is
type='hostdev', then the driver name describes which backend to use
for the hostdev device assignment (vfio or kvm), but if the interface
is any emulated type *and* the model type is "virtio", then the driver
name can be "vhost" or "qemu", telling which backend qemu should use
to communicate with the emulated device.
The problem comes when someone has defined a an interface like this
(which is accepted by the parser as long as no <driver name='xxx'/> is
specified):
<interface type='hostdev'>
...
<model type='virtio'/>
...
</interface>
As libvirt storing this definition in the domain's status, the driver
name is automatically filled in with the backend that was
automatically decided by libvirt, so it stores this in the status:
<interface type='hostdev'>
...
<driver name='vfio'/>
...
<model type='virtio'/>
...
</interface>
This isn't noticed until the next time libvirtd is restarted - as it
is reading the status of all domains, it encounters the above
interface definition, logs an error:
internal error: Unknown interface <driver name='vfio'> has been specified
and fails to reload the domain status, so the domain is marked as
inactive.
The solution is to stop the parser from interpreting <driver>
attributes as if the device was an emulated virtio device, when it is
actually a hostdev.
(Although the bug has existed since vfio support was added, it has
just recently become more apparent because libvirt previously didn't
automatically set the driver name for hostdev interfaces in the domain
status to vfio/kvm as it does since commit f094aa, first appearing in
v1.1.4.)
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 80bc85f..e65f3e3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6752,7 +6752,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
model = NULL;
}
- if (def->model && STREQ(def->model, "virtio")) {
+ if (def->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
+ STREQ_NULLABLE(def->model, "virtio")) {
if (backend != NULL) {
int name;
if ((name = virDomainNetBackendTypeFromString(backend)) < 0 ||
--
1.8.3.1
10 years, 11 months
[libvirt] [PATCH v2 0/3] libxl: improve vcpu pinning
by Dario Faggioli
Hi,
Take two, with the comments from Jim on v1 fixed. Basically, that means I've
added a few comments and removed some non necessary safety checking.
Series available here:
git://xenbits.xen.org/people/dariof/libvirt.git libxl/VcpuPinX-v2
Regards,
Dario
---
Dario Faggioli (3):
libxl: implement virDomainGetVcpuPinInfo
libxl: implement virDomainPinVcpuFlags
libxl: correctly handle affinity reset in virDomainPinVcpu[Flags]
src/libxl/libxl_driver.c | 166 ++++++++++++++++++++++++++++++++++++++++------
1 file changed, 145 insertions(+), 21 deletions(-)
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
10 years, 11 months
[libvirt] [PATCH] virt-login-shell: clean up usage
by Eric Blake
I noticed a couple odd things in 'virt-login-shell --help' output.
* tools/virt-login-shell.c (usage): At most one option accepted,
drop trailing colon.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the trivial rule.
tools/virt-login-shell.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index 758d1af..8b35e34 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -161,10 +161,10 @@ usage(void)
fprintf(stdout,
_("\n"
"Usage:\n"
- " %s [options]\n\n"
+ " %s [option]\n\n"
"Options:\n"
- " -h | --help Display program help:\n"
- " -V | --version Display program version:\n"
+ " -h | --help Display program help\n"
+ " -V | --version Display program version\n"
"\n"
"libvirt login shell\n"),
progname);
--
1.8.4.2
10 years, 11 months
[libvirt] [PATCH 00/14] Fix flaw in virt-login-shell CVE-2013-4400
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The following series of patches have been pushed to master as a
fix for CVE-2013-4400.
The first four patches are the core fix. The remaining 10 patches
are preventative measures to help avoid further problems in the
future.
I will be pushing at least the first 4 patches to stable branches
and any of the further patches if I find they apply without merge
problems.
Daniel P. Berrange (14):
Add helpers for getting env vars in a setuid environment
Only allow 'stderr' log output when running setuid (CVE-2013-4400)
Close all non-stdio FDs in virt-login-shell (CVE-2013-4400)
Don't link virt-login-shell against libvirt.so (CVE-2013-4400)
Set a sane $PATH for virt-login-shell
Make virCommand env handling robust in setuid env
Remove all direct use of getenv
Block all use of getenv with syntax-check
Only allow the UNIX transport in remote driver when setuid
Don't allow remote driver daemon autostart when running setuid
Add stub getegid impl for platforms lacking it
Remove (nearly) all use of getuid()/getgid()
Block all use of libvirt.so in setuid programs
Move virt-login-shell into libvirt-login-shell sub-RPM
Makefile.am | 1 +
bootstrap.conf | 1 +
cfg.mk | 8 ++++
config-post.h | 44 ++++++++++++++++++
configure.ac | 1 +
daemon/Makefile.am | 1 +
daemon/libvirtd.c | 2 +-
examples/domain-events/events-c/Makefile.am | 3 +-
examples/hellolibvirt/Makefile.am | 2 +-
examples/openauth/Makefile.am | 2 +-
gnulib/lib/Makefile.am | 2 +-
libvirt.spec.in | 28 +++++++----
python/Makefile.am | 1 +
src/Makefile.am | 72 +++++++++++++++++++++++++++++
src/driver.c | 3 +-
src/libvirt.c | 54 +++++++++++++++-------
src/libvirt_private.syms | 6 ++-
src/locking/lock_daemon.c | 6 +--
src/locking/lock_driver_lockd.c | 6 +--
src/locking/lock_manager.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 4 +-
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_command.c | 8 ++--
src/qemu/qemu_driver.c | 6 +--
src/remote/remote_driver.c | 37 +++++++++++----
src/rpc/virnetsocket.c | 16 +++----
src/rpc/virnettlscontext.c | 4 +-
src/storage/storage_backend.c | 4 +-
src/storage/storage_backend_fs.c | 4 +-
src/storage/storage_backend_logical.c | 2 +-
src/util/virauth.c | 2 +-
src/util/vircommand.c | 50 +++++++++++++++-----
src/util/vircommand.h | 8 +++-
src/util/virfile.c | 23 +++++----
src/util/viridentity.c | 8 ++--
src/util/virlog.c | 18 ++++++--
src/util/virrandom.c | 2 +-
src/util/virstoragefile.c | 2 +-
src/util/virutil.c | 47 +++++++++++++++++--
src/util/virutil.h | 8 ++++
src/vbox/vbox_XPCOMCGlue.c | 2 +-
src/vbox/vbox_driver.c | 2 +-
src/vbox/vbox_tmpl.c | 6 +--
tests/commandtest.c | 8 ++--
tests/qemumonitortestutils.c | 2 +-
tests/virnetsockettest.c | 4 +-
tools/Makefile.am | 9 +++-
tools/virsh.c | 18 ++++----
tools/virt-login-shell.c | 14 ++++++
50 files changed, 430 insertions(+), 137 deletions(-)
create mode 100644 config-post.h
--
1.8.3.1
10 years, 11 months
[libvirt] [PATCH v2] virnettlscontexttest fails with GNUTLS 3.0.28
by Cédric Bosdonnat
On openSUSE 12.x with GNUTLS 3.0.28, virnettlscontexttest fails. It has
been reported to work from GNUTLS 3.1.11 on Fedora 19. Changed the
constraints on gnutls to 3.1+ for unit test cacert4req.
---
v2: Changed the condition for 4.0 to work and made commit message
more explicit.
tests/virnettlscontexttest.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c
index fc512fc..f3917bf 100644
--- a/tests/virnettlscontexttest.c
+++ b/tests/virnettlscontexttest.c
@@ -268,7 +268,9 @@ mymain(void)
* be rejected. GNUTLS < 3 does not reject it and
* we don't anticipate them changing this behaviour
*/
- DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, GNUTLS_VERSION_MAJOR >= 3);
+ DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename,
+ (GNUTLS_VERSION_MAJOR == 3 && GNUTLS_VERSION_MINOR >= 1) ||
+ GNUTLS_VERSION_MAJOR > 3);
DO_CTX_TEST(true, cacert5req.filename, servercert5req.filename, true);
DO_CTX_TEST(true, cacert6req.filename, servercert6req.filename, true);
--
1.8.4.4
10 years, 11 months
[libvirt] [PATCH v2] PanicCheckABIStability: Need to check for existence
by John Ferlan
Commit id '4313fead' added a call to virDomainPanicCheckABIStability()
which did not check whether the panic device existed before making a call
to virDomainDeviceInfoCheckABIStability() which ended up segfaulting:
Thread 1 (Thread 0x7f5332837700 (LWP 10964)):
(src=<optimized out>, dst=<optimized out>)
at conf/domain_conf.c:13007
(dst=<optimized out>, src=<optimized out>)
at conf/domain_conf.c:13712
(src=<optimized out>, dst=<optimized out>)
at conf/domain_conf.c:14056
(domain=domain@entry=0x7f53000057c0, vm=vm@entry=0x7f53000036d0,
defptr=defptr@entry=0x7f5332836978, snap=snap@entry=0x7f5332836970,
update_current=update_current@entry=0x7f5332836962, flags=flags@entry=1)
at conf/snapshot_conf.c:1230
(domain=0x7f53000057c0, xmlDesc=<optimized out>, flags=1)
at qemu/qemu_driver.c:12719
(domain=domain@entry=0x7f53000057c0, xmlDesc=0x7f53000081d0
"<domainsnapshot>\n <name>snap2</name>\n
<description>new-desc</description>\n <state>running</state>\n
<parent>\n <name>snap1</name>\n </parent>\n
<creationTime>1387487268</creationTime>\n <memory s"..., flags=1)
at libvirt.c:19695
...
(gdb) up 3
(gdb) print *other->def->dom
$2 = {virtType = 2, id = -1, ..
...
rng = 0x0, panic = 0x0, namespaceData = 0x0,...
...
(gdb) print *def->dom
$3 = {virtType = 2, id = -1, ...
...
rng = 0x0, panic = 0x0, namespaceData = 0x0,...
...
(gdb)
Also seen using following sequence:
virsh save $dom $file
virsh save-image-edit $file
add (or remove) a <panic/> line
<devices>
...
<panic>
<address type='isa' iobase='0x505'/>
</panic>
...
</devices>
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Changes since v1 -
Added !src && !dst check, which results in:
error: unsupported configuration: Target domain panic device count '0' does not match source count '1'
src/conf/domain_conf.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0079234..773c29d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13709,6 +13709,17 @@ static bool
virDomainPanicCheckABIStability(virDomainPanicDefPtr src,
virDomainPanicDefPtr dst)
{
+ if (!src && !dst)
+ return true;
+
+ if (!src || !dst) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain panic device count '%d' "
+ "does not match source count '%d'"),
+ src ? 1 : 0, dst ? 1 : 0);
+ return false;
+ }
+
return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info);
}
--
1.8.3.1
10 years, 11 months