[CentOS-virt] IDE mapping to SATA in virtual guest

Bradley Leonard bradley at stygianresearch.com
Thu Mar 15 12:22:27 EDT 2012


I'm trying to map a logical volume (sata) as an ide drive from my centos
6.2 host to my centos 6.2 guest.

Here is xml snippet:

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/VolGroup02/LogVol00'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>

Dmesg shows this:

sd 0:0:0:0: [sda] 5859368960 512-byte logical blocks: (2.99 TB/2.72 TiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
 sda: unknown partition table
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0

Inside the guest, it shows up as a sata drive:

[root at nemedia ~]# sfdisk -l /dev/sda

Disk /dev/sda: 364728 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sda: unrecognized partition table type
No partitions found
[root at nemedia ~]# sfdisk -l /dev/hda
/dev/hda: No such file or directory

sfdisk: cannot open /dev/hda for reading

I don't see how this would be a problem except for the fact that no matter
what kind of filesystem I try to create on /dev/sda from the guest, I get
errors when I try to mount it.  No matter what I do, I cannot mount any
filesystem from that device inside the guest.

Both the cdrom and block device are showing up as scsi devices even though
I'm passing them through as ide devices.

Am I doing something wrong or am I missing something completely?

I've try searching for solution or a hint, but I must not be searching for
the right thing.

Can anybody provide me some advice or point me somewhere?

Thanks in advance.

Bradley Leonard
EMail:  bradley at stygianresearch.com

Rob   - "The hills are alive with the..the..sound of monkeys?"
Bucky - "It's in the key of delicious."

Life is simple. Humans make it complicated.

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the CentOS-virt mailing list