mirror of https://gitee.com/openkylin/libvirt.git
Explicitly represent balloon device in XML and handle PCI address
To allow compatibility with older QEMU PCI device slot assignment it is necessary to explicitly track the balloon device in the XML. This introduces a new device <memballoon model='virtio|xen'/> It can also have a PCI address, auto-assigned if necessary. The memballoon will be automatically added to all Xen and QEMU guests by default. * docs/schemas/domain.rng: Add <memballoon> element * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and formatting for memballoon device. Always add a memory balloon device to Xen/QEMU if none exists in XML * src/libvirt_private.syms: Export memballoon model APIs * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Honour the PCI device address in memory balloon device * tests/*: Update to test new functionality
This commit is contained in:
parent
ccd2c82ee4
commit
b2f1863533
|
@ -1310,6 +1310,19 @@
|
||||||
</optional>
|
</optional>
|
||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
<define name="memballoon">
|
||||||
|
<element name="memballoon">
|
||||||
|
<attribute name="model">
|
||||||
|
<choice>
|
||||||
|
<value>virtio</value>
|
||||||
|
<value>xen</value>
|
||||||
|
</choice>
|
||||||
|
</attribute>
|
||||||
|
<optional>
|
||||||
|
<ref name="address"/>
|
||||||
|
</optional>
|
||||||
|
</element>
|
||||||
|
</define>
|
||||||
<define name="parallel">
|
<define name="parallel">
|
||||||
<element name="parallel">
|
<element name="parallel">
|
||||||
<ref name="qemucdev"/>
|
<ref name="qemucdev"/>
|
||||||
|
@ -1516,6 +1529,9 @@
|
||||||
<optional>
|
<optional>
|
||||||
<ref name="watchdog"/>
|
<ref name="watchdog"/>
|
||||||
</optional>
|
</optional>
|
||||||
|
<optional>
|
||||||
|
<ref name="memballoon"/>
|
||||||
|
</optional>
|
||||||
</interleave>
|
</interleave>
|
||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
|
|
@ -189,6 +189,10 @@ VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
|
||||||
"pcspk",
|
"pcspk",
|
||||||
"ac97")
|
"ac97")
|
||||||
|
|
||||||
|
VIR_ENUM_IMPL(virDomainMemballoonModel, VIR_DOMAIN_MEMBALLOON_MODEL_LAST,
|
||||||
|
"virtio",
|
||||||
|
"xen");
|
||||||
|
|
||||||
VIR_ENUM_IMPL(virDomainWatchdogModel, VIR_DOMAIN_WATCHDOG_MODEL_LAST,
|
VIR_ENUM_IMPL(virDomainWatchdogModel, VIR_DOMAIN_WATCHDOG_MODEL_LAST,
|
||||||
"i6300esb",
|
"i6300esb",
|
||||||
"ib700")
|
"ib700")
|
||||||
|
@ -567,6 +571,16 @@ void virDomainSoundDefFree(virDomainSoundDefPtr def)
|
||||||
VIR_FREE(def);
|
VIR_FREE(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def)
|
||||||
|
{
|
||||||
|
if (!def)
|
||||||
|
return;
|
||||||
|
|
||||||
|
virDomainDeviceInfoClear(&def->info);
|
||||||
|
|
||||||
|
VIR_FREE(def);
|
||||||
|
}
|
||||||
|
|
||||||
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def)
|
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def)
|
||||||
{
|
{
|
||||||
if (!def)
|
if (!def)
|
||||||
|
@ -1001,6 +1015,9 @@ int virDomainDeviceInfoIterate(virDomainDefPtr def,
|
||||||
if (def->watchdog)
|
if (def->watchdog)
|
||||||
if (cb(def, &def->watchdog->info, opaque) < 0)
|
if (cb(def, &def->watchdog->info, opaque) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (def->memballoon)
|
||||||
|
if (cb(def, &def->memballoon->info, opaque) < 0)
|
||||||
|
return -1;
|
||||||
if (def->console)
|
if (def->console)
|
||||||
if (cb(def, &def->console->info, opaque) < 0)
|
if (cb(def, &def->console->info, opaque) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -3170,6 +3187,40 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static virDomainMemballoonDefPtr
|
||||||
|
virDomainMemballoonDefParseXML(const xmlNodePtr node,
|
||||||
|
int flags)
|
||||||
|
{
|
||||||
|
char *model;
|
||||||
|
virDomainMemballoonDefPtr def;
|
||||||
|
|
||||||
|
if (VIR_ALLOC(def) < 0) {
|
||||||
|
virReportOOMError();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
model = virXMLPropString(node, "model");
|
||||||
|
if ((def->model = virDomainMemballoonModelTypeFromString(model)) < 0) {
|
||||||
|
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("unknown memory balloon model '%s'"), model);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virDomainDeviceInfoParseXML(node, &def->info, flags) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
VIR_FREE(model);
|
||||||
|
|
||||||
|
return def;
|
||||||
|
|
||||||
|
error:
|
||||||
|
virDomainMemballoonDefFree(def);
|
||||||
|
def = NULL;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virDomainVideoDefaultRAM(virDomainDefPtr def,
|
virDomainVideoDefaultRAM(virDomainDefPtr def,
|
||||||
int type)
|
int type)
|
||||||
|
@ -4634,6 +4685,41 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* analysis of the memballoon devices */
|
||||||
|
def->memballoon = NULL;
|
||||||
|
if ((n = virXPathNodeSet("./devices/memballoon", ctxt, &nodes)) < 0) {
|
||||||
|
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("cannot extract memory balloon devices"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (n > 1) {
|
||||||
|
virDomainReportError (VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("only a single memory balloon device is supported"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (n > 0) {
|
||||||
|
virDomainMemballoonDefPtr memballoon =
|
||||||
|
virDomainMemballoonDefParseXML(nodes[0], flags);
|
||||||
|
if (!memballoon)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
def->memballoon = memballoon;
|
||||||
|
VIR_FREE(nodes);
|
||||||
|
} else {
|
||||||
|
if (def->virtType == VIR_DOMAIN_VIRT_XEN ||
|
||||||
|
def->virtType == VIR_DOMAIN_VIRT_QEMU ||
|
||||||
|
def->virtType == VIR_DOMAIN_VIRT_KQEMU ||
|
||||||
|
def->virtType == VIR_DOMAIN_VIRT_KVM) {
|
||||||
|
virDomainMemballoonDefPtr memballoon;
|
||||||
|
if (VIR_ALLOC(memballoon) < 0)
|
||||||
|
goto no_memory;
|
||||||
|
memballoon->model = def->virtType == VIR_DOMAIN_VIRT_XEN ?
|
||||||
|
VIR_DOMAIN_MEMBALLOON_MODEL_XEN :
|
||||||
|
VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO;
|
||||||
|
def->memballoon = memballoon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* analysis of security label */
|
/* analysis of security label */
|
||||||
if (virSecurityLabelDefParseXML(def, ctxt, flags) == -1)
|
if (virSecurityLabelDefParseXML(def, ctxt, flags) == -1)
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -5671,6 +5757,35 @@ virDomainSoundDefFormat(virBufferPtr buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virDomainMemballoonDefFormat(virBufferPtr buf,
|
||||||
|
virDomainMemballoonDefPtr def,
|
||||||
|
int flags)
|
||||||
|
{
|
||||||
|
const char *model = virDomainMemballoonModelTypeToString(def->model);
|
||||||
|
|
||||||
|
if (!model) {
|
||||||
|
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("unexpected memballoon model %d"), def->model);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
virBufferVSprintf(buf, " <memballoon model='%s'",
|
||||||
|
model);
|
||||||
|
|
||||||
|
if (virDomainDeviceInfoIsSet(&def->info)) {
|
||||||
|
virBufferAddLit(buf, ">\n");
|
||||||
|
if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0)
|
||||||
|
return -1;
|
||||||
|
virBufferAddLit(buf, " </memballoon>\n");
|
||||||
|
} else {
|
||||||
|
virBufferAddLit(buf, "/>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainWatchdogDefFormat(virBufferPtr buf,
|
virDomainWatchdogDefFormat(virBufferPtr buf,
|
||||||
virDomainWatchdogDefPtr def,
|
virDomainWatchdogDefPtr def,
|
||||||
|
@ -6280,6 +6395,9 @@ char *virDomainDefFormat(virDomainDefPtr def,
|
||||||
if (def->watchdog)
|
if (def->watchdog)
|
||||||
virDomainWatchdogDefFormat (&buf, def->watchdog, flags);
|
virDomainWatchdogDefFormat (&buf, def->watchdog, flags);
|
||||||
|
|
||||||
|
if (def->memballoon)
|
||||||
|
virDomainMemballoonDefFormat (&buf, def->memballoon, flags);
|
||||||
|
|
||||||
virBufferAddLit(&buf, " </devices>\n");
|
virBufferAddLit(&buf, " </devices>\n");
|
||||||
|
|
||||||
if (def->seclabel.model) {
|
if (def->seclabel.model) {
|
||||||
|
|
|
@ -560,6 +560,22 @@ struct _virDomainHostdevDef {
|
||||||
virDomainDeviceInfo info; /* Guest address */
|
virDomainDeviceInfo info; /* Guest address */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum {
|
||||||
|
VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO,
|
||||||
|
VIR_DOMAIN_MEMBALLOON_MODEL_XEN,
|
||||||
|
|
||||||
|
VIR_DOMAIN_MEMBALLOON_MODEL_LAST
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct _virDomainMemballoonDef virDomainMemballoonDef;
|
||||||
|
typedef virDomainMemballoonDef *virDomainMemballoonDefPtr;
|
||||||
|
struct _virDomainMemballoonDef {
|
||||||
|
int model;
|
||||||
|
virDomainDeviceInfo info;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Flags for the 'type' field in next struct */
|
/* Flags for the 'type' field in next struct */
|
||||||
enum virDomainDeviceType {
|
enum virDomainDeviceType {
|
||||||
VIR_DOMAIN_DEVICE_DISK,
|
VIR_DOMAIN_DEVICE_DISK,
|
||||||
|
@ -871,6 +887,7 @@ struct _virDomainDef {
|
||||||
virDomainChrDefPtr console;
|
virDomainChrDefPtr console;
|
||||||
virSecurityLabelDef seclabel;
|
virSecurityLabelDef seclabel;
|
||||||
virDomainWatchdogDefPtr watchdog;
|
virDomainWatchdogDefPtr watchdog;
|
||||||
|
virDomainMemballoonDefPtr memballoon;
|
||||||
virCPUDefPtr cpu;
|
virCPUDefPtr cpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -931,6 +948,7 @@ void virDomainFSDefFree(virDomainFSDefPtr def);
|
||||||
void virDomainNetDefFree(virDomainNetDefPtr def);
|
void virDomainNetDefFree(virDomainNetDefPtr def);
|
||||||
void virDomainChrDefFree(virDomainChrDefPtr def);
|
void virDomainChrDefFree(virDomainChrDefPtr def);
|
||||||
void virDomainSoundDefFree(virDomainSoundDefPtr def);
|
void virDomainSoundDefFree(virDomainSoundDefPtr def);
|
||||||
|
void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def);
|
||||||
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
|
void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
|
||||||
void virDomainVideoDefFree(virDomainVideoDefPtr def);
|
void virDomainVideoDefFree(virDomainVideoDefPtr def);
|
||||||
void virDomainHostdevDefFree(virDomainHostdevDefPtr def);
|
void virDomainHostdevDefFree(virDomainHostdevDefPtr def);
|
||||||
|
@ -1109,6 +1127,7 @@ VIR_ENUM_DECL(virDomainNet)
|
||||||
VIR_ENUM_DECL(virDomainChrTarget)
|
VIR_ENUM_DECL(virDomainChrTarget)
|
||||||
VIR_ENUM_DECL(virDomainChr)
|
VIR_ENUM_DECL(virDomainChr)
|
||||||
VIR_ENUM_DECL(virDomainSoundModel)
|
VIR_ENUM_DECL(virDomainSoundModel)
|
||||||
|
VIR_ENUM_DECL(virDomainMemballoonModel)
|
||||||
VIR_ENUM_DECL(virDomainWatchdogModel)
|
VIR_ENUM_DECL(virDomainWatchdogModel)
|
||||||
VIR_ENUM_DECL(virDomainWatchdogAction)
|
VIR_ENUM_DECL(virDomainWatchdogAction)
|
||||||
VIR_ENUM_DECL(virDomainVideo)
|
VIR_ENUM_DECL(virDomainVideo)
|
||||||
|
|
|
@ -170,6 +170,8 @@ virDomainSaveStatus;
|
||||||
virDomainSoundDefFree;
|
virDomainSoundDefFree;
|
||||||
virDomainSoundModelTypeFromString;
|
virDomainSoundModelTypeFromString;
|
||||||
virDomainSoundModelTypeToString;
|
virDomainSoundModelTypeToString;
|
||||||
|
virDomainMemballoonModelTypeFromString;
|
||||||
|
virDomainMemballoonModelTypeToString;
|
||||||
virDomainWatchdogModelTypeFromString;
|
virDomainWatchdogModelTypeFromString;
|
||||||
virDomainWatchdogModelTypeToString;
|
virDomainWatchdogModelTypeToString;
|
||||||
virDomainWatchdogActionTypeFromString;
|
virDomainWatchdogActionTypeFromString;
|
||||||
|
|
|
@ -2023,6 +2023,10 @@ qemuAssignDeviceAliases(virDomainDefPtr def, unsigned long long qemuCmdFlags)
|
||||||
if (virAsprintf(&def->watchdog->info.alias, "watchdog%d", 0) < 0)
|
if (virAsprintf(&def->watchdog->info.alias, "watchdog%d", 0) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
}
|
}
|
||||||
|
if (def->memballoon) {
|
||||||
|
if (virAsprintf(&def->memballoon->info.alias, "balloon%d", 0) < 0)
|
||||||
|
goto no_memory;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -2296,8 +2300,17 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VirtIO balloon always at slot 3 by default */
|
/* VirtIO balloon always at slot 3 by default */
|
||||||
if (qemuDomainPCIAddressReserveSlot(addrs, 3) < 0)
|
if (def->memballoon &&
|
||||||
goto error;
|
def->memballoon->model == VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO &&
|
||||||
|
def->memballoon->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||||
|
def->memballoon->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||||
|
def->memballoon->info.addr.pci.domain = 0;
|
||||||
|
def->memballoon->info.addr.pci.bus = 0;
|
||||||
|
def->memballoon->info.addr.pci.slot = 3;
|
||||||
|
def->memballoon->info.addr.pci.function = 0;
|
||||||
|
if (qemuDomainPCIAddressReserveSlot(addrs, 3) < 0)
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < def->ndisks ; i++) {
|
for (i = 0; i < def->ndisks ; i++) {
|
||||||
if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
|
if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
|
||||||
|
@ -2912,6 +2925,29 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *
|
||||||
|
qemuBuildMemballoonDevStr(virDomainMemballoonDefPtr dev)
|
||||||
|
{
|
||||||
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
|
|
||||||
|
virBufferAddLit(&buf, "virtio-balloon-pci");
|
||||||
|
virBufferVSprintf(&buf, ",id=%s", dev->info.alias);
|
||||||
|
if (qemuBuildDeviceAddressStr(&buf, &dev->info) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
if (virBufferError(&buf)) {
|
||||||
|
virReportOOMError();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
|
error:
|
||||||
|
virBufferFreeAndReset(&buf);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
qemuBuildUSBInputDevStr(virDomainInputDefPtr dev)
|
qemuBuildUSBInputDevStr(virDomainInputDefPtr dev)
|
||||||
{
|
{
|
||||||
|
@ -4771,12 +4807,25 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||||
* NB: Earlier we declared that VirtIO balloon will always be in
|
* NB: Earlier we declared that VirtIO balloon will always be in
|
||||||
* slot 0x3 on bus 0x0
|
* slot 0x3 on bus 0x0
|
||||||
*/
|
*/
|
||||||
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
if (def->memballoon) {
|
||||||
ADD_ARG_LIT("-device");
|
if (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
|
||||||
ADD_ARG_LIT("virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3");
|
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
} else if (qemuCmdFlags & QEMUD_CMD_FLAG_BALLOON) {
|
_("Memory balloon device type '%s' is not supported by this version of qemu"),
|
||||||
ADD_ARG_LIT("-balloon");
|
virDomainMemballoonModelTypeToString(def->memballoon->model));
|
||||||
ADD_ARG_LIT("virtio");
|
goto error;
|
||||||
|
}
|
||||||
|
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
||||||
|
char *optstr;
|
||||||
|
ADD_ARG_LIT("-device");
|
||||||
|
|
||||||
|
optstr = qemuBuildMemballoonDevStr(def->memballoon);
|
||||||
|
if (!optstr)
|
||||||
|
goto error;
|
||||||
|
ADD_ARG(optstr);
|
||||||
|
} else if (qemuCmdFlags & QEMUD_CMD_FLAG_BALLOON) {
|
||||||
|
ADD_ARG_LIT("-balloon");
|
||||||
|
ADD_ARG_LIT("virtio");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_snapshot && current_snapshot->def->active) {
|
if (current_snapshot && current_snapshot->def->active) {
|
||||||
|
@ -6346,6 +6395,15 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
|
||||||
def->videos[def->nvideos++] = vid;
|
def->videos[def->nvideos++] = vid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!def->memballoon) {
|
||||||
|
virDomainMemballoonDefPtr memballoon;
|
||||||
|
if (VIR_ALLOC(memballoon) < 0)
|
||||||
|
goto no_memory;
|
||||||
|
memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO;
|
||||||
|
|
||||||
|
def->memballoon = memballoon;
|
||||||
|
}
|
||||||
|
|
||||||
VIR_FREE(nics);
|
VIR_FREE(nics);
|
||||||
|
|
||||||
if (!def->name) {
|
if (!def->name) {
|
||||||
|
|
|
@ -243,6 +243,8 @@ char * qemuBuildControllerDevStr(virDomainControllerDefPtr def);
|
||||||
|
|
||||||
char * qemuBuildWatchdogDevStr(virDomainWatchdogDefPtr dev);
|
char * qemuBuildWatchdogDevStr(virDomainWatchdogDefPtr dev);
|
||||||
|
|
||||||
|
char * qemuBuildMemballoonDevStr(virDomainMemballoonDefPtr dev);
|
||||||
|
|
||||||
char * qemuBuildUSBInputDevStr(virDomainInputDefPtr dev);
|
char * qemuBuildUSBInputDevStr(virDomainInputDefPtr dev);
|
||||||
|
|
||||||
char * qemuBuildSoundDevStr(virDomainSoundDefPtr sound);
|
char * qemuBuildSoundDevStr(virDomainSoundDefPtr sound);
|
||||||
|
|
|
@ -2360,6 +2360,8 @@ cleanup:
|
||||||
|
|
||||||
#define QEMU_PCI_PRODUCT_DISK_VIRTIO 0x1001
|
#define QEMU_PCI_PRODUCT_DISK_VIRTIO 0x1001
|
||||||
|
|
||||||
|
#define QEMU_PCI_PRODUCT_BALLOON_VIRTIO 0x1002
|
||||||
|
|
||||||
#define QEMU_PCI_PRODUCT_NIC_NE2K 0x8029
|
#define QEMU_PCI_PRODUCT_NIC_NE2K 0x8029
|
||||||
#define QEMU_PCI_PRODUCT_NIC_PCNET 0x2000
|
#define QEMU_PCI_PRODUCT_NIC_PCNET 0x2000
|
||||||
#define QEMU_PCI_PRODUCT_NIC_RTL8139 0x8139
|
#define QEMU_PCI_PRODUCT_NIC_RTL8139 0x8139
|
||||||
|
@ -2568,6 +2570,25 @@ qemuGetPCIWatchdogVendorProduct(virDomainWatchdogDefPtr def,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
qemuGetPCIMemballoonVendorProduct(virDomainMemballoonDefPtr def,
|
||||||
|
unsigned *vendor,
|
||||||
|
unsigned *product)
|
||||||
|
{
|
||||||
|
switch (def->model) {
|
||||||
|
case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO:
|
||||||
|
*vendor = QEMU_PCI_VENDOR_REDHAT;
|
||||||
|
*product = QEMU_PCI_PRODUCT_BALLOON_VIRTIO;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This entire method assumes that PCI devices in 'info pci'
|
* This entire method assumes that PCI devices in 'info pci'
|
||||||
* match ordering of devices specified on the command line
|
* match ordering of devices specified on the command line
|
||||||
|
@ -2649,7 +2670,7 @@ qemuDetectPCIAddresses(virDomainObjPtr vm,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (qemuAssignNextPCIAddress(&(vm->def->sounds[i]->info),
|
if (qemuAssignNextPCIAddress(&(vm->def->sounds[i]->info),
|
||||||
vendor, product,
|
vendor, product,
|
||||||
addrs, naddrs) < 0) {
|
addrs, naddrs) < 0) {
|
||||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("cannot find PCI address for sound adapter %s"),
|
_("cannot find PCI address for sound adapter %s"),
|
||||||
|
@ -2671,6 +2692,18 @@ qemuDetectPCIAddresses(virDomainObjPtr vm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm->def->memballoon &&
|
||||||
|
qemuGetPCIMemballoonVendorProduct(vm->def->memballoon, &vendor, &product) == 0) {
|
||||||
|
if (qemuAssignNextPCIAddress(&(vm->def->memballoon->info),
|
||||||
|
vendor, product,
|
||||||
|
addrs, naddrs) < 0) {
|
||||||
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("cannot find PCI address for balloon %s"),
|
||||||
|
virDomainMemballoonModelTypeToString(vm->def->memballoon->model));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX console (virtio) */
|
/* XXX console (virtio) */
|
||||||
|
|
||||||
|
|
||||||
|
@ -2678,8 +2711,6 @@ qemuDetectPCIAddresses(virDomainObjPtr vm,
|
||||||
|
|
||||||
/* XXX USB controller ? */
|
/* XXX USB controller ? */
|
||||||
|
|
||||||
/* XXXX virtio balloon ? */
|
|
||||||
|
|
||||||
/* XXX what about other PCI devices (ie bridges) */
|
/* XXX what about other PCI devices (ie bridges) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -59,6 +59,7 @@ cat <<\EOF > D.xml || fail=1
|
||||||
</console>
|
</console>
|
||||||
<sound model='pcspk'/>
|
<sound model='pcspk'/>
|
||||||
<sound model='es1370'/>
|
<sound model='es1370'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x12
|
|
@ -0,0 +1,25 @@
|
||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory>219200</memory>
|
||||||
|
<currentMemory>219200</currentMemory>
|
||||||
|
<vcpu>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
<target dev='hda' bus='ide'/>
|
||||||
|
</disk>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0' bus='0' slot='18' function='0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -21,5 +21,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='fdc' index='0'/>
|
<controller type='fdc' index='0'/>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -21,5 +21,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<source path='/tmp/guestfwd'/>
|
<source path='/tmp/guestfwd'/>
|
||||||
<target type='guestfwd' address='10.0.2.1' port='4600'/>
|
<target type='guestfwd' address='10.0.2.1' port='4600'/>
|
||||||
</channel>
|
</channel>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -47,5 +47,6 @@
|
||||||
<target type='virtio' name='org.linux-kvm.port.lla'/>
|
<target type='virtio' name='org.linux-kvm.port.lla'/>
|
||||||
<address type='virtio-serial' controller='2' bus='0'/>
|
<address type='virtio-serial' controller='2' bus='0'/>
|
||||||
</channel>
|
</channel>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -27,5 +27,6 @@
|
||||||
<target type='virtio' name='org.linux-kvm.port.foo'/>
|
<target type='virtio' name='org.linux-kvm.port.foo'/>
|
||||||
<address type='virtio-serial' controller='1' bus='0' port='3'/>
|
<address type='virtio-serial' controller='1' bus='0' port='3'/>
|
||||||
</channel>
|
</channel>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='0'/>
|
<address type='drive' controller='0' bus='1' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -31,5 +31,6 @@
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='fdc' index='0'/>
|
<controller type='fdc' index='0'/>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -35,5 +35,6 @@
|
||||||
<address type='drive' controller='0' bus='1' unit='1'/>
|
<address type='drive' controller='0' bus='1' unit='1'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
<source file='/tmp/usbdisk.img'/>
|
<source file='/tmp/usbdisk.img'/>
|
||||||
<target dev='sda' bus='usb'/>
|
<target dev='sda' bus='usb'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<target dev='sda' bus='usb'/>
|
<target dev='sda' bus='usb'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -34,5 +34,6 @@
|
||||||
<target dev='vdb' bus='virtio'/>
|
<target dev='vdb' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -34,5 +34,6 @@
|
||||||
<target dev='xvdg' bus='xen'/>
|
<target dev='xvdg' bus='xen'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
</encryption>
|
</encryption>
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
<controller type='fdc' index='0'/>
|
<controller type='fdc' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='vga' vram='9216' heads='1'/>
|
<model type='vga' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='cirrus' vram='9216' heads='1'/>
|
<model type='cirrus' vram='9216' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<address bus='14' device='6'/>
|
<address bus='14' device='6'/>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<address bus='14' device='6'/>
|
<address bus='14' device='6'/>
|
||||||
</source>
|
</source>
|
||||||
</hostdev>
|
</hostdev>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -21,5 +21,6 @@
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
<input type='mouse' bus='usb'/>
|
<input type='mouse' bus='usb'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -21,5 +21,6 @@
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
<input type='tablet' bus='usb'/>
|
<input type='tablet' bus='usb'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<video>
|
<video>
|
||||||
<model type='xen' vram='4096' heads='1'/>
|
<model type='xen' vram='4096' heads='1'/>
|
||||||
</video>
|
</video>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<script path='/etc/qemu-ifup'/>
|
<script path='/etc/qemu-ifup'/>
|
||||||
<target dev='nic02'/>
|
<target dev='nic02'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -29,5 +29,6 @@
|
||||||
<script path='/etc/qemu-ifup'/>
|
<script path='/etc/qemu-ifup'/>
|
||||||
<model type='e1000'/>
|
<model type='e1000'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<mac address='00:11:22:33:44:55'/>
|
<mac address='00:11:22:33:44:55'/>
|
||||||
<script path='/etc/qemu-ifup'/>
|
<script path='/etc/qemu-ifup'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -23,5 +23,6 @@
|
||||||
<interface type='user'>
|
<interface type='user'>
|
||||||
<mac address='00:11:22:33:44:55'/>
|
<mac address='00:11:22:33:44:55'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
<mac address='00:11:22:33:44:55'/>
|
<mac address='00:11:22:33:44:55'/>
|
||||||
<model type='virtio'/>
|
<model type='virtio'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
<mac address='00:11:22:33:44:55'/>
|
<mac address='00:11:22:33:44:55'/>
|
||||||
<model type='virtio'/>
|
<model type='virtio'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<mac address='00:11:22:33:44:55'/>
|
<mac address='00:11:22:33:44:55'/>
|
||||||
<model type='virtio'/>
|
<model type='virtio'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<protocol type='raw'/>
|
<protocol type='raw'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</parallel>
|
</parallel>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
<protocol type='raw'/>
|
<protocol type='raw'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</parallel>
|
</parallel>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source path='/dev/ttyS2'/>
|
<source path='/dev/ttyS2'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source path='/dev/ttyS2'/>
|
<source path='/dev/ttyS2'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source path='/tmp/serial.log'/>
|
<source path='/tmp/serial.log'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source path='/tmp/serial.log'/>
|
<source path='/tmp/serial.log'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='pty'>
|
<console type='pty'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<protocol type='raw'/>
|
<protocol type='raw'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<protocol type='telnet'/>
|
<protocol type='telnet'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<protocol type='telnet'/>
|
<protocol type='telnet'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<protocol type='raw'/>
|
<protocol type='raw'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<source mode='connect' host='127.0.0.1' service='9998'/>
|
<source mode='connect' host='127.0.0.1' service='9998'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<source mode='connect' host='127.0.0.1' service='9998'/>
|
<source mode='connect' host='127.0.0.1' service='9998'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source mode='connect' path='/tmp/serial.sock'/>
|
<source mode='connect' path='/tmp/serial.sock'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -28,5 +28,6 @@
|
||||||
<source mode='connect' path='/tmp/serial.sock'/>
|
<source mode='connect' path='/tmp/serial.sock'/>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='vc'>
|
<console type='vc'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
<console type='vc'>
|
<console type='vc'>
|
||||||
<target port='0'/>
|
<target port='0'/>
|
||||||
</console>
|
</console>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
<sound model='es1370'/>
|
<sound model='es1370'/>
|
||||||
<sound model='sb16'/>
|
<sound model='sb16'/>
|
||||||
<sound model='ac97'/>
|
<sound model='ac97'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<sound model='es1370'/>
|
<sound model='es1370'/>
|
||||||
<sound model='sb16'/>
|
<sound model='sb16'/>
|
||||||
<sound model='ac97'/>
|
<sound model='ac97'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
|
@ -19,5 +19,6 @@
|
||||||
<target dev='hda' bus='ide'/>
|
<target dev='hda' bus='ide'/>
|
||||||
</disk>
|
</disk>
|
||||||
<watchdog model='ib700' action='poweroff'/>
|
<watchdog model='ib700' action='poweroff'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue