All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Wangpan <hzwangpan@corp.netease.com>
Cc: kvm <kvm@vger.kernel.org>, Ryan Harper <ryanh@linux.vnet.ibm.com>,
	libvir-list <libvir-list@redhat.com>
Subject: Re: Re: How to get the real device in guest os after attached a disk?
Date: Wed, 18 Jul 2012 09:21:06 +0100	[thread overview]
Message-ID: <CAJSP0QWrNMrr5cO-2dJM4Q9SjrD316zq4eBP=GLH-2=kFxvi-A@mail.gmail.com> (raw)
In-Reply-To: <1951555288.45486.1342584074069.JavaMail.hzwangpan@corp.netease.com>

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

      reply	other threads:[~2012-07-18  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17  3:40 How to get the real device in guest os after attached a disk? Wangpan
2012-07-17 11:56 ` Stefan Hajnoczi
2012-07-18  4:01   ` Wangpan
2012-07-18  8:21     ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJSP0QWrNMrr5cO-2dJM4Q9SjrD316zq4eBP=GLH-2=kFxvi-A@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=hzwangpan@corp.netease.com \
    --cc=kvm@vger.kernel.org \
    --cc=libvir-list@redhat.com \
    --cc=ryanh@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.