1
votes

I created virtual disk and I try to load CentOS7 using libvrt. It creates partitions which consists of virtual device file vda.

When I tried to load Debian using VMWare, It creates partitions which consists of device file sda.

Actually the purpose of having CentOS and Debain OS VM is to collect rootfs and initrd and then to load over a third party bootloader.

Bootloader is trying to load rootfs over partition /dev/sda*. Hence Debain is working fine whereas CentOS fails to come up saying that No such Partition /dev/sda*.

Hence is it possible to have sda instead of vda? I tried to change xml for VM name, it didn't help.

1

1 Answers

-1
votes

The device names for the partitions shouldn't matter. These days you should only refer to filesystems by their UUIDs. Some distributions still use the drive names on occasions so one of the first things I do is edit /etc/fstab to use the UUIDs. You can find the UUID for a /dev/[sv]da* device with the 'blkid' command.

Having said that, the names that the drives get depend on the type of the device which is presented to the guest by the hypervisor. If I'm not mistaken, vda is for virtio-blk devices. This type is best for performance and I will strongly suggest you make your guest systems work with it. If not, you should change the type of the disk bus to SATA. Then the emulated disk will show up as /dev/sda - I just checked this. I imagine SCSI will work as well. But be warned - in this case a real SATA/SCSI controller is emulated and the performance may suffer.