提交 e8400564 编写于 作者: C Cole Robinson

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.
上级 075650ff
......@@ -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");
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册