Change Drivers in an existing VM to VirtIO

516 views
Skip to first unread message

Raphael Lehmann

unread,
Aug 11, 2014, 6:59:18 PM8/11/14
to gan...@googlegroups.com
Hi,
I have a ganeti cluster with a few Linux VMs and some Windows VMs (7, Server 2008 R2 and Server 2012). This VMs run great with the VirtIO driver.
Yesterday I migrated an physical Server 2008 R2 into a VM, by changing dome registry keys in Windows to load the intelide drivers at startup.
The Ganeti kvm disk_type is ide and I would like to change this to virtio for better performance.
Without ganeti in kvm I could add a second virtio disk, install the virtio drivers and than change the type of the first disk to virtio und remove the second disk, but in ganeti the disk_type is for any disk in the VM.

And ideas?

Thank You

Thomas Rieschl

unread,
Aug 12, 2014, 3:06:37 AM8/12/14
to gan...@googlegroups.com
Hi!

My first thought is adding it through DISM.
http://christian.hofstaedtler.name/blog/2013/01/using-dism-to-add-drivers.html

Just boot with WinPE or WinRE and add the drivers to the installation.


HTH


Cheers,
Thomas

Jake Anderson

unread,
Aug 12, 2014, 3:16:40 AM8/12/14
to gan...@googlegroups.com
What I have done in the past is to copy the running command of the KVM
its using.
(ps -Af | grep "kvm")
Then shut it down, activate the disks, then manually run the command
with whatever additions you feel like, it probably won't get network but
VNC should work to get your drivers up and running.

Thomas Rieschl

unread,
Aug 12, 2014, 3:26:08 AM8/12/14
to gan...@googlegroups.com
Yeah, I've doen that, too ;)

But somehow it doesn't feel right to manually play with the KVM processes.

It probably would be a nice feature to set the disk-type on disk level.


On second thought it might also be possible to change the
cdrom_disk_type to paravirtual and then install the drivers for the
CDROM device.
It's not usable for Windows with that setting, but the drivers should be
loaded.

It could also be possible to `socat` with something like

socat -
UNIX-CONNECT:/var/run/ganeti/kvm-hypervisor/ctrl/[instance-name].monitor

into the KVM process monitor and add/change devices on a running VM.
Never tried that before, though.


Regards,
Thomas

Phil Regnauld

unread,
Aug 12, 2014, 3:37:13 AM8/12/14
to gan...@googlegroups.com
Jake Anderson (yahoo) writes:
> What I have done in the past is to copy the running command of the
> KVM its using.
> (ps -Af | grep "kvm")
> Then shut it down, activate the disks, then manually run the command
> with whatever additions you feel like, it probably won't get network
> but VNC should work to get your drivers up and running.

I've done this a couple of times as well and can confirm it works fine.

Marco Casavecchia M.

unread,
Aug 12, 2014, 3:43:51 AM8/12/14
to gan...@googlegroups.com
Yes, the disk_type is for all the disks of the vm.
Though, you can force the cdrom_disk_type to something else.
On windows guests, I usually set the disk_type to virtIO and the CDRom to ide.
I found that it's the smoothest config under windows and it allows you to load the virtio drivers from cdrom.

Best reguards.
Reply all
Reply to author
Forward
0 new messages