mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemu: Don't assign alias to disabled balloon device
<memballoon model='none'/> is the only way to disable balloon driver since libvirt will add one automatically if the memballoon element is missing. In other words, there's no balloon device if model is 'none' and generating an alias for it makes no sense. The alias will be ignored when parsing the XML and it will disappear once libvirtd is restarted. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
8ef5db6581
commit
1554eafbe6
@ -612,7 +612,8 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
|
||||
if (qemuAssignDeviceWatchdogAlias(def->watchdog) < 0)
|
||||
return -1;
|
||||
}
|
||||
if (def->memballoon) {
|
||||
if (def->memballoon &&
|
||||
def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) {
|
||||
if (qemuAssingDeviceMemballoonAlias(def->memballoon, 0) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
@ -50,9 +50,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -60,9 +60,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -50,9 +50,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -59,9 +59,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -59,9 +59,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -49,9 +49,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -40,9 +40,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
|
@ -66,9 +66,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -54,9 +54,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -54,9 +54,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -54,9 +54,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -44,9 +44,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<shmem name='shmem0'>
|
||||
<model type='ivshmem-plain'/>
|
||||
<size unit='M'>4</size>
|
||||
|
@ -44,9 +44,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
<shmem name='shmem0'>
|
||||
<model type='ivshmem-plain'/>
|
||||
<size unit='M'>4</size>
|
||||
|
@ -50,9 +50,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -48,9 +48,7 @@
|
||||
<alias name='ua-UserWatchdog'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
||||
</watchdog>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -48,9 +48,7 @@
|
||||
<alias name='watchdog0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
||||
</watchdog>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -44,9 +44,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -48,9 +48,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
@ -58,9 +58,7 @@
|
||||
<input type='keyboard' bus='ps2'>
|
||||
<alias name='input1'/>
|
||||
</input>
|
||||
<memballoon model='none'>
|
||||
<alias name='balloon0'/>
|
||||
</memballoon>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
<seclabel type='none' model='none'/>
|
||||
</domain>
|
||||
|
Loading…
Reference in New Issue
Block a user