[libvirt-users] SCSI/IDE Devices in Guest

Douglas Russell root at dpwrussell.com
Tue Oct 30 14:46:29 UTC 2012

I'm experimenting with how to attach storage to a guest virtual machine (I
sent another message to th elist about that as it's slightly different)

Looking in the XML files for my virtual machine, I see this:

<disk type='file' device='disk'>
  <driver name='qemu' type='qcow2'/>
  <source file='/vm/myvm/tmpeuiVc9.qcow2'/>
  <target dev='hda' bus='ide'/>
  <address type='drive' controller='0' bus='0' unit='0'/>

However, /dev/hda is not a device in the guest. It is /dev/sda. It's not
really a problem in it's own right, but it's one of several connected
things which don't make sense. Is there some explanation for this?

I believe this is linked to some weirdness when I attach some extra storage
like so:

virsh attach-disk myvm /dev/lvm-group1/mystorage sdb --driver qemu

This adds the following stanza:

<disk type='block' device='disk'>
  <driver name='qemu' type='raw'/>
  <source dev='/dev/lvm-group1/mystorage'/>
  <target dev='sdb' bus='scsi'/>
  <address type='drive' controller='0' bus='0' unit='1'/>

Looks about right. In the guest though, it pushes /dev/sda (root and swap
are here on sda1 and sda2) upto /dev/sdb (sdb1 and sdb2). Somehow it still
boots correctly despite fstab referrencing /dev/sda1 and /dev/sda2 for /
and swap. The new /dev/sda is this storage I tried to add as sdb. What
could be causing this?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121030/2669beff/attachment.htm>

More information about the libvirt-users mailing list