[libvirt] [PATCH 1/3] qemu: XMLToNative: Don't show -S

-S causes qemu to start in the paused state. Since XML2Native is intended to generate something that users can run directly, this will trip them up. --- src/qemu/qemu_command.c | 8 ++++++-- src/qemu/qemu_command.h | 3 ++- src/qemu/qemu_driver.c | 6 ++++-- src/qemu/qemu_process.c | 2 +- tests/qemuxml2argvtest.c | 2 +- tests/qemuxmlnstest.c | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index aa1a3db..755a72a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7711,7 +7711,8 @@ qemuBuildCommandLine(virConnectPtr conn, int migrateFd, virDomainSnapshotObjPtr snapshot, enum virNetDevVPortProfileOp vmop, - qemuBuildCommandLineCallbacksPtr callbacks) + qemuBuildCommandLineCallbacksPtr callbacks, + bool forXMLToArgv) { virErrorPtr originalError = NULL; size_t i, j; @@ -7820,7 +7821,10 @@ qemuBuildCommandLine(virConnectPtr conn, virCommandAddArg(cmd, def->name); } } - virCommandAddArg(cmd, "-S"); /* freeze CPU */ + + if (!forXMLToArgv) + virCommandAddArg(cmd, "-S"); /* freeze CPU */ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_FIPS)) virCommandAddArg(cmd, "-enable-fips"); diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index ebb0b1d..50dc4a0 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -76,7 +76,8 @@ virCommandPtr qemuBuildCommandLine(virConnectPtr conn, int migrateFd, virDomainSnapshotObjPtr current_snapshot, enum virNetDevVPortProfileOp vmop, - qemuBuildCommandLineCallbacksPtr callbacks) + qemuBuildCommandLineCallbacksPtr callbacks, + bool forXMLToArgv) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(11); /* Generate '-device' string for chardev device */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ba470a1..a01739c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5956,8 +5956,10 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, if (!(cmd = qemuBuildCommandLine(conn, driver, def, &monConfig, monitor_json, qemuCaps, - NULL, -1, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &buildCommandLineCallbacks))) + NULL, -1, NULL, + VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, + &buildCommandLineCallbacks, + true))) goto cleanup; ret = virCommandToString(cmd); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 809ab37..35ad62a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3856,7 +3856,7 @@ int qemuProcessStart(virConnectPtr conn, if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig, priv->monJSON, priv->qemuCaps, migrateFrom, stdin_fd, snapshot, vmop, - &buildCommandLineCallbacks))) + &buildCommandLineCallbacks, false))) goto cleanup; /* now that we know it is about to start call the hook if present */ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5d6a64b..8d7d9e5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -357,7 +357,7 @@ static int testCompareXMLToArgvFiles(const char *xml, (flags & FLAG_JSON), extraFlags, migrateFrom, migrateFd, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &testCallbacks))) { + &testCallbacks, false))) { if (!virtTestOOMActive() && (flags & FLAG_EXPECT_FAILURE)) { ret = 0; diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c index 20a5ccd..81d496e 100644 --- a/tests/qemuxmlnstest.c +++ b/tests/qemuxmlnstest.c @@ -119,7 +119,7 @@ static int testCompareXMLToArgvFiles(const char *xml, vmdef, &monitor_chr, json, extraFlags, migrateFrom, migrateFd, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &testCallbacks))) + &testCallbacks, false))) goto fail; if (!virtTestOOMActive()) { -- 1.8.5.3

Just skip the vhost command line generation, since this won't work if attempting to run manually. --- src/qemu/qemu_command.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 755a72a..bf7fb12 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, virQEMUCapsPtr qemuCaps, int vlan, int bootindex, - enum virNetDevVPortProfileOp vmop) + enum virNetDevVPortProfileOp vmop, + bool forXMLToArgv) { int ret = -1; char *nic = NULL, *host = NULL; @@ -7579,10 +7580,11 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, goto cleanup; } - if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK || - actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || - actualType == VIR_DOMAIN_NET_TYPE_ETHERNET || - actualType == VIR_DOMAIN_NET_TYPE_DIRECT) { + if ((actualType == VIR_DOMAIN_NET_TYPE_NETWORK || + actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || + actualType == VIR_DOMAIN_NET_TYPE_ETHERNET || + actualType == VIR_DOMAIN_NET_TYPE_DIRECT) && + !forXMLToArgv) { /* Attempt to use vhost-net mode for these types of network device */ vhostfdSize = net->driver.virtio.queues; @@ -8759,7 +8761,8 @@ qemuBuildCommandLine(virConnectPtr conn, vlan = i; if (qemuBuildInterfaceCommandLine(cmd, driver, conn, def, net, - qemuCaps, vlan, bootNet, vmop) < 0) + qemuCaps, vlan, bootNet, vmop, + forXMLToArgv) < 0) goto error; last_good_net = i; bootNet = 0; -- 1.8.5.3

On 03/13/2014 01:13 PM, Cole Robinson wrote:
Just skip the vhost command line generation, since this won't work if attempting to run manually. --- src/qemu/qemu_command.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 755a72a..bf7fb12 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, virQEMUCapsPtr qemuCaps, int vlan, int bootindex, - enum virNetDevVPortProfileOp vmop) + enum virNetDevVPortProfileOp vmop, + bool forXMLToArgv)
Ah, *now* I understand why you used that name - you're using it to indicate multiple behavior changes that coincidentally are needed when calling for XMLtoNative. Thinking... thinking... So a more generic way of describing this is that you want a commandline that will be runnable standalone, not requiring/supporting all the setup done by libvirt when it will be running the command itself. So maybe name it "standalone"? Beyond that, now I'm wondering, *is* the purpose of xml-to-native to generate something the user can run standalone? Or is it to give them a simple way to see the exact command that libvirt would have run to start this domain? If the former, then ACK to both this and 1/3 (but maybe give another thought to the name for the bool). If the latter, then maybe we shouldn't be doing this series anyway...
{ int ret = -1; char *nic = NULL, *host = NULL; @@ -7579,10 +7580,11 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, goto cleanup; }
- if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK || - actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || - actualType == VIR_DOMAIN_NET_TYPE_ETHERNET || - actualType == VIR_DOMAIN_NET_TYPE_DIRECT) { + if ((actualType == VIR_DOMAIN_NET_TYPE_NETWORK || + actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || + actualType == VIR_DOMAIN_NET_TYPE_ETHERNET || + actualType == VIR_DOMAIN_NET_TYPE_DIRECT) && + !forXMLToArgv) { /* Attempt to use vhost-net mode for these types of network device */ vhostfdSize = net->driver.virtio.queues; @@ -8759,7 +8761,8 @@ qemuBuildCommandLine(virConnectPtr conn, vlan = i;
if (qemuBuildInterfaceCommandLine(cmd, driver, conn, def, net, - qemuCaps, vlan, bootNet, vmop) < 0) + qemuCaps, vlan, bootNet, vmop, + forXMLToArgv) < 0) goto error; last_good_net = i; bootNet = 0;

On 03/13/2014 05:18 PM, Laine Stump wrote:
On 03/13/2014 01:13 PM, Cole Robinson wrote:
Just skip the vhost command line generation, since this won't work if attempting to run manually. --- src/qemu/qemu_command.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 755a72a..bf7fb12 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, virQEMUCapsPtr qemuCaps, int vlan, int bootindex, - enum virNetDevVPortProfileOp vmop) + enum virNetDevVPortProfileOp vmop, + bool forXMLToArgv)
Ah, *now* I understand why you used that name - you're using it to indicate multiple behavior changes that coincidentally are needed when calling for XMLtoNative.
Thinking... thinking...
So a more generic way of describing this is that you want a commandline that will be runnable standalone, not requiring/supporting all the setup done by libvirt when it will be running the command itself.
So maybe name it "standalone"?
Sure, I'll rename it.
Beyond that, now I'm wondering, *is* the purpose of xml-to-native to generate something the user can run standalone? Or is it to give them a simple way to see the exact command that libvirt would have run to start this domain? If the former, then ACK to both this and 1/3 (but maybe give another thought to the name for the bool). If the latter, then maybe we shouldn't be doing this series anyway...
There's a comment in qemu_driver.c XMLToNative: /* Since we're just exporting args, we can't do bridge/network/direct * setups, since libvirt will normally create TAP/macvtap devices * directly. We convert those configs into generic 'ethernet' * config and assume the user has suitable 'ifup-qemu' scripts */ Followed by some domain conf reworking to print something possibly runable, so it seems user runable is the goal. It doesn't really work in practice due to the ifup assumptions, but at least after this patch series it's as easy as s/-netdev tap/-netdev user/g to get something that boots in most cases. - Cole

On Fri, Mar 14, 2014 at 09:20:14AM -0400, Cole Robinson wrote:
On 03/13/2014 05:18 PM, Laine Stump wrote:
On 03/13/2014 01:13 PM, Cole Robinson wrote:
Just skip the vhost command line generation, since this won't work if attempting to run manually. --- src/qemu/qemu_command.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 755a72a..bf7fb12 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd, virQEMUCapsPtr qemuCaps, int vlan, int bootindex, - enum virNetDevVPortProfileOp vmop) + enum virNetDevVPortProfileOp vmop, + bool forXMLToArgv)
Ah, *now* I understand why you used that name - you're using it to indicate multiple behavior changes that coincidentally are needed when calling for XMLtoNative.
Thinking... thinking...
So a more generic way of describing this is that you want a commandline that will be runnable standalone, not requiring/supporting all the setup done by libvirt when it will be running the command itself.
So maybe name it "standalone"?
Sure, I'll rename it.
Beyond that, now I'm wondering, *is* the purpose of xml-to-native to generate something the user can run standalone? Or is it to give them a simple way to see the exact command that libvirt would have run to start this domain? If the former, then ACK to both this and 1/3 (but maybe give another thought to the name for the bool). If the latter, then maybe we shouldn't be doing this series anyway...
There's a comment in qemu_driver.c XMLToNative:
/* Since we're just exporting args, we can't do bridge/network/direct * setups, since libvirt will normally create TAP/macvtap devices * directly. We convert those configs into generic 'ethernet' * config and assume the user has suitable 'ifup-qemu' scripts */
Followed by some domain conf reworking to print something possibly runable, so it seems user runable is the goal. It doesn't really work in practice due to the ifup assumptions, but at least after this patch series it's as easy as s/-netdev tap/-netdev user/g to get something that boots in most cases.
The point is to get something that works with the "native" tools. In Xen world the goal was to create a valid /etc/xen/ config file, in QEMU world the goal is to create an ARGV set you can use to launch QEMU. So you are correct that we shouldn't generate ARGV that rely on FD passing, since the user can't run those. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 03/14/2014 07:42 AM, Daniel P. Berrange wrote:
The point is to get something that works with the "native" tools. In Xen world the goal was to create a valid /etc/xen/ config file, in QEMU world the goal is to create an ARGV set you can use to launch QEMU. So you are correct that we shouldn't generate ARGV that rely on FD passing, since the user can't run those.
Maybe we could modify the output to give the full shell line, including redirections, as in: qemu ... -use-of-fd 5 ... 5<>/path/to/file But we still have to figure out how to pick fd numbers, and to modify our output to handle redirections... -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Mar 14, 2014 at 08:03:27AM -0600, Eric Blake wrote:
On 03/14/2014 07:42 AM, Daniel P. Berrange wrote:
The point is to get something that works with the "native" tools. In Xen world the goal was to create a valid /etc/xen/ config file, in QEMU world the goal is to create an ARGV set you can use to launch QEMU. So you are correct that we shouldn't generate ARGV that rely on FD passing, since the user can't run those.
Maybe we could modify the output to give the full shell line, including redirections, as in:
qemu ... -use-of-fd 5 ... 5<>/path/to/file
But we still have to figure out how to pick fd numbers, and to modify our output to handle redirections...
I don't think we should be relying on shell magic in the args we generate - I'd want something that can be directly used with execve() Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 03/14/2014 08:35 AM, Daniel P. Berrange wrote:
On Fri, Mar 14, 2014 at 08:03:27AM -0600, Eric Blake wrote:
On 03/14/2014 07:42 AM, Daniel P. Berrange wrote:
The point is to get something that works with the "native" tools. In Xen world the goal was to create a valid /etc/xen/ config file, in QEMU world the goal is to create an ARGV set you can use to launch QEMU. So you are correct that we shouldn't generate ARGV that rely on FD passing, since the user can't run those.
Maybe we could modify the output to give the full shell line, including redirections, as in:
qemu ... -use-of-fd 5 ... 5<>/path/to/file
But we still have to figure out how to pick fd numbers, and to modify our output to handle redirections...
I don't think we should be relying on shell magic in the args we generate - I'd want something that can be directly used with execve()
We need two separate output formats, then. We already rely on shell magic to quote arguments for reuse by shell - so an execve argument (where we provide a NUL-separated list of arguments) would be a new format. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Right now we are parsing the XML as though it's live, which for example will choke on hardcoded XML like: <seclabel type='dynamic' model='selinux' relabel='yes'/> Erroring with: $ sudo virsh domxml-to-native qemu-argv f error: XML error: security label is missing --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a01739c..89f443f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, goto cleanup; def = virDomainDefParseString(xmlData, caps, driver->xmlopt, - QEMU_EXPECTED_VIRT_TYPES, 0); + QEMU_EXPECTED_VIRT_TYPES, + VIR_DOMAIN_XML_INACTIVE); if (!def) goto cleanup; -- 1.8.5.3

On 03/13/2014 01:13 PM, Cole Robinson wrote:
Right now we are parsing the XML as though it's live, which for example will choke on hardcoded XML like:
<seclabel type='dynamic' model='selinux' relabel='yes'/>
Erroring with:
$ sudo virsh domxml-to-native qemu-argv f error: XML error: security label is missing --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a01739c..89f443f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, goto cleanup;
def = virDomainDefParseString(xmlData, caps, driver->xmlopt, - QEMU_EXPECTED_VIRT_TYPES, 0); + QEMU_EXPECTED_VIRT_TYPES, + VIR_DOMAIN_XML_INACTIVE); if (!def) goto cleanup;
Makes sense to me. ACK.

Cole Robinson wrote:
Right now we are parsing the XML as though it's live, which for example will choke on hardcoded XML like:
<seclabel type='dynamic' model='selinux' relabel='yes'/>
Erroring with:
$ sudo virsh domxml-to-native qemu-argv f error: XML error: security label is missing --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a01739c..89f443f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, goto cleanup;
def = virDomainDefParseString(xmlData, caps, driver->xmlopt, - QEMU_EXPECTED_VIRT_TYPES, 0); + QEMU_EXPECTED_VIRT_TYPES, + VIR_DOMAIN_XML_INACTIVE);
Seems like this would be a good change for other drivers that support connectDomainXMLToNative. Regards, Jim

On 03/13/2014 06:27 PM, Jim Fehlig wrote:
Cole Robinson wrote:
Right now we are parsing the XML as though it's live, which for example will choke on hardcoded XML like:
<seclabel type='dynamic' model='selinux' relabel='yes'/>
Erroring with:
$ sudo virsh domxml-to-native qemu-argv f error: XML error: security label is missing --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a01739c..89f443f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, goto cleanup;
def = virDomainDefParseString(xmlData, caps, driver->xmlopt, - QEMU_EXPECTED_VIRT_TYPES, 0); + QEMU_EXPECTED_VIRT_TYPES, + VIR_DOMAIN_XML_INACTIVE);
Seems like this would be a good change for other drivers that support connectDomainXMLToNative.
Good point, I'll fix them all in the next round. - Cole

On 03/13/2014 01:13 PM, Cole Robinson wrote:
-S causes qemu to start in the paused state. Since XML2Native is intended to generate something that users can run directly, this will trip them up. --- src/qemu/qemu_command.c | 8 ++++++-- src/qemu/qemu_command.h | 3 ++- src/qemu/qemu_driver.c | 6 ++++-- src/qemu/qemu_process.c | 2 +- tests/qemuxml2argvtest.c | 2 +- tests/qemuxmlnstest.c | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index aa1a3db..755a72a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7711,7 +7711,8 @@ qemuBuildCommandLine(virConnectPtr conn, int migrateFd, virDomainSnapshotObjPtr snapshot, enum virNetDevVPortProfileOp vmop, - qemuBuildCommandLineCallbacksPtr callbacks) + qemuBuildCommandLineCallbacksPtr callbacks, + bool forXMLToArgv) { virErrorPtr originalError = NULL; size_t i, j; @@ -7820,7 +7821,10 @@ qemuBuildCommandLine(virConnectPtr conn, virCommandAddArg(cmd, def->name); } } - virCommandAddArg(cmd, "-S"); /* freeze CPU */ + + if (!forXMLToArgv) + virCommandAddArg(cmd, "-S"); /* freeze CPU */ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_FIPS)) virCommandAddArg(cmd, "-enable-fips");
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index ebb0b1d..50dc4a0 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -76,7 +76,8 @@ virCommandPtr qemuBuildCommandLine(virConnectPtr conn, int migrateFd, virDomainSnapshotObjPtr current_snapshot, enum virNetDevVPortProfileOp vmop,
(I would dearly love to get rid of this ugly vmop thing everywhere it lives. Such blatant overstepping of bounds! But that's irrelevant to your patch, so ignore my rant...)
- qemuBuildCommandLineCallbacksPtr callbacks) + qemuBuildCommandLineCallbacksPtr callbacks, + bool forXMLToArgv)
Maybe call this "startPaused" or something like that to indicate what it does rather than who uses it (I first said to myself "startStopped", but that didn't really work well :-) Or if you wanted to make it more complicated, you could have an "extraArgs" arg instead; but I guess we shouldn't bother with anything like that until/unless we have more than one arg that we need to be optional. So, pending a rename to something that indicates what it does rather than what it will be used for, ACK.
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(11);
/* Generate '-device' string for chardev device */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ba470a1..a01739c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5956,8 +5956,10 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
if (!(cmd = qemuBuildCommandLine(conn, driver, def, &monConfig, monitor_json, qemuCaps, - NULL, -1, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &buildCommandLineCallbacks))) + NULL, -1, NULL, + VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, + &buildCommandLineCallbacks, + true))) goto cleanup;
ret = virCommandToString(cmd); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 809ab37..35ad62a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3856,7 +3856,7 @@ int qemuProcessStart(virConnectPtr conn, if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig, priv->monJSON, priv->qemuCaps, migrateFrom, stdin_fd, snapshot, vmop, - &buildCommandLineCallbacks))) + &buildCommandLineCallbacks, false))) goto cleanup;
/* now that we know it is about to start call the hook if present */ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5d6a64b..8d7d9e5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -357,7 +357,7 @@ static int testCompareXMLToArgvFiles(const char *xml, (flags & FLAG_JSON), extraFlags, migrateFrom, migrateFd, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &testCallbacks))) { + &testCallbacks, false))) { if (!virtTestOOMActive() && (flags & FLAG_EXPECT_FAILURE)) { ret = 0; diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c index 20a5ccd..81d496e 100644 --- a/tests/qemuxmlnstest.c +++ b/tests/qemuxmlnstest.c @@ -119,7 +119,7 @@ static int testCompareXMLToArgvFiles(const char *xml, vmdef, &monitor_chr, json, extraFlags, migrateFrom, migrateFd, NULL, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, - &testCallbacks))) + &testCallbacks, false))) goto fail;
if (!virtTestOOMActive()) {
participants (5)
-
Cole Robinson
-
Daniel P. Berrange
-
Eric Blake
-
Jim Fehlig
-
Laine Stump