Vous êtes sur la page 1sur 7

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Home

Documentation

Get Involved

Developer

Planet

Search Ubuntu Cloud Portal

FAST Win7 KVM VirtIO{Disk-Net} Install


Posted by Ahmed Kamal // March 2nd, 2011 // Uncategorized Everyone who has to use Windows, please let's at least keep it contained inside a virtual machine! In this article I'll demo how to "Install Windows7 over Ubuntu 11.04 Natty, using KVM with System Disk over VirtIO". Quoting the libvirt wiki "Virtio is a Linux standard for network and disk device drivers where just the guest's device driver "knows" it is running in a virtual environment, and cooperates with the hypervisor. This enables guests to get high performance network and disk operations, and gives most of the performance benets of paravirtualization" Here's a little convenience script to download virtio Windows drivers and launch virt-install to Install Windows. Copy/Paste this script into an empty folder, chmod +x it, and run it.

#!/bin/sh WINISO=/path/to/win7.iso #Windows ISO INSTALLDISK=win7virtio.img #Disk location. Can be LVM LV VFD=http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.vfd DRVRISO=http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.iso [ -e $(basename $VFD) ] || wget $VFD [ -e $(basename $DRVRISO) ] || wget $DRVRISO [ -e $INSTALLDISK ] || qemu-img create $INSTALLDISK 30G sudo virt-install -c qemu:///system --virt-type kvm --name win7virtio --ram 1024 --disk path="$INSTALLDISK",bus=virtio \ --disk $(basename $VFD),device=floppy --os-variant win7 --cdrom $(basename $DRVRISO) --cdrom "$WINISO" --vcpus 2

et voila Windows installer kicks in, we're greeted with the usual

1 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Next the welcome screen, and agree on the license agreement (if you want!)

In this next screenshot, we see how Windows Installer does not see any "disks". This is because Windows now does not have any drivers for the virtio disk that we attached!

2 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Let's x that, clicking "Load Driver" and clicking OK, Windows starts reading the VFD virtual oppy image we attached, and detects the driver

3 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Clicking Next, Windows can now see the virtio disk

Then it's business like usual

4 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

After installation completes, be sure to check the device manager and conrm the disk (and network) are both using optimized virtio drivers

et voila, Windows in its full glory running over optimized virtio drivers. The only part that sucks is desktop VNC performance, something that I'll probably write about very soon :)

8 Comments: Get Involved In The Conversation!

Hi, this is a very interesting article. I did try to do the same on my maverick install. I had to stop beacuse of unsigned virtIo storage drivers? Am I missing something? Thanks

sante 13 March, 2011 - 5:49 pm

reply

5 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Hi sante, The storage drivers are installed from that vfd early in the win7 installation process. I didnt get unsigned warnings. Are you sure youre using that vfd => http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.vfd What happens if you accept installing it, does it work

admin 13 March, 2011 - 9:26 pm

reply

I guess the word is burst of laughing. Simply on the net somebody who is talking about my most secret ideas? You really manage to operate a fast KVM? HOW? To get back serious: my base is also UBUNTU 11.04 via Virtual Box I am placing Content Management Systems and historical OSs commencing with W but only as isles in a sea of UBU. My experience now is cruel slow working of KVM Qemu. How could I proceed download kvm..tar.bz2 expand it into htdocs of the existing apache is there something to do with drivers install it using mozi with localhost/kvmdirectory

roland 11 April, 2011 - 10:10 pm

reply

Hi Roland, Not really sure why youre downloading kvm into apache and mozi is ? Care to please supply more detail ?

kim0 12 April, 2011 - 1:30 pm

reply

mozi = mozilla refox what I am using. I will use the clear expression Firefox. On the net I nd les with extension . kvm tar bz. I am used to download eg Joomla with tar xvfz ..tar.gz into xampp// htdocs .. This makes me do Joomla. The big question: how do I expand the kvm so it will work fast. I Think this could be done in 5 5 lines. I tried also kvm once and I managed to start work with it but but cruel slow. the machine says: kvm ist not loaded.

roland 13 April, 2011 - 2:47 pm

reply

OK, stupid question: Once youve installed it, how do you re up that Win7 VM next time you need to use it? Dont have much experience with qemu-kvm

Ziv 2 May, 2011 - 4:58 pm

reply

Hi ziv, well its quite simple, just launch virt-manager and you should nd the vm listed there, click it and click the power-on button thats it

kim0 6 May, 2011 - 4:45 pm

reply

OK, now I understand why I was having troubles Let me give you a constructive critique When you wrote this howto you assumed one has all the required stu upfront and didnt even mention them, so Id like to point out that prior to using this script you should make sure you have installed the following packages: libvirt-bin libvirt0 virtinst virt-manager qemu-kvm this is for people like me, that didnt think of it before and got in a lot of errors when trying to run the script and ever time had to solve a dierent dependency issue

6 de 7

29-07-2011 17:03

FAST Win7 KVM VirtIO{Disk-Net} Install | Ubunt...

http://cloud.ubuntu.com/2011/03/fast-win7-kvm-vi...

Name (required)

Email (required)

Website

Post Comment

2011 Canonical Ltd. Ubuntu Cloud Portal. Ubuntu is a registered trademark of Canonical Ltd.

Problems with the cloud portal? File a Bug

7 de 7

29-07-2011 17:03

Vous aimerez peut-être aussi