]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: XMLToNative: Don't show -S
authorCole Robinson <crobinso@redhat.com>
Thu, 13 Mar 2014 18:23:56 +0000 (14:23 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 14 Mar 2014 21:33:29 +0000 (17:33 -0400)
-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
src/qemu/qemu_command.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
tests/qemuxml2argvtest.c
tests/qemuxmlnstest.c

index aa1a3db2fbfc41927a81b8824ede2fad6913007a..3e6a17272967192c8b6621de51c277c513cf268c 100644 (file)
@@ -7711,7 +7711,8 @@ qemuBuildCommandLine(virConnectPtr conn,
                      int migrateFd,
                      virDomainSnapshotObjPtr snapshot,
                      enum virNetDevVPortProfileOp vmop,
-                     qemuBuildCommandLineCallbacksPtr callbacks)
+                     qemuBuildCommandLineCallbacksPtr callbacks,
+                     bool standalone)
 {
     virErrorPtr originalError = NULL;
     size_t i, j;
@@ -7820,7 +7821,10 @@ qemuBuildCommandLine(virConnectPtr conn,
             virCommandAddArg(cmd, def->name);
         }
     }
-    virCommandAddArg(cmd, "-S"); /* freeze CPU */
+
+    if (!standalone)
+        virCommandAddArg(cmd, "-S"); /* freeze CPU */
+
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_FIPS))
         virCommandAddArg(cmd, "-enable-fips");
 
index ebb0b1d21044118a1e8b7fdc4ad7f1b608e26dea..50dc4a07b53e6228d40b13a385d08bae9c1df60a 100644 (file)
@@ -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 */
index ba470a134266d1232f59bed0e70341b17d9b818c..a01739c81580c50480ee7ac4399919c6b614b664 100644 (file)
@@ -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);
index 78725bd32f3e8c53846cde605e331a85151f4490..400625a965f10fb17e300e8b2e5cc0538e0abc8d 100644 (file)
@@ -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 */
index 5d6a64b67ddff76657c1b56862990daf2f6eb40e..8d7d9e5dc511edc7b990bf6f2aa0ee14c672e5bc 100644 (file)
@@ -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;
index 20a5ccd0403b16dd365b3a8e83395cd51f8e3b17..81d496e1431d50f054bfe8d6b909f24c7e250b77 100644 (file)
@@ -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()) {