[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] How to get the real device in guest os after attached a disk?



On Wed, Jul 18, 2012 at 5:01 AM, Wangpan <hzwangpan 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]