Vnx-rootfswinxp

Create a basic Windows XP rootfs
 Create the filesystem disk image: qemu-img create -f qcow2 root_fs_winxp-base.qcow2 5GB Create a libvirt XML definition (root_fs_winxp.xml) containing the virtual machine description:  WinXP 524288  1    hvm    /usr/bin/kvm       <interface type='network'> <source network='default'/> <interface type='network'> <source network='default'/> <interface type='network'> <source network='default'/> <interface type='network'> <source network='default'/> <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> <graphics type='vnc' port='5005' /> Note: change "source file=" lines to whatever fits your case (use full paths).

Start the virtual machine with:</li> virsh create root_fs_winxp.xml Open virtual machine console with:</li> virt-viewer WinXP Note: you also can access the console through vncviewer: vncviewer localhost::5005 Make a standard windows installation, naming the machine "winxp" and creating a "vnx" user.</li> After Windows XP instalation is finished:</li> <ul> Update it using "Windows update"</li> Disable screensaver</li> Disable Firewall</li> Install autoconfiguration daemon by downloading and executing the following program:</li> http://www.dit.upm.es/vnx/download/vnx-autoconf-daemon-windows-v01.exe Install TweakUI (http://download.microsoft.com/download/f/c/a/fca6767b-9ed9-45a6-b352-839afb2a2679/TweakUiPowertoySetup.exe) and disable autorun in all drives:</li> <ul> Expand the My Computer branch, then the AutoPlay branch, and then select Drives</li> Turn off the checkbox next to all drive letters</li> </ul>

Activate windows by providing a license number Optional: eliminate alert messages (at least firewall and antivirus ones) from "Control Panel-->Security Center-->Change alerts (left panel)"</li> Optional: install basic networking applications like an ssh client (i.e. putty), an scp client (i.e. winscp) or an X server (i.e Xming)</li> Configure static addresses in the four network interfaces and DISABLE all of them (necessary to speed up autoconfiguration). You can use, for example, the following script (setnetifs.bat):</li>

netsh interface ip set address name="eth0" static 1.1.1.1 255.255.255.252 netsh interface ip set address name="eth1" static 1.1.1.5 255.255.255.252 netsh interface ip set address name="eth2" static 1.1.1.9 255.255.255.252 netsh interface ip set address name="eth3" static 1.1.1.13 255.255.255.252

Note: this script supposes that the name of network interfaces has been changed to something rational like eth0, eth1, etc, instead of the original names "Conexión de área local X" which are unusable from a bat script due to the accents...

</ul> </ul>

Known problems
<ul> Each time a vm starts, Windows finds new hardware and installs a driver for a standard RAM PCI controller. This fact slows down the boot process. To avoid it, just start the rootfilesystem once in direct mode to have windows detect the hardware and let the driver installed. For that purpose, you can use the following VNX scenario (xp.xml):</li> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE vnx SYSTEM "/usr/share/xml/vnx/vnx-1.92.dtd"> 1.92    <scenario_name>xp</scenario_name> <vm name="winxp" type="libvirt" subtype="kvm" os="windows"> /usr/share/vnx/filesystems/root_fs_winxp 512M </vm> Started with: vnx -f xp.xml -u root --create and stopped with: vnx -f xp.xml -u root --shutdown Note: never use not use "--destroy"option to stop a rootfilesystem use in direct mode: you will corrupt the filesystem. </ul>