[ovirt-users] payload device serial
Francesco Romani
fromani at redhat.com
Thu Mar 31 06:46:19 UTC 2016
Thanks for the report!
Could you please file a Vdsm bug?
Bests,
----- Original Message -----
> From: "Pavel Gashev" <Pax at acronis.com>
> To: users at ovirt.org
> Sent: Wednesday, March 30, 2016 4:39:14 PM
> Subject: [ovirt-users] payload device serial
> Hello,
> I hit a bug, and just want to share a solution.
> VM with a payload (Initial run) do not start with libvirt >= 1.3.2. VDSM log
> says: "libvirtError: unsupported configuration: Disks 'hdc' and 'hdd' have
> identical serial".
> Yes, both cdrom devices have the same serial. Empty serial:
> <disk device="cdrom" snapshot="no" type="file">
> <source
> file="/var/run/vdsm/payload/2eaf9c8e-2123-4b48-9b62-f96168ac7a36.41f22cb1676858ad4e22e8440519032d.img"
> startupPolicy="optional"/>
> <target bus="ide" dev="hdd"/>
> <readonly/>
> <serial/>
> </disk>
> <disk device="cdrom" snapshot="no" type="file">
> <source file="" startupPolicy="optional"/>
> <target bus="ide" dev="hdc"/>
> <readonly/>
> <serial/>
> </disk>
> I don't know where is the issue. Either libvirt should work with empty
> serials, or VDSM should generate serial at least for payload device.
> Related bug - https://bugzilla.redhat.com/show_bug.cgi?id=1245013
> Quick fix is to install a VDSM hook to
> /usr/libexec/vdsm/hooks/before_vm_start:
> ---------- cut here ----------
> #!/usr/bin/python
> import hooking
> import uuid
> domxml = hooking.read_domxml()
> for disk in domxml.getElementsByTagName('disk'):
> if disk.getAttribute('device') == 'cdrom':
> for source in disk.getElementsByTagName('source'):
> if source.getAttribute('file').find('/payload/') > 0:
> for serial in disk.getElementsByTagName('serial'):
> if not serial.hasChildNodes():
> serial.appendChild(domxml.createTextNode(str(uuid.uuid4())))
> hooking.write_domxml(domxml)
> ---------- cut here ----------
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160331/e0959a0c/attachment-0001.html>
More information about the Users
mailing list