I'm running a installation of XenServer 6.2 where I've imported a .ova.
The .ova is an image of a linux-system from a previous vmware esxi environment.
The problem is that since the linux-image doesn't support all disk controllers, I would like to change the driver inside XenServer for the vmdk disk.
I've had the same problem when running the exact same image on a qemu-kvm system. I solved it by just changing the disk controller in virt-manager (or in the vm.xml) for the virtual machine.
But I can't seem to find this option in XenServer.
Any tips?
Best Answer
I'm not sure I understood your question. If I did, you managed to successfully import a Linux-based VM. However, your VM won't boot because its kernel cannot recognise the disk controller exposed by XenServer. And you would like to have access to your VM's disk so that you can tweak the drivers loaded.
Because Linux guests are (by default) paravirtualised, your guest's kernel should have realised it is being virtualised by Xen and loaded a kernel driver called blkfront. This driver will pick up on any disks exposed by the backend (for that VM) and present as /dev/xvd_ in your guest.
Nevertheless, you can see that VDI from dom0. Using the command-line interface, you can find out where the disks for your VMs are and (possibly) access them.
The following command should give you the UUID of your VM (named VMNAME):
Next, you can find out any Virtual Disk Images (VDIs) associated with your VM like this:
You can access these VDIs from dom0 using the
with_vdi
helper script. Considering you want to access VDI with UUID 06612a19-d9ba-49f8-9f75-6c9d5a9aaef6, you can run:You will now be in a shell and
/dev/$DEVICE
will be a block device representation of that VDI. You can, for example, look at that VDI's partition table with:And, from there, mount the filesystem locally and "play" with it. Remember to type
exit
when you are done to quit this shell and release the VDI.Cheers
Felipe