virtinst: Support transient.shareBacking option
Implement "<transient shareBacking=yes/>" to virtinst to allow a transient disk to be shared across VMs. It is introduced to libvirt since: 75871da0ec qemu: Allow <transient> disks with images shared accross VMs Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Han Han <hhan@redhat.com>
This commit is contained in:
parent
8ef556773d
commit
a1ddd23c89
|
@ -216,6 +216,7 @@
|
|||
<driver name="qemu" type="raw"/>
|
||||
<source file="/var/lib/libvirt/images/disk.img"/>
|
||||
<target dev="vdp" bus="virtio"/>
|
||||
<transient shareBacking="yes"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<driver name="qemu" type="raw" cache="none" io="native"/>
|
||||
|
|
|
@ -608,7 +608,7 @@ vcpus.vcpu1.id=2,vcpus.vcpu1.enabled=yes
|
|||
--disk path=/dev/disk-pool/diskvol7,device=lun,bus=scsi,reservations.managed=no,reservations.source.type=unix,reservations.source.path=/var/run/test/pr-helper0.sock,reservations.source.mode=client,\
|
||||
source.reservations.managed=no,source.reservations.source.type=unix,source.reservations.source.path=/var/run/test/pr-helper0.sock,source.reservations.source.mode=client,target.rotation_rate=6000
|
||||
--disk vol=iscsi-direct/unit:0:0:1
|
||||
--disk size=.0001,format=raw
|
||||
--disk size=.0001,format=raw,transient=on,transient.shareBacking=yes
|
||||
--disk size=.0001,pool=disk-pool
|
||||
--disk path=%(EXISTIMG1)s,type=dir
|
||||
--disk path=/fooroot.img,size=.0001,transient=on
|
||||
|
|
|
@ -3441,6 +3441,7 @@ class ParserDisk(VirtCLIParser):
|
|||
cls.add_arg("readonly", "read_only", is_onoff=True)
|
||||
cls.add_arg("shareable", "shareable", is_onoff=True)
|
||||
cls.add_arg("transient", "transient", is_onoff=True)
|
||||
cls.add_arg("transient.shareBacking", "transient_shareBacking", is_onoff=True)
|
||||
|
||||
cls.add_arg("target.bus", "bus")
|
||||
cls.add_arg("target.removable", "removable", is_onoff=True)
|
||||
|
|
|
@ -476,6 +476,7 @@ class DeviceDisk(Device):
|
|||
read_only = XMLProperty("./readonly", is_bool=True)
|
||||
shareable = XMLProperty("./shareable", is_bool=True)
|
||||
transient = XMLProperty("./transient", is_bool=True)
|
||||
transient_shareBacking = XMLProperty("./transient/@shareBacking", is_yesno=True)
|
||||
driver_cache = XMLProperty("./driver/@cache")
|
||||
driver_discard = XMLProperty("./driver/@discard")
|
||||
driver_detect_zeroes = XMLProperty("./driver/@detect_zeroes")
|
||||
|
|
Loading…
Reference in New Issue