Blog Code Forum

Virtual Windows XP

From Wiki.cyring.fr

(Difference between revisions)
Jump to: navigation, search
Line 147: Line 147:
:00090  01 01 00 00 00 00 00 05 12 00 00 00 01 01 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                        ........
: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
q
q
y
y
</syntaxhighlight><br />
</syntaxhighlight><br />

Revision as of 10:26, 4 November 2012

Contents

Convert VM

  1. qemu-img convert -f vpc -O raw "Virtual Windows XP.vhd" v2WinXP.img
  2. sudo mount -o loop,offset=32256 v2WinXP.img /mnt
  3. cp -R ~/tmp/WXP /mnt/
  4. cp ~/tmp/WXP/X86/VIOSER.SYS /mnt/WINDOWS/system32/drivers/
  5. cp ~/tmp/WXP/X86/VIOSER.INF /mnt/WINDOWS/inf/
  6. mkdir ~/tmp/config
  7. cp /mnt/WINDOWS/system32/config/* ~/tmp/config/
  8. reged -I ~/tmp/config/system HKEY_LOCAL_MACHINE ~/tmp/devicedb.reg
  9. cp ~/tmp/config/system /mnt/WINDOWS/system32/config/
  10. sudo umount /mnt

Import Registry

devicedb.reg

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\CurrentControlSet]
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Control]
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Control\CriticalDeviceDatabase]
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00000000]
"ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}"
"Service"="viostor"
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00020000]
"ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}"
"Service"="viostor"
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00021af4]
"ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}"
"Service"="viostor"
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services]
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor]
"Type"=dword:00000001
"Start"=dword:00000000
"Group"="SCSI miniport"
"ErrorControl"=dword:00000001
"ImagePath"="system32\\drivers\\viostor.sys"
"Tag"=dword:00000040
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor\Enum]
"0"="PCI\\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\\3&13c0b0c5&0&20"
"Count"=dword:00000000
"NextInstance"=dword:00000001
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor\Parameters]
"BusType"=dword:00000001
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor\Parameters\MaxTransferSize]
"ParamDesc"="Maximum Transfer Size"
"type"="enum"
"default"="0"
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor\Parameters\MaxTransferSize\enum]
"0"="64 KB"
"1"="128 KB"
"2"="256 KB"
 
[HKEY_LOCAL_MACHINE\CurrentControlSet\Services\viostor\Parameters\PnpInterface]
"5"=dword:00000001

Edit Registry

  1. chntpw -e ~/tmp/config/system

Our functional settings
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
 
q
y

Personal tools