Hide Forgot
Description of problem: trying to generate snapshot command (from vdsm) failed on the following libvirt error: Libvirt Error: ============== Traceback (most recent call last): File "/usr/share/vdsm/libvirtvm.py", line 1226, in snapshot libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) File "/usr/share/vdsm/libvirtvm.py", line 458, in f ret = attr(*args, **kwargs) File "/usr/share/vdsm/libvirtconnection.py", line 79, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1310, in snapshotCreateXML if ret is None:raise libvirtError('virDomainSnapshotCreateXML() failed', dom=self) libvirtError: unsupported configuration: source for disk 'vdb' is not a regular file; refusing to generate external snapshot name Snapshot Request ================ <domainsnapshot> <disks> <disk name="vda" snapshot="external"> <source file="/rhev/data-center/2b027b34-cb8f-4315-a544-65a7ae888178/48939185-3631-42dd-b39c-f59175a3df38/images/f75a5ee2-54dc-45b0-a412-853b1b240dea/1017b8f7-8ba4-4e90-9f65-d57cca0fd8f6"/> </disk> </disks> </domainsnapshot> Domain Definition ================= <?xml version="1.0" encoding="utf-8"?> <domain type="kvm"> <name>Fed4</name> <uuid>6bc41e20-348b-4ccd-b4cd-21bd243bbe83</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <devices> <disk device="disk" type="block"> <source dev="/rhev/data-center/2b027b34-cb8f-4315-a544-65a7ae888178/48939185-3631-42dd-b39c-f59175a3df38/images/4363969c-ecee-4a6d-ad91-7267860e0061/612fccf4-dac7-4d39-9665-fbfd42136739"/> <target bus="virtio" dev="vda"/> <serial>6d-ad91-7267860e0061</serial> <driver cache="none" error_policy="stop" io="native" name="qemu" type="qcow2"/> </disk> <disk device="disk" type="block"> <source dev="/rhev/data-center/2b027b34-cb8f-4315-a544-65a7ae888178/48939185-3631-42dd-b39c-f59175a3df38/images/f75a5ee2-54dc-45b0-a412-853b1b240dea/fd3a4083-45b9-45a5-ba67-98f3cf49fd4d"/> <target bus="virtio" dev="vdb"/> <serial>b0-a412-853b1b240dea</serial> <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw"/> </disk> <disk device="cdrom" type="file"> <target bus="ide" dev="hdc"/> </disk> <controller index="0" ports="16" type="virtio-serial"/> <channel type="unix"> <target name="com.redhat.rhevm.vdsm" type="virtio"/> <source mode="bind" path="/var/lib/libvirt/qemu/channels/Fed4.com.redhat.rhevm.vdsm"/> </channel> <memballoon model="none"/> <interface type="bridge"> <mac address="00:1a:4a:16:01:5d"/> <model type="virtio"/> <source bridge="engine"/> </interface> <input bus="ps2" type="mouse"/> <video> <model heads="1" type="qxl" vram="65536"/> </video> <channel type="spicevmc"> <target name="com.redhat.spice.0" type="virtio"/> </channel> <graphics autoport="yes" keymap="en-us" passwd="*****" passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice"> <channel mode="secure" name="main"/> <channel mode="secure" name="inputs"/> <listen network="vdsm-engine" type="network"/> </graphics> </devices> <os> <type arch="x86_64" machine="pc-0.14">hvm</type> <boot dev="hd"/> <smbios mode="sysinfo"/> </os> <sysinfo type="smbios"> <system> <entry name="manufacturer">Red Hat</entry> <entry name="product">RHEV Hypervisor</entry> <entry name="version">16-1</entry> <entry name="serial">44454C4C-5700-1035-8056-B8C04F4A4E31_00:26:B9:67:14:7B</entry> <entry name="uuid">6bc41e20-348b-4ccd-b4cd-21bd243bbe83</entry> </system> </sysinfo> <clock adjustment="0" offset="variable"> <timer name="rtc" tickpolicy="catchup"/> </clock> <features> <acpi/> </features> <cpu match="exact"> <model>Opteron_G1</model> <topology cores="1" sockets="1" threads="1"/> </cpu> </domain> libvirt git: commit 98b942c6f51f0b383f9438fe1ec678b6e8c4984e vdsm git: commit 67800f45d6c776a9964327429ff6ddc8feea353a attached snapshot script as well.
Created attachment 549001 [details] snapshot script
Not a bug. Neither the domain XML nor the snapshot XML told libvirt that vdb was intentionally going to be omitted from the snapshot. And since vdb is a block device, libvirt refuses to guess what qcow2 file name to create around the block device as a backing file. Try this snapshot request instead for a one-shot way to ignore vdb: <domainsnapshot> <disks> <disk name="vda" snapshot="external"> <source file="/rhev/data-center/2b027b34-cb8f-4315-a544-65a7ae888178/48939185-3631-42dd-b39c-f59175a3df38/images/f75a5ee2-54dc-45b0-a412-853b1b240dea/1017b8f7-8ba4-4e90-9f65-d57cca0fd8f6"/> </disk> <disk name='vdb' snapshot='no'/> </disks> </domainsnapshot> or in the <domain> xml, set <disk device="disk" type="block" snapshot='no'> to set the defaults for that disk for all snapshot requests.
changing competent to vdsm to implement correct behivior: case here: - live snapshot with 2 disks
Fixed in: http://gerrit.ovirt.org/469 commit f56159d59e29ace09a53bfcf46c5ba836262f730 Author: Federico Simoncelli <fsimonce> Date: Thu Sep 15 20:10:24 2011 +0000 Implement VMs live snapshots
(In reply to comment #5) > Fixed in: http://gerrit.ovirt.org/469 > > commit f56159d59e29ace09a53bfcf46c5ba836262f730 > Author: Federico Simoncelli <fsimonce> > Date: Thu Sep 15 20:10:24 2011 +0000 > > Implement VMs live snapshots Federico, please mention on which vdsm build its fixed upon so we can verify.
closing ON_QA bugs as oVirt 3.1 was released: http://www.ovirt.org/get-ovirt/