how to import xen vm to openstack kvm

I want to move few of our existing vms in xenserver to openstack kvm environment, I tried converting the image using qemu-converter, glance image getting created and instance shows active but nothing visible in console nor in log files.

1 answer

The conversion of disk is the easy part. If the conversion done correctly you will see the boot screen but after a while maybe stack or blue screen will be appear.
If you use virtio scsi disk controller, windows installation doesn't know about that driver and you must install them with rescue DVD and DISM utility. Alternative you can set property hw_disk_bus=ide on image and boot an instance.
Secondly you need to remove any xen drivers that already exists in old installation, maybe the gplpv_uninstall_bat.zip (search in google for it) will helps you how to uninstall the drivers with rescue DVD.
In my cases i do:
1. Convert the Disk (maybe with snapshot and then create volume).
2. Set the system-properties on volume (hw_disk_bus, hw_scsi_model etc)
3. I create a vm from Windows DVD (ISO) and attach the previous volume, so start and installation with an existing disk.
4. I attached and extra volume with Virtio KVM Drivers.
5. I Started the windows installation and in the advanced partition i choose to load a driver from the virtio KVM volume.
6. After the Virtio scsi controller's driver loaded i canceled the installation and i am going to repair command line and i run
7. DISM /image:C:\ /add-driver /driver:F:\virtiosisci\and64\xxxx.inf (where F:\virtiosisci\and64\xxxx.inf is the virtio scsi drivers for your windows).
8. type regedit and go to system and file-load hive. Find c:\windows\system32\config\system (where c:\windows is your old installation). Then in the loaded hive you can delete the keys and values as gplpv_uninstall_bat.zip describes.
9. After that you can delete vm and create a new with your volume.

P.S. Don't forger to set correct the system-properties on your volume before attach it to instances.

Comments

In my case I am exporting the vm to disk.raw and using that to create a image in openstack, instance is active but nothing is visible in console.
I am doing it to a centos machine, what I see is only this
"Ignoring supplied device name: /dev/vda. Libvirt can't honour user-supplied dev names"

You could try this. Basically, our Xen instances didn't have the required virtio kernel modules. Before converting the disk you should install the modules, or in rescue mode after the instances already exist in openstack.