Friday, March 30, 2012

How to configure Virtio or e1000 1G NIC in Windows XP KVM Guest

By default kvm uses 10/100M NIC. What is good in it windows recognize it out of the box. It means no hassle with drivers and internet connection is available after guest installation is done. Default NIC is fine for browsing but if you need to transfer 0.5G installation for testing into guest OS several times a day it is time pit, because download takes about half an hour.

There are many options to consider:

  • using .iso file and mount it as CDROM,
  • try to use USB device,
  • configure kvm to provide 1G NIC for guest

All options have pros and cons not explained here. At first sight I thought last options is simple, but it took time to figure out right kvm options to get it works and have pretty decent download speed.

It seems simple :) just read what

man kvm

says. Then check what NIC models are supported with

kvm -net nic,model=?

and follow instructions, but there are several tricks to do before you success:

  • 1. You need to find drivers for Virtio or e1000
  • 2. Just using -net nic,model=e1000 in kvm parameters is not gonna work even after driver is installed, because it requires -net user option as well
  • 3. Your CPU should be powerful enough to emulate 1G download for NIC

So lets assume there are Windows XP installation disk iso image at /images/winxp.iso, windows guest installed on your desktop in /guests/winxp.img and it works with usual parameters like

kvm -localtime -m 2047 -soundhw all -boot d -cdrom /images/winxp.iso /guests/winxp.img -vga cirrus -cpu host

First you need to download drivers. Start your Windows guest with default NIC and download Virtio driver ISO image here and e1000 driver installer here using guest OS. After they are downloaded, shutdown your guest and start it with desired NIC. For example to start Windows XP guest in KVM with e1000 NIC use

kvm -localtime -m 2047 -soundhw all -boot d -cdrom /images/winxp.iso /guests/winxp.img -vga cirrus -cpu host -net nic,model=e1000 -net user

Install drivers for e1000 from installer downloaded before and restart windows guest. After that your windows guest should recognize e1000 NIC and show it is in 1G mode. Installation is almost the same for Virtio NIC just rename iso into zip and unpack it somewhere to install.

Hope this article will save some of your time :)

Wednesday, March 28, 2012

Maven Integration for Web Tools Platform Proposal Posted

Maven Integration for Web Tools Platform (m2e-wtp) is finally on its way home and proposed open source project under the Eclipse Maven Integration project.

Give it a hug if you like it here http://www.eclipse.org/forums/index.php/mv/msg/318532/831379/#msg_831379

M2E_WTP is an extension for M2E which makes your life easier when you import Java EE related projects developed with maven in Eclipse. It does all Web Tools platform related configuration for you at import time. It means all projects get configured as Faceted Projects with required facets after import is finished, so you can use it as regular Web Tools project and start Web Development right away without spending time to manual configuration.

Proposal document is located http://www.eclipse.org/proposals/technology.m2e.m2e-wtp/.

JBoss Tools Community announcement https://community.jboss.org/en/tools/blog/2012/03/28/moving-m2e-wtp-project-to-eclipse

Enjoy!