<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Thanks for the report!<br></div><div><br></div><div>Could you please file a Vdsm bug?<br></div><div><br></div><div>Bests,<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Pavel Gashev" <Pax@acronis.com><br><b>To: </b>users@ovirt.org<br><b>Sent: </b>Wednesday, March 30, 2016 4:39:14 PM<br><b>Subject: </b>[ovirt-users] payload device serial<br><div><br></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Hello,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
I hit a bug, and just want to share a solution.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
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".</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Yes, both cdrom devices have the same serial. Empty serial:</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <disk device="cdrom" snapshot="no" type="file"></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <source file="/var/run/vdsm/payload/2eaf9c8e-2123-4b48-9b62-f96168ac7a36.41f22cb1676858ad4e22e8440519032d.img" startupPolicy="optional"/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <target bus="ide" dev="hdd"/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <readonly/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <serial/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> </disk></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <disk device="cdrom" snapshot="no" type="file"></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <source file="" startupPolicy="optional"/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <target bus="ide" dev="hdc"/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <readonly/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> <serial/></span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> </disk></span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
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.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Related bug - <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1245013" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1245013</a><br data-mce-bogus="1"></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Quick fix is to install a VDSM hook to /usr/libexec/vdsm/hooks/before_vm_start:</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
---------- cut here ----------</div>
<div>
<div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif">#!/usr/bin/python</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"><br>
</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif">import hooking</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif">import uuid</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"><br>
</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif">domxml = hooking.read_domxml()</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"><br>
</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif">for disk in domxml.getElementsByTagName('disk'):</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> if disk.getAttribute('device') == 'cdrom':</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> for source in disk.getElementsByTagName('source'):</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> if source.getAttribute('file').find('/payload/') > 0:</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> for serial in disk.getElementsByTagName('serial'):</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> if not serial.hasChildNodes():</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> serial.appendChild(domxml.createTextNode(str(uuid.uuid4())))</span></div>
<div><span style="font-family: Calibri,sans-serif;" data-mce-style="font-family: Calibri,sans-serif;" face="Calibri,sans-serif"> hooking.write_domxml(domxml)</span></div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
---------- cut here ----------</div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
<br>_______________________________________________<br>Users mailing list<br>Users@ovirt.org<br>http://lists.ovirt.org/mailman/listinfo/users<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Francesco Romani<br>RedHat Engineering Virtualization R & D<br>Phone: 8261328<br>IRC: fromani<span name="x"></span><br></div></div></body></html>