Vnx-rootfswinxp
How to create a KVM Windows XP root filesystem for VNX
Contents
Create a basic Windows XP rootfs
- Create the filesystem disk image:
qemu-img create -f qcow2 vnx_rootfs_kvm_winxp.qcow2 5G
vnx --create-rootfs vnx_rootfs_kvm_winxp.qcow2 --install-media /almacen/iso/winxp.iso
- Update it using "Windows update"
- Disable screensaver
- Disable Firewall
- Install VNX autoconfiguration daemon by:
- Executing on the host:
/usr/share/vnx/bin/vnx_update_aced WinXP /usr/share/vnx/aced/vnx-aced-win-0.1b.exe
- Accessing virtual machine console and starting a windows file explorer, going to cdrom content (d: normally) and double clicking on vnx-aced-win-0.1b.exe file
- Expand the My Computer branch, then the AutoPlay branch, and then select Drives
- Turn off the checkbox next to all drive letters
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...
Known problems
- 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):
<?xml version="1.0" encoding="UTF-8"?> <vnx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/usr/share/xml/vnx/vnx-1.95.xsd"> <global> <version>1.92</version> <scenario_name>xp</scenario_name> <vm_mgmt type="none" /> </global> <vm name="winxp" type="libvirt" subtype="kvm" os="windows"> <filesystem type="direct">/usr/share/vnx/filesystems/vnx_rootfs_winxp</filesystem> <mem>512M</mem> </vm> </vnx>
Started with:
vnx -f xp.xml -v --create
and stopped with:
vnx -f xp.xml -v --shutdown
Note: never use not use "--destroy"option to stop a rootfilesystem use in direct mode: you will corrupt the filesystem.