<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><base href="x-msg://8209/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 14, 2012, at 7:55 PM, "Wangpan"<<a href="mailto:hzwangpan@corp.netease.com">hzwangpan@corp.netease.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div marginheight="0" marginwidth="0" style="font-size: 12pt; font-family: 宋体, serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; line-height: 1.3; border-width: 0px; margin: 12px; "><div>How about using the pci address as the UUID of target devices in one VM?</div><div>the pci address is generated by libvirt and we can see it in VM by cmd "ls -la /sys/block/",</div><div>and it has no dependency with the kernel version, I can see it in 2.6.32*</div><div>when an user attached a disk to VM, we find a free target dev such as vdd(the user doesn't need to assign one) to attach and return the pci address to user,</div><div>the disk is consistent when user see it on horizon and in VM(by cmd "ls -la /sys/block/").</div><div> </div><div>libvirt:<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/></div><div>ls -la /sys/block/:vda -> ../devices/pci-0000:00/0000:00:04.0/virtio1/block/vda</div></div></blockquote><br></div><div>This is definitely another solution, although it seems less usable than the device serial number which can be an arbitrary string. If this works for xen though, that would be a plus.</div><div><br></div><div>Vish</div><br></body></html>