VMWare上のWindows環境をQemu+KVM上に移行する
まず、VMware上でvmware-toolsをアンインストールし、mergeide.regを実行しておく。
これをやる前に元環境壊しちゃったので、MacのVMWare Fusionからsamba経由でvmx読んできてがんばった。
qemu-img -O qcow2 -c xpclean.vmdk xpclean.img virt-install --connect qemu:///system --name xpclean --vcpus=1 --ram 512 --os-type=windows --os-variant=winxp --import --disk /vm/xpclean/xpclean.img --network bridge=br0,mac=hogehoge --graphics vnc,port=5903 --noautoconsole
一回起動して確認。
あとはデバイスドライバをいれる:http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/
仮想cdrom、virtioなnic, usbパススルー設定を追加
<disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/vm/isos/virtio-win-1.1.16.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' unit='0'/> </disk> <interface type='bridge'> <mac address='asdffdsa'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x04f9'/> <product id='0x01e9'/> <address bus='3' device='2'/> </source> </hostdev>