Virtual Windows XP
From Wiki.cyring.fr
(Difference between revisions)
(→Prerequisite) |
|||
Line 3: | Line 3: | ||
The following packages are mandatory | The following packages are mandatory | ||
<syntaxhighlight lang="bash" line start="1"> | <syntaxhighlight lang="bash" line start="1"> | ||
+ | pacman -S base-devel | ||
pacman -S yaourt | pacman -S yaourt | ||
# https://wiki.archlinux.org/index.php/Yaourt | # https://wiki.archlinux.org/index.php/Yaourt | ||
Line 10: | Line 11: | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
You may also installed the following ones | You may also installed the following ones | ||
- | <syntaxhighlight lang="bash" line start=" | + | <syntaxhighlight lang="bash" line start="7"> |
yaourt wget | yaourt wget | ||
yaourt libcdio | yaourt libcdio | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
+ | |||
==== Convert VM ==== | ==== Convert VM ==== | ||
<syntaxhighlight lang="bash" line start="1"> | <syntaxhighlight lang="bash" line start="1"> |
Revision as of 16:11, 4 November 2012
Contents |
Prerequisite
This HowTo has been written using ArchLinux x86_64 Kernel 3.6.5 The following packages are mandatory
pacman -S base-devel
pacman -S yaourt
# https://wiki.archlinux.org/index.php/Yaourt
yaourt libvirt
yaourt chntpw
yaourt hivex
You may also installed the following ones
yaourt wget
yaourt libcdio
Convert VM
qemu-img convert -f vpc -O raw "Virtual Windows XP.vhd" v2WinXP.img
wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-30.iso
iso-read -i virtio-win-0.1-30.iso -e WXP/X86/VIOSTOR.SYS -o VIOSTOR.SYS
iso-read -i virtio-win-0.1-30.iso -e WXP/X86/VIOSTOR.INF -o VIOSTOR.INF
sudo mount -o loop,offset=32256 v2WinXP.img /mnt
cp VIOSTOR.SYS /mnt/WINDOWS/system32/drivers/
cp VIOSTOR.INF /mnt/WINDOWS/inf/
mkdir ~/tmp/config
cp /mnt/WINDOWS/system32/config/* ~/tmp/config/
wget http://code.cyring.fr/FTS/Source/VM/WinXP/pci_ven_1af4_dev_1001_subsys_00021af4.reg
wget http://code.cyring.fr/FTS/Source/VM/WinXP/service_viostor.reg
wget http://code.cyring.fr/FTS/Source/VM/WinXP/Disk_Ven_Red_Hat_Prod_VirtIO_Rev_0001.reg
wget http://code.cyring.fr/FTS/Source/VM/WinXP/Enum_PCI_VEN_1AF4_DEV_1001_SUBSYS_00021AF4_REV_00.reg
hivexregedit --merge ~/tmp/config/system pci_ven_1af4_dev_1001_subsys_00021af4.reg
hivexregedit --merge ~/tmp/config/system service_viostor.reg
hivexregedit --merge ~/tmp/config/system Disk_Ven_Red_Hat_Prod_VirtIO_Rev_0001.reg
hivexregedit --merge ~/tmp/config/system Enum_PCI_VEN_1AF4_DEV_1001_SUBSYS_00021AF4_REV_00.reg
chntpw -e ~/tmp/config/system << EOF
> cd ControlSet001
> cd Services
> cd Processor
> ed Start
> 4
> q
> y
> EOF
chntpw -e ~/tmp/config/system << EOF
> cd ControlSet001
> cd Services
> cd Intelppm
> ed Start
> 4
> q
> y
> EOF
cp ~/tmp/config/system /mnt/WINDOWS/system32/config/
sudo umount /mnt
Import into the registry
Download registry files @ code.cyring.fr/FTS
pci_ven_1af4_dev_1001_subsys_00021af4.reg
Windows Registry Editor Version 5.00 [\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00021af4] "ClassGUID"=hex(1):7b,00,34,00,44,00,33,00,36,00,45,00,39,00,37,00,42,00,2d,00,45,00,33,00,32,00,35,00,2d,00,31,00,31,00,43,00,45,00,2d,00,42,00,46,00,43,00,31,00,2d,00,30,00,38,00,30,00,30,00,32,00,42,00,45,00,31,00,30,00,33,00,31,00,38,00,7d,00,00,00 "Service"=hex(1):76,00,69,00,6f,00,73,00,74,00,6f,00,72,00,00,00
service_viostor.reg
Windows Registry Editor Version 5.00 [\ControlSet001\Services\viostor] "ErrorControl"=dword:00000001 "Group"=hex(1):53,00,43,00,53,00,49,00,20,00,6d,00,69,00,6e,00,69,00,70,00,6f,00,72,00,74,00,00,00 "ImagePath"=hex(2):53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,52,00,49,00,56,00,45,00,52,00,53,00,5c,00,76,00,69,00,6f,00,73,00,74,00,6f,00,72,00,2e,00,73,00,79,00,73,00,00,00 "Start"=dword:00000000 "Tag"=dword:00000021 "Type"=dword:00000001 [\ControlSet001\Services\viostor\Parameters] "BusType"=dword:00000001 [\ControlSet001\Services\viostor\Parameters\PnpInterface] "5"=dword:00000001 [\ControlSet001\Services\viostor\Security] "Security"=hex(3):01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
Disk_Ven_Red_Hat_Prod_VirtIO_Rev_0001.reg
Windows Registry Editor Version 5.00 [\ControlSet001\Enum\SCSI\Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001] [\ControlSet001\Enum\SCSI\Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001\4&1618751f&0&000] "Capabilities"=dword:00000060 "Class"=hex(1):44,00,69,00,73,00,6b,00,44,00,72,00,69,00,76,00,65,00,00,00 "ClassGUID"=hex(1):7b,00,34,00,44,00,33,00,36,00,45,00,39,00,36,00,37,00,2d,00,45,00,33,00,32,00,35,00,2d,00,31,00,31,00,43,00,45,00,2d,00,42,00,46,00,43,00,31,00,2d,00,30,00,38,00,30,00,30,00,32,00,42,00,45,00,31,00,30,00,33,00,31,00,38,00,7d,00,00,00 "CompatibleIDs"=hex(7):53,00,43,00,53,00,49,00,5c,00,44,00,69,00,73,00,6b,00,00,00,53,00,43,00,53,00,49,00,5c,00,52,00,41,00,57,00,00,00,00,00 "ConfigFlags"=dword:00000000 "DeviceDesc"=hex(1):4c,00,65,00,63,00,74,00,65,00,75,00,72,00,20,00,64,00,65,00,20,00,64,00,69,00,73,00,71,00,75,00,65,00,00,00 "Driver"=hex(1):7b,00,34,00,44,00,33,00,36,00,45,00,39,00,36,00,37,00,2d,00,45,00,33,00,32,00,35,00,2d,00,31,00,31,00,43,00,45,00,2d,00,42,00,46,00,43,00,31,00,2d,00,30,00,38,00,30,00,30,00,32,00,42,00,45,00,31,00,30,00,33,00,31,00,38,00,7d,00,5c,00,30,00,30,00,30,00,32,00,00,00 "FriendlyName"=hex(1):52,00,65,00,64,00,20,00,48,00,61,00,74,00,20,00,56,00,69,00,72,00,74,00,49,00,4f,00,20,00,53,00,43,00,53,00,49,00,20,00,44,00,69,00,73,00,6b,00,20,00,44,00,65,00,76,00,69,00,63,00,65,00,00,00 "HardwareID"=hex(7):53,00,43,00,53,00,49,00,5c,00,44,00,69,00,73,00,6b,00,52,00,65,00,64,00,5f,00,48,00,61,00,74,00,5f,00,56,00,69,00,72,00,74,00,49,00,4f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,30,00,30,00,30,00,31,00,00,00,53,00,43,00,53,00,49,00,5c,00,44,00,69,00,73,00,6b,00,52,00,65,00,64,00,5f,00,48,00,61,00,74,00,5f,00,56,00,69,00,72,00,74,00,49,00,4f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,00,00,53,00,43,00,53,00,49,00,5c,00,44,00,69,00,73,00,6b,00,52,00,65,00,64,00,5f,00,48,00,61,00,74,00,5f,00,00,00,53,00,43,00,53,00,49,00,5c,00,52,00,65,00,64,00,5f,00,48,00,61,00,74,00,5f,00,56,00,69,00,72,00,74,00,49,00,4f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,30,00,00,00,52,00,65,00,64,00,5f,00,48,00,61,00,74,00,5f,00,56,00,69,00,72,00,74,00,49,00,4f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,30,00,00,00,47,00,65,00,6e,00,44,00,69,00,73,00,6b,00,00,00,00,00 "LocationInformation"=hex(1):42,00,75,00,73,00,20,00,4e,00,75,00,6d,00,62,00,65,00,72,00,20,00,30,00,2c,00,20,00,54,00,61,00,72,00,67,00,65,00,74,00,20,00,49,00,44,00,20,00,30,00,2c,00,20,00,4c,00,55,00,4e,00,20,00,30,00,00,00 "Mfg"=hex(1):28,00,4c,00,65,00,63,00,74,00,65,00,75,00,72,00,73,00,20,00,64,00,65,00,20,00,64,00,69,00,73,00,71,00,75,00,65,00,20,00,73,00,74,00,61,00,6e,00,64,00,61,00,72,00,64,00,29,00,00,00 "Service"=hex(1):64,00,69,00,73,00,6b,00,00,00 [\ControlSet001\Enum\SCSI\Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001\4&1618751f&0&000\Device Parameters] [\ControlSet001\Enum\SCSI\Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001\4&1618751f&0&000\LogConf]
Enum_PCI_VEN_1AF4_DEV_1001_SUBSYS_00021AF4_REV_00.reg
Windows Registry Editor Version 5.00 [\ControlSet001\Enum\PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00] [\ControlSet001\Enum\PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\3&13c0b0c5&0&30] "Capabilities"=dword:00000006 "Class"=hex(1):53,00,43,00,53,00,49,00,41,00,64,00,61,00,70,00,74,00,65,00,72,00,00,00 "ClassGUID"=hex(1):7b,00,34,00,44,00,33,00,36,00,45,00,39,00,37,00,42,00,2d,00,45,00,33,00,32,00,35,00,2d,00,31,00,31,00,43,00,45,00,2d,00,42,00,46,00,43,00,31,00,2d,00,30,00,38,00,30,00,30,00,32,00,42,00,45,00,31,00,30,00,33,00,31,00,38,00,7d,00,00,00 "CompatibleIDs"=hex(7):50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,26,00,52,00,45,00,56,00,5f,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,00,00,50,00,43,00,49,00,5c,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,00,00,00,00 "ConfigFlags"=dword:00000000 "DeviceDesc"=hex(1):52,00,65,00,64,00,20,00,48,00,61,00,74,00,20,00,56,00,69,00,72,00,74,00,49,00,4f,00,20,00,53,00,43,00,53,00,49,00,20,00,63,00,6f,00,6e,00,74,00,72,00,6f,00,6c,00,6c,00,65,00,72,00,00,00 "Driver"=hex(1):7b,00,34,00,44,00,33,00,36,00,45,00,39,00,37,00,42,00,2d,00,45,00,33,00,32,00,35,00,2d,00,31,00,31,00,43,00,45,00,2d,00,42,00,46,00,43,00,31,00,2d,00,30,00,38,00,30,00,30,00,32,00,42,00,45,00,31,00,30,00,33,00,31,00,38,00,7d,00,5c,00,30,00,30,00,30,00,30,00,00,00 "HardwareID"=hex(7):50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,26,00,53,00,55,00,42,00,53,00,59,00,53,00,5f,00,30,00,30,00,30,00,32,00,31,00,41,00,46,00,34,00,26,00,52,00,45,00,56,00,5f,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,26,00,53,00,55,00,42,00,53,00,59,00,53,00,5f,00,30,00,30,00,30,00,32,00,31,00,41,00,46,00,34,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,26,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,30,00,30,00,00,00,50,00,43,00,49,00,5c,00,56,00,45,00,4e,00,5f,00,31,00,41,00,46,00,34,00,26,00,44,00,45,00,56,00,5f,00,31,00,30,00,30,00,31,00,26,00,43,00,43,00,5f,00,30,00,31,00,30,00,30,00,00,00,00,00 "LocationInformation"=hex(1):42,00,75,00,73,00,20,00,50,00,43,00,49,00,20,00,30,00,2c,00,20,00,70,00,e9,00,72,00,69,00,70,00,68,00,e9,00,72,00,69,00,71,00,75,00,65,00,20,00,36,00,2c,00,20,00,66,00,6f,00,6e,00,63,00,74,00,69,00,6f,00,6e,00,20,00,30,00,00,00 "Mfg"=hex(1):52,00,65,00,64,00,20,00,48,00,61,00,74,00,2c,00,20,00,49,00,6e,00,63,00,2e,00,00,00 "ParentIdPrefix"=hex(1):34,00,26,00,31,00,36,00,31,00,38,00,37,00,35,00,31,00,66,00,26,00,30,00,00,00 "Service"=hex(1):76,00,69,00,6f,00,73,00,74,00,6f,00,72,00,00,00 "UINumber"=dword:00000006 [\ControlSet001\Enum\PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\3&13c0b0c5&0&30\Device Parameters] [\ControlSet001\Enum\PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\3&13c0b0c5&0&30\LogConf] "BasicConfigVector"=hex(a):08,01,00,00,05,00,00,00,00,00,00,00,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,01,00,01,00,07,00,00,00,01,01,01,00,31,00,00,00,40,00,00,00,01,00,00,00,00,c1,00,00,00,00,00,00,3f,c1,00,00,00,00,00,00,08,01,01,00,31,00,00,00,40,00,00,00,40,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,ff,00,00,00,00,00,81,01,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,03,01,00,00,00,00,00,00,10,00,00,01,00,00,00,00,50,bf,fe,00,00,00,00,ff,5f,bf,fe,00,00,00,00,08,03,01,00,00,00,00,00,00,10,00,00,00,10,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,ff,00,00,00,00,00,81,01,00,00,00,00,00,01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,03,00,00,00,00,00,00,00,00,00,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 "BootConfig"=hex(8):01,00,00,00,05,00,00,00,00,00,00,00,01,00,01,00,03,00,00,00,01,00,01,00,00,c1,00,00,00,00,00,00,40,00,00,00,03,00,00,00,00,50,bf,fe,00,00,00,00,00,10,00,00,02,03,00,00,0a,00,00,00,0a,00,00,00,ff,ff,ff,ff
Editing Registry
chntpw -e ~/tmp/config/system
Commands
cd ControlSet001 cd Control cd CriticalDeviceDatabase nk pci#ven_1af4&dev_1001&subsys_00021af4 cd pci#ven_1af4&dev_1001&subsys_00021af4 nv 1 Service ed Service viostor nv 1 ClassGUID ed ClassGUID {4D36E97B-E325-11CE-BFC1-08002BE10318} cd .. cd .. cd .. cd Services nk viostor cd viostor nv 4 Type ed Type 00000001 nv 4 Start ed Start 00000000 nv 4 ErrorControl ed ErrorControl 00000001 nv 4 Tag ed Tag 00000033 nv 2 ImagePath ed ImagePath System32\DRIVERS\viostor.sys nv 1 Group ed Group SCSI miniport nk Parameters cd Parameters nv 4 BusType ed BusType 00000001 nk PnpInterface cd PnpInterface nv 4 5 ed 5 00000001 cd .. cd .. /* nk Security cd Security nv 3 Security ed Security :00000 01 00 14 80 90 00 00 00 9C 00 00 00 14 00 00 00 ................ :00010 30 00 00 00 02 00 1C 00 01 00 00 00 02 80 14 00 0............... :00020 FF 01 0F 00 01 01 00 00 00 00 00 01 00 00 00 00 ................ :00030 02 00 60 00 04 00 00 00 00 00 14 00 FD 01 02 00 ..`............. :00040 01 01 00 00 00 00 00 05 12 00 00 00 00 00 18 00 ................ :00050 FF 01 0F 00 01 02 00 00 00 00 00 05 20 00 00 00 ............ ... :00060 20 02 00 00 00 00 14 00 8D 01 02 00 01 01 00 00 ............... :00070 00 00 00 05 0B 00 00 00 00 00 18 00 FD 01 02 00 ................ :00080 01 02 00 00 00 00 00 05 20 00 00 00 23 02 00 00 ........ ...#... :00090 01 01 00 00 00 00 00 05 12 00 00 00 01 01 00 00 ................ :000A0 00 00 00 05 12 00 00 00 ........ cd .. */ cd Enum nk SCSI cd SCSI nk Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001 cd Disk&Ven_Red_Hat&Prod_VirtIO&Rev_0001 nk 4&1618751f&0&000 cd 4&1618751f&0&000 nv 1 DeviceDesc ed DeviceDesc Lecteur de disque nv 1 LocationInformation ed LocationInformation Bus Number 0, Target ID 0, LUN 0 nv 4 Capabilities ed Capabilities 96 nv 4 ConfigFlags ed ConfigFlags 0 nv 7 HardwareID ed HardwareID SCSI\DiskRed_Hat_VirtIO__________0001 SCSI\DiskRed_Hat_VirtIO__________ SCSI\DiskRed_Hat_ SCSI\Red_Hat_VirtIO__________0 Red_Hat_VirtIO__________0 GenDisk --q nv 7 CompatibleIDs ed CompatibleIDs SCSI\Disk SCSI\RAW --q nv 1 ClassGUID ed ClassGUID {4D36E967-E325-11CE-BFC1-08002BE10318} nv 1 Service ed Service disk nv 1 Driver ed Driver {4D36E967-E325-11CE-BFC1-08002BE10318}\0002 nv 1 Class ed Class DiskDrive nv 1 Mfg ed Mfg (Lecteurs de disque standard) nv 1 FriendlyName ed FriendlyName Red Hat VirtIO SCSI Disk Device nk Device Parameters nk LogConf cd .. cd .. cd .. cd PCI nk VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00 cd VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00 nk 3&13c0b0c5&0&30 cd 3&13c0b0c5&0&30 q y