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@redhat.com
Subject: Re: How to get the real device in guest os after attached a disk?
Date: Tue, 17 Jul 2012 12:56:15 +0100	[thread overview]
Message-ID: <CAJSP0QVaQZ6JJvC=D35mw4-Hy_qF_T6sYcQgvSYkMm4s+KcFEQ@mail.gmail.com> (raw)
In-Reply-To: <1936723074.42171.1342496460585.JavaMail.hzwangpan@corp.netease.com>

On Tue, Jul 17, 2012 at 4:40 AM, Wangpan <hzwangpan@corp.netease.com> wrote:
> I have a question as the subject above, the reason I want to know this is that, if I attach some disks on the guest,
> for example, I specified /dev/vdc&/dev/vdd(target device) at the cmd line by using 'virsh attach-disk', but they may be /dev/vdb&/dev/vdc in the guest os,
> so if the guest user want to detach the /dev/vdb(guest device), he\she will be confused with the two target devices /dev/vdb&/dev/vdc,
> because he\she doesn't know the corresponding relation of the guest device and target device,
> he\she may detach an error device /dev/vdd(target device) which corresponding to /dev/vdc(guest device).
>
> Could anyone give me some idea?

You can use the virtio-blk serial or file system/volume labels to
distinguish them.

For libvirt disk <serial> information, see the Domain XML documentation:
http://libvirt.org/formatdomain.html#elementsDisks

Stefan

  reply	other threads:[~2012-07-17 11:56 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 [this message]
2012-07-18  4:01   ` Wangpan
2012-07-18  8:21     ` Stefan Hajnoczi

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='CAJSP0QVaQZ6JJvC=D35mw4-Hy_qF_T6sYcQgvSYkMm4s+KcFEQ@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.