mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
disk: Fix virt-xml --add-device --disk size=X
This commit is contained in:
parent
c82042245b
commit
9b2e6886d0
@ -0,0 +1,13 @@
|
||||
<panic>
|
||||
<address type="isa" iobase="0x505"/>
|
||||
</panic>
|
||||
+ <disk type="file" device="disk">
|
||||
+ <source file="/var/lib/libvirt/images/test-for-virtxml.qcow2"/>
|
||||
+ <target dev="hdb" bus="ide"/>
|
||||
+ </disk>
|
||||
</devices>
|
||||
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
</domain>
|
||||
|
||||
Domain 'test-for-virtxml' defined successfully.
|
||||
Changes will take effect after the domain is fully powered off.
|
@ -967,6 +967,7 @@ c.add_compare("--add-device --sound pcspk", "add-sound")
|
||||
c.add_compare("--add-device --disk %(EXISTIMG1)s,bus=virtio,target=vdf", "add-disk-basic")
|
||||
c.add_compare("--add-device --disk %(EXISTIMG1)s", "add-disk-notarget") # filling in acceptable target
|
||||
c.add_compare("--add-device --disk %(NEWIMG1)s,size=.01", "add-disk-create-storage")
|
||||
c.add_compare("--add-device --disk size=.01", "add-disk-default-storage")
|
||||
c.add_compare("--remove-device --sound ich6", "remove-sound-model", check_version="1.3.5") # check_version=new graphics listen output
|
||||
c.add_compare("--remove-device --disk 3", "remove-disk-index")
|
||||
c.add_compare("--remove-device --disk /dev/null", "remove-disk-path")
|
||||
|
@ -413,6 +413,8 @@ class DeviceDisk(Device):
|
||||
def get_vol_object(self):
|
||||
return self._storage_backend.get_vol_object()
|
||||
def get_vol_install(self):
|
||||
if not self._storage_backend:
|
||||
return None
|
||||
return self._storage_backend.get_vol_install()
|
||||
def get_parent_pool(self):
|
||||
if self.get_vol_install():
|
||||
|
Loading…
Reference in New Issue
Block a user