Chris,
We ran into this a few months ago and didn't want to use the 'Other PV' option
either, so I created a couple of really simple patches to provide a Windows
2008 R2 Virtio OS template. You can apply these these on top of the 4.0 source,
and then recompile the rpms or debs.
Patches are attached.
- Si
----- Original Message -----
From: "Chris Sears" <[email protected]>
To: [email protected]
Sent: Sunday, January 13, 2013 8:58:28 PM
Subject: Enabling Virtio for Windows guests on KVM
Greetings,
A question came up a couple days ago on the users list about provisioning
Windows VMs with Virtio enabled on KVM:
http://markmail.org/thread/g42vr63dolaa56yv
The workaround mentioned was to set the OS Type to "Other PV". This seems
non-optimal. Is there a better solution? Or is this a bug/enhancement?
Looking around at the source, isGuestPVEnabled() seems to have a hard coded
list of guest OS which will get virtio provisioned by default. No Windows
OS's are in the list, presumably because the virtio drivers don't ship
natively with Windows. Is there some other way to control what type of
virtual NIC and disk controller hardware gets provisioned on a per-VM or
per-template basis?
Regards,
- Chris
*** incubator-cloudstack/setup/db/templates.kvm.sql 2012-10-15 10:35:25.817521222 -0500
--- ../cloudstackrepo_old/incubator-cloudstack/setup/db/templates.kvm.sql 2012-10-15 10:01:23.735521112 -0500
***************
*** 62,67 ****
--- 62,68 ----
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows 7', 'Windows 7');
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows Server 2003', 'Windows Server 2003');
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows Server 2008', 'Windows Server 2008');
+ INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows Server 2008 R2 (virtio)', 'Windows Server 2008 R2 (virtio)');
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows 2000 SP4', 'Windows 2000 SP4');
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows Vista', 'Windows Vista');
INSERT INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (7, 'Windows XP SP2', 'Windows XP SP2');
*** incubator-cloudstack/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 2012-10-15 10:35:25.541521324 -0500
--- ../cloudstackrepo_old/incubator-cloudstack/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 2012-10-15 10:01:22.005592979 -0500
***************
*** 3883,3888 ****
--- 3882,3888 ----
|| guestOSName.startsWith("Red Hat Enterprise Linux 5.4")
|| guestOSName.startsWith("Red Hat Enterprise Linux 5.5")
|| guestOSName.startsWith("Red Hat Enterprise Linux 6")
+ || guestOS.startsWith("Windows Server 2008 R2 (virtio)")
|| guestOS.startsWith("Debian GNU/Linux")
|| guestOSName.startsWith("Other PV")) {
return true;