[ovirt-users] payload device serial
Pavel Gashev
Pax at acronis.com
Thu Mar 31 12:32:37 UTC 2016
Here you go https://bugzilla.redhat.com/show_bug.cgi?id=1322842
From: Francesco Romani <fromani at redhat.com<mailto:fromani at redhat.com>>
Date: Thursday 31 March 2016 at 09:46
To: Pavel Gashev <Pax at acronis.com<mailto:Pax at acronis.com>>
Cc: "users at ovirt.org<mailto:users at ovirt.org>" <users at ovirt.org<mailto:users at ovirt.org>>
Subject: Re: [ovirt-users] payload device serial
Thanks for the report!
Could you please file a Vdsm bug?
Bests,
________________________________
From: "Pavel Gashev" <Pax at acronis.com<mailto:Pax at acronis.com>>
To: users at ovirt.org<mailto: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<mailto: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/1673f089/attachment-0001.html>
More information about the Users
mailing list