[libvirt] How to get the real device in guest os after attached a disk?
Stefan Hajnoczi
stefanha at gmail.com
Wed Jul 18 08:21:06 UTC 2012
On Wed, Jul 18, 2012 at 5:01 AM, Wangpan <hzwangpan at corp.netease.com> wrote:
> But how can I get the serial info in the guest os?
General documentation on persistent block device naming (just grabbed
the first useful link of Google):
https://wiki.archlinux.org/index.php/Persistent_block_device_naming
If your guest is recent enough it will automatically show the
virtio-blk device in /dev/disk/by-id.
If not, you may be able to check /sys/block/vda/serial yourself. If
that file is not present either your guest doesn't support virtio-blk
serial: either upgrade to a newer guest OS version or use one of the
other persistent naming mechanisms explained in the link above.
Stefan
More information about the libvir-list
mailing list