mirror of https://gitee.com/openkylin/libvirt.git
Move QEMU capabilities management into a separate file
The qemu_conf.c code is doing three jobs, driver config file loading, QEMU capabilities management and QEMU command line management. Move the capabilities code into its own file * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New capabilities management code * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities code * src/qemu/qemu_conf.h: Adapt for API renames * src/Makefile.am: add src/qemu/qemu_capabilities.c
This commit is contained in:
parent
02b4d34a04
commit
d8ae147d8e
|
@ -51,6 +51,7 @@ src/openvz/openvz_conf.c
|
|||
src/openvz/openvz_driver.c
|
||||
src/phyp/phyp_driver.c
|
||||
src/qemu/qemu_bridge_filter.c
|
||||
src/qemu/qemu_capabilities.c
|
||||
src/qemu/qemu_conf.c
|
||||
src/qemu/qemu_driver.c
|
||||
src/qemu/qemu_monitor.c
|
||||
|
|
|
@ -267,6 +267,7 @@ VBOX_DRIVER_SOURCES = \
|
|||
VBOX_DRIVER_EXTRA_DIST = vbox/vbox_tmpl.c vbox/README
|
||||
|
||||
QEMU_DRIVER_SOURCES = \
|
||||
qemu/qemu_capabilities.c qemu/qemu_capabilities.h\
|
||||
qemu/qemu_conf.c qemu/qemu_conf.h \
|
||||
qemu/qemu_monitor.c qemu/qemu_monitor.h \
|
||||
qemu/qemu_monitor_text.c \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* qemu_capabilities.h: QEMU capabilities generation
|
||||
*
|
||||
* Copyright (C) 2006-2007, 2009-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __QEMU_CAPABILITIES_H__
|
||||
# define __QEMU_CAPABILITIES_H__
|
||||
|
||||
# include "capabilities.h"
|
||||
|
||||
/* Internal flags to keep track of qemu command line capabilities */
|
||||
enum qemuCapsFlags {
|
||||
QEMUD_CMD_FLAG_KQEMU = (1 << 0), /* Whether KQEMU is compiled in */
|
||||
QEMUD_CMD_FLAG_VNC_COLON = (1 << 1), /* Does the VNC take just port, or address + display */
|
||||
QEMUD_CMD_FLAG_NO_REBOOT = (1 << 2), /* Is the -no-reboot flag available */
|
||||
QEMUD_CMD_FLAG_DRIVE = (1 << 3), /* Is the new -drive arg available */
|
||||
QEMUD_CMD_FLAG_DRIVE_BOOT = (1 << 4), /* Does -drive support boot=on */
|
||||
QEMUD_CMD_FLAG_NAME = (1 << 5), /* Is the -name flag available */
|
||||
QEMUD_CMD_FLAG_UUID = (1 << 6), /* Is the -uuid flag available */
|
||||
QEMUD_CMD_FLAG_DOMID = (1 << 7), /* Xenner only, special -domid flag available */
|
||||
QEMUD_CMD_FLAG_VNET_HDR = (1 << 8),
|
||||
QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO = (1 << 9), /* Original migration code from KVM. Also had tcp, but we can't use that
|
||||
* since it had a design bug blocking the entire monitor console */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP = (1 << 10), /* New migration syntax after merge to QEMU with TCP transport */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC = (1 << 11), /* New migration syntax after merge to QEMU with EXEC transport */
|
||||
QEMUD_CMD_FLAG_DRIVE_CACHE_V2 = (1 << 12), /* Is the cache= flag wanting new v2 values */
|
||||
QEMUD_CMD_FLAG_KVM = (1 << 13), /* Whether KVM is compiled in */
|
||||
QEMUD_CMD_FLAG_DRIVE_FORMAT = (1 << 14), /* Is -drive format= avail */
|
||||
QEMUD_CMD_FLAG_VGA = (1 << 15), /* Is -vga avail */
|
||||
|
||||
/* features added in qemu-0.10.0 or later */
|
||||
QEMUD_CMD_FLAG_0_10 = (1 << 16),
|
||||
QEMUD_CMD_FLAG_NET_NAME = QEMUD_CMD_FLAG_0_10, /* -net ...,name=str */
|
||||
QEMUD_CMD_FLAG_HOST_NET_ADD = QEMUD_CMD_FLAG_0_10, /* host_net_add monitor command */
|
||||
|
||||
QEMUD_CMD_FLAG_PCIDEVICE = (1 << 17), /* PCI device assignment only supported by qemu-kvm */
|
||||
QEMUD_CMD_FLAG_MEM_PATH = (1 << 18), /* mmap'ped guest backing supported */
|
||||
QEMUD_CMD_FLAG_DRIVE_SERIAL = (1 << 19), /* -driver serial= available */
|
||||
QEMUD_CMD_FLAG_XEN_DOMID = (1 << 20), /* -xen-domid (new style xen integration) */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_UNIX = (1 << 21), /* Does qemu support unix domain sockets for migration? */
|
||||
QEMUD_CMD_FLAG_CHARDEV = (1 << 22), /* Is the new -chardev arg available */
|
||||
QEMUD_CMD_FLAG_ENABLE_KVM = (1 << 23), /* Is the -enable-kvm flag available to "enable KVM full virtualization support" */
|
||||
QEMUD_CMD_FLAG_MONITOR_JSON = (1 << 24), /* JSON mode for monitor */
|
||||
QEMUD_CMD_FLAG_BALLOON = (1 << 25), /* -balloon available */
|
||||
QEMUD_CMD_FLAG_DEVICE = (1 << 26), /* Is the new -device arg available */
|
||||
QEMUD_CMD_FLAG_SDL = (1 << 27), /* Is the new -sdl arg available */
|
||||
QEMUD_CMD_FLAG_SMP_TOPOLOGY = (1 << 28), /* Is sockets=s,cores=c,threads=t available for -smp? */
|
||||
QEMUD_CMD_FLAG_NETDEV = (1 << 29), /* The -netdev flag & netdev_add/remove monitor commands */
|
||||
QEMUD_CMD_FLAG_RTC = (1 << 30), /* The -rtc flag for clock options */
|
||||
QEMUD_CMD_FLAG_VNET_HOST = (1LL << 31), /* vnet-host support is available in qemu */
|
||||
QEMUD_CMD_FLAG_RTC_TD_HACK = (1LL << 32), /* -rtc-td-hack available */
|
||||
QEMUD_CMD_FLAG_NO_HPET = (1LL << 33), /* -no-hpet flag is supported */
|
||||
QEMUD_CMD_FLAG_NO_KVM_PIT = (1LL << 34), /* -no-kvm-pit-reinjection supported */
|
||||
QEMUD_CMD_FLAG_TDF = (1LL << 35), /* -tdf flag (user-mode pit catchup) */
|
||||
QEMUD_CMD_FLAG_PCI_CONFIGFD = (1LL << 36), /* pci-assign.configfd */
|
||||
QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
|
||||
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on support */
|
||||
QEMUD_CMD_FLAG_ENABLE_KQEMU = (1LL << 39), /* -enable-kqemu flag */
|
||||
QEMUD_CMD_FLAG_FSDEV = (1LL << 40), /* -fstype filesystem passthrough */
|
||||
QEMUD_CMD_FLAG_NESTING = (1LL << 41), /* -enable-nesting (SVM/VMX) */
|
||||
QEMUD_CMD_FLAG_NAME_PROCESS = (1LL << 42), /* Is -name process= available */
|
||||
QEMUD_CMD_FLAG_DRIVE_READONLY= (1LL << 43), /* -drive readonly=on|off */
|
||||
QEMUD_CMD_FLAG_SMBIOS_TYPE = (1LL << 44), /* Is -smbios type= available */
|
||||
QEMUD_CMD_FLAG_VGA_QXL = (1LL << 45), /* The 'qxl' arg for '-vga' */
|
||||
QEMUD_CMD_FLAG_SPICE = (1LL << 46), /* Is -spice avail */
|
||||
QEMUD_CMD_FLAG_VGA_NONE = (1LL << 47), /* The 'none' arg for '-vga' */
|
||||
};
|
||||
|
||||
virCapsPtr qemuCapsInit(virCapsPtr old_caps);
|
||||
|
||||
int qemuCapsProbeMachineTypes(const char *binary,
|
||||
virCapsGuestMachinePtr **machines,
|
||||
int *nmachines);
|
||||
|
||||
int qemuCapsProbeCPUModels(const char *qemu,
|
||||
unsigned long long qemuCmdFlags,
|
||||
const char *arch,
|
||||
unsigned int *count,
|
||||
const char ***cpus);
|
||||
|
||||
int qemuCapsExtractVersion(virCapsPtr caps,
|
||||
unsigned int *version);
|
||||
int qemuCapsExtractVersionInfo(const char *qemu,
|
||||
unsigned int *version,
|
||||
unsigned long long *qemuCmdFlags);
|
||||
|
||||
int qemuCapsParseHelpStr(const char *qemu,
|
||||
const char *str,
|
||||
unsigned long long *qemuCmdFlags,
|
||||
unsigned int *version,
|
||||
unsigned int *is_kvm,
|
||||
unsigned int *kvm_version);
|
||||
|
||||
|
||||
#endif /* __QEMU_CAPABILITIES_H__*/
|
1191
src/qemu/qemu_conf.c
1191
src/qemu/qemu_conf.c
File diff suppressed because it is too large
Load Diff
|
@ -47,63 +47,6 @@
|
|||
|
||||
# define QEMUD_CPUMASK_LEN CPU_SETSIZE
|
||||
|
||||
/* Internal flags to keep track of qemu command line capabilities */
|
||||
enum qemud_cmd_flags {
|
||||
QEMUD_CMD_FLAG_KQEMU = (1 << 0), /* Whether KQEMU is compiled in */
|
||||
QEMUD_CMD_FLAG_VNC_COLON = (1 << 1), /* Does the VNC take just port, or address + display */
|
||||
QEMUD_CMD_FLAG_NO_REBOOT = (1 << 2), /* Is the -no-reboot flag available */
|
||||
QEMUD_CMD_FLAG_DRIVE = (1 << 3), /* Is the new -drive arg available */
|
||||
QEMUD_CMD_FLAG_DRIVE_BOOT = (1 << 4), /* Does -drive support boot=on */
|
||||
QEMUD_CMD_FLAG_NAME = (1 << 5), /* Is the -name flag available */
|
||||
QEMUD_CMD_FLAG_UUID = (1 << 6), /* Is the -uuid flag available */
|
||||
QEMUD_CMD_FLAG_DOMID = (1 << 7), /* Xenner only, special -domid flag available */
|
||||
QEMUD_CMD_FLAG_VNET_HDR = (1 << 8),
|
||||
QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO = (1 << 9), /* Original migration code from KVM. Also had tcp, but we can't use that
|
||||
* since it had a design bug blocking the entire monitor console */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP = (1 << 10), /* New migration syntax after merge to QEMU with TCP transport */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC = (1 << 11), /* New migration syntax after merge to QEMU with EXEC transport */
|
||||
QEMUD_CMD_FLAG_DRIVE_CACHE_V2 = (1 << 12), /* Is the cache= flag wanting new v2 values */
|
||||
QEMUD_CMD_FLAG_KVM = (1 << 13), /* Whether KVM is compiled in */
|
||||
QEMUD_CMD_FLAG_DRIVE_FORMAT = (1 << 14), /* Is -drive format= avail */
|
||||
QEMUD_CMD_FLAG_VGA = (1 << 15), /* Is -vga avail */
|
||||
|
||||
/* features added in qemu-0.10.0 or later */
|
||||
QEMUD_CMD_FLAG_0_10 = (1 << 16),
|
||||
QEMUD_CMD_FLAG_NET_NAME = QEMUD_CMD_FLAG_0_10, /* -net ...,name=str */
|
||||
QEMUD_CMD_FLAG_HOST_NET_ADD = QEMUD_CMD_FLAG_0_10, /* host_net_add monitor command */
|
||||
|
||||
QEMUD_CMD_FLAG_PCIDEVICE = (1 << 17), /* PCI device assignment only supported by qemu-kvm */
|
||||
QEMUD_CMD_FLAG_MEM_PATH = (1 << 18), /* mmap'ped guest backing supported */
|
||||
QEMUD_CMD_FLAG_DRIVE_SERIAL = (1 << 19), /* -driver serial= available */
|
||||
QEMUD_CMD_FLAG_XEN_DOMID = (1 << 20), /* -xen-domid (new style xen integration) */
|
||||
QEMUD_CMD_FLAG_MIGRATE_QEMU_UNIX = (1 << 21), /* Does qemu support unix domain sockets for migration? */
|
||||
QEMUD_CMD_FLAG_CHARDEV = (1 << 22), /* Is the new -chardev arg available */
|
||||
QEMUD_CMD_FLAG_ENABLE_KVM = (1 << 23), /* Is the -enable-kvm flag available to "enable KVM full virtualization support" */
|
||||
QEMUD_CMD_FLAG_MONITOR_JSON = (1 << 24), /* JSON mode for monitor */
|
||||
QEMUD_CMD_FLAG_BALLOON = (1 << 25), /* -balloon available */
|
||||
QEMUD_CMD_FLAG_DEVICE = (1 << 26), /* Is the new -device arg available */
|
||||
QEMUD_CMD_FLAG_SDL = (1 << 27), /* Is the new -sdl arg available */
|
||||
QEMUD_CMD_FLAG_SMP_TOPOLOGY = (1 << 28), /* Is sockets=s,cores=c,threads=t available for -smp? */
|
||||
QEMUD_CMD_FLAG_NETDEV = (1 << 29), /* The -netdev flag & netdev_add/remove monitor commands */
|
||||
QEMUD_CMD_FLAG_RTC = (1 << 30), /* The -rtc flag for clock options */
|
||||
QEMUD_CMD_FLAG_VNET_HOST = (1LL << 31), /* vnet-host support is available in qemu */
|
||||
QEMUD_CMD_FLAG_RTC_TD_HACK = (1LL << 32), /* -rtc-td-hack available */
|
||||
QEMUD_CMD_FLAG_NO_HPET = (1LL << 33), /* -no-hpet flag is supported */
|
||||
QEMUD_CMD_FLAG_NO_KVM_PIT = (1LL << 34), /* -no-kvm-pit-reinjection supported */
|
||||
QEMUD_CMD_FLAG_TDF = (1LL << 35), /* -tdf flag (user-mode pit catchup) */
|
||||
QEMUD_CMD_FLAG_PCI_CONFIGFD = (1LL << 36), /* pci-assign.configfd */
|
||||
QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
|
||||
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on support */
|
||||
QEMUD_CMD_FLAG_ENABLE_KQEMU = (1LL << 39), /* -enable-kqemu flag */
|
||||
QEMUD_CMD_FLAG_FSDEV = (1LL << 40), /* -fstype filesystem passthrough */
|
||||
QEMUD_CMD_FLAG_NESTING = (1LL << 41), /* -enable-nesting (SVM/VMX) */
|
||||
QEMUD_CMD_FLAG_NAME_PROCESS = (1LL << 42), /* Is -name process= available */
|
||||
QEMUD_CMD_FLAG_DRIVE_READONLY= (1LL << 43), /* -drive readonly=on|off */
|
||||
QEMUD_CMD_FLAG_SMBIOS_TYPE = (1LL << 44), /* Is -smbios type= available */
|
||||
QEMUD_CMD_FLAG_VGA_QXL = (1LL << 45), /* The 'qxl' arg for '-vga' */
|
||||
QEMUD_CMD_FLAG_SPICE = (1LL << 46), /* Is -spice avail */
|
||||
QEMUD_CMD_FLAG_VGA_NONE = (1LL << 47), /* The 'none' arg for '-vga' */
|
||||
};
|
||||
|
||||
/* Main driver state */
|
||||
struct qemud_driver {
|
||||
|
@ -220,20 +163,6 @@ struct _qemuDomainCmdlineDef {
|
|||
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||
const char *filename);
|
||||
|
||||
virCapsPtr qemudCapsInit (virCapsPtr old_caps);
|
||||
|
||||
int qemudExtractVersion (struct qemud_driver *driver);
|
||||
int qemudExtractVersionInfo (const char *qemu,
|
||||
unsigned int *version,
|
||||
unsigned long long *qemuCmdFlags);
|
||||
|
||||
int qemudParseHelpStr (const char *qemu,
|
||||
const char *str,
|
||||
unsigned long long *qemuCmdFlags,
|
||||
unsigned int *version,
|
||||
unsigned int *is_kvm,
|
||||
unsigned int *kvm_version);
|
||||
|
||||
virCommandPtr qemudBuildCommandLine (virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virDomainDefPtr def,
|
||||
|
@ -324,16 +253,6 @@ int qemudPhysIfaceConnect(virConnectPtr conn,
|
|||
const unsigned char *vmuuid,
|
||||
enum virVMOperationType vmop);
|
||||
|
||||
int qemudProbeMachineTypes (const char *binary,
|
||||
virCapsGuestMachinePtr **machines,
|
||||
int *nmachines);
|
||||
|
||||
int qemudProbeCPUModels (const char *qemu,
|
||||
unsigned long long qemuCmdFlags,
|
||||
const char *arch,
|
||||
unsigned int *count,
|
||||
const char ***cpus);
|
||||
|
||||
int qemudCanonicalizeMachine (struct qemud_driver *driver,
|
||||
virDomainDefPtr def);
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "datatypes.h"
|
||||
#include "qemu_driver.h"
|
||||
#include "qemu_conf.h"
|
||||
#include "qemu_capabilities.h"
|
||||
#include "qemu_monitor.h"
|
||||
#include "qemu_bridge_filter.h"
|
||||
#include "c-ctype.h"
|
||||
|
@ -1553,9 +1554,9 @@ qemuReconnectDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaq
|
|||
/* XXX we should be persisting the original flags in the XML
|
||||
* not re-detecting them, since the binary may have changed
|
||||
* since launch time */
|
||||
if (qemudExtractVersionInfo(obj->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) >= 0 &&
|
||||
if (qemuCapsExtractVersionInfo(obj->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) >= 0 &&
|
||||
(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
|
||||
priv->persistentAddrs = 1;
|
||||
|
||||
|
@ -1644,7 +1645,7 @@ qemuCreateCapabilities(virCapsPtr oldcaps,
|
|||
virCapsPtr caps;
|
||||
|
||||
/* Basic host arch / guest machine capabilities */
|
||||
if (!(caps = qemudCapsInit(oldcaps))) {
|
||||
if (!(caps = qemuCapsInit(oldcaps))) {
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3118,9 +3119,9 @@ qemuAssignPCIAddresses(virDomainDefPtr def)
|
|||
unsigned long long qemuCmdFlags = 0;
|
||||
qemuDomainPCIAddressSetPtr addrs = NULL;
|
||||
|
||||
if (qemudExtractVersionInfo(def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
||||
|
@ -4063,9 +4064,9 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
|||
goto cleanup;
|
||||
|
||||
DEBUG0("Determining emulator version");
|
||||
if (qemudExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
DEBUG0("Setting up domain cgroup (if required)");
|
||||
|
@ -4851,10 +4852,10 @@ static int qemudGetVersion(virConnectPtr conn, unsigned long *version) {
|
|||
int ret = -1;
|
||||
|
||||
qemuDriverLock(driver);
|
||||
if (qemudExtractVersion(driver) < 0)
|
||||
if (qemuCapsExtractVersion(driver->caps, &driver->qemuVersion) < 0)
|
||||
goto cleanup;
|
||||
|
||||
*version = qemu_driver->qemuVersion;
|
||||
*version = driver->qemuVersion;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
@ -7465,9 +7466,9 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
|||
def->graphics[i]->data.vnc.port = QEMU_VNC_PORT_MIN;
|
||||
}
|
||||
|
||||
if (qemudExtractVersionInfo(def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuPrepareMonitorChr(driver, &monConfig, def->name) < 0)
|
||||
|
@ -7637,7 +7638,7 @@ qemudCanonicalizeMachineDirect(virDomainDefPtr def, char **canonical)
|
|||
virCapsGuestMachinePtr *machines = NULL;
|
||||
int i, nmachines = 0;
|
||||
|
||||
if (qemudProbeMachineTypes(def->emulator, &machines, &nmachines) < 0) {
|
||||
if (qemuCapsProbeMachineTypes(def->emulator, &machines, &nmachines) < 0) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
|
@ -8826,9 +8827,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
|
|||
if (dev == NULL)
|
||||
goto endjob;
|
||||
|
||||
if (qemudExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
|
@ -9073,9 +9074,9 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
|
|||
if (dev == NULL)
|
||||
goto endjob;
|
||||
|
||||
if (qemudExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto endjob;
|
||||
|
||||
switch (dev->type) {
|
||||
|
@ -9793,9 +9794,9 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
|
|||
if (dev == NULL)
|
||||
goto endjob;
|
||||
|
||||
if (qemudExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK &&
|
||||
|
@ -11060,7 +11061,7 @@ qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
|
|||
unlink(unixfile);
|
||||
|
||||
/* check that this qemu version supports the interactive exec */
|
||||
if (qemudExtractVersionInfo(vm->def->emulator, NULL, &qemuCmdFlags) < 0) {
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator, NULL, &qemuCmdFlags) < 0) {
|
||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Cannot determine QEMU argv syntax %s"),
|
||||
vm->def->emulator);
|
||||
|
@ -11571,7 +11572,7 @@ static int doTunnelMigrate(virDomainPtr dom,
|
|||
}
|
||||
|
||||
/* check that this qemu version supports the unix migration */
|
||||
if (qemudExtractVersionInfo(vm->def->emulator, NULL, &qemuCmdFlags) < 0) {
|
||||
if (qemuCapsExtractVersionInfo(vm->def->emulator, NULL, &qemuCmdFlags) < 0) {
|
||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Cannot extract Qemu version from '%s'"),
|
||||
vm->def->emulator);
|
||||
|
|
Loading…
Reference in New Issue