VMware Communities
musfa
Contributor
Contributor
Jump to solution

Booting windows 7 64bit partition as RAW device in VMware workstation 7.1

My setup is a dual boot Lenovo W510 laptop with Windows 7 64Bit on a 200Gig partition and Debian GNU/Linux Squeeze on a 100Gig partition. I've got workstation 7.1 installed in Linux and it works fine for virtual machines. The hard disk is a SATA.

I'm trying to boot the Windows 7 64Bit partition as RAW device. From different posting on this forum and also on the web, i had gathered that i needed to change the scsi entries to ide in the .vmx and also in .vmdk. Even with those changes i get a 7B BSOD error when booting windows VM. I had previously been able to do this on a Lenovo T400, with exactly the same dual boot setup.

I've also read from a KB that SATA is not supported as RAW device. The Linux hosts sees the SATA as SCSI device.

Anyone has any fresh ideas on this or have come across and solved this problem?

Reply
0 Kudos
1 Solution

Accepted Solutions
continuum
Immortal
Immortal
Jump to solution

I paste this from my site: http://sanbarrow.com/p2v2008r2.html#patching

it shows how to configure the vmx-file and how to fix the 7B ...

Patching - easy variant

This procedure is used when otherwise the VM would boot into a bluescreen type 7B.

This assumes that VMware is the target and you configure the VM with VirtualHardware type 7.

It only applies if the virtual disk is configured like this

scsi0.virtualDev = "lsisas1068"

scsi0:0.fileName = "imported.vmdk"

On the target platform boot the newly created VM into the Windows 7 Recovery CD.

After boot is finished click on the CMD-button and run regedit.

Select HKLM and then Menu > File > Load Hive.

Browse to the Windows-directory on the virtualdisk > system32\config and select the file SYSTEM.

When asked for a name enter p2v.

Then find the key

HKLM\p2v\ControlSet001\services\LSI_SAS

and set the start type to REG_DWORD 0

Then select HKLM\p2v and click Menu > File > Unload Hive.

You can close regedit now and restart.

On next boot you can start into the 2008 R2 or Win7 system. It should find drivers and probably needs a reboot when done.






_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

View solution in original post

Reply
0 Kudos
23 Replies
RParker
Immortal
Immortal
Jump to solution

My setup is a dual boot Lenovo W510 laptop with Windows 7 64Bit

dual boot, implies that it's bootable. so convert it to a VM. Dual boot defeats the entire purpose of a VM.... In the end you will still get the same thing, a separate bootable environment with your programs intact. So I don't see the point of dual booting...

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

I paste this from my site: http://sanbarrow.com/p2v2008r2.html#patching

it shows how to configure the vmx-file and how to fix the 7B ...

Patching - easy variant

This procedure is used when otherwise the VM would boot into a bluescreen type 7B.

This assumes that VMware is the target and you configure the VM with VirtualHardware type 7.

It only applies if the virtual disk is configured like this

scsi0.virtualDev = "lsisas1068"

scsi0:0.fileName = "imported.vmdk"

On the target platform boot the newly created VM into the Windows 7 Recovery CD.

After boot is finished click on the CMD-button and run regedit.

Select HKLM and then Menu > File > Load Hive.

Browse to the Windows-directory on the virtualdisk > system32\config and select the file SYSTEM.

When asked for a name enter p2v.

Then find the key

HKLM\p2v\ControlSet001\services\LSI_SAS

and set the start type to REG_DWORD 0

Then select HKLM\p2v and click Menu > File > Unload Hive.

You can close regedit now and restart.

On next boot you can start into the 2008 R2 or Win7 system. It should find drivers and probably needs a reboot when done.






_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
musfa
Contributor
Contributor
Jump to solution

I'm aware that I can do P2V and have it as a VM. But I need to keep the physical partition available and intact for this laptop, hence the RAW partition boot approach, which allows not only the partition and OS remains intact but any changes to data are also available within windows partition.

Reply
0 Kudos
IlDavo
Enthusiast
Enthusiast
Jump to solution

I attempted continuum's recommended steps to resolve a 7B that occurred when booting a Windows 7 Home Premium system (from a Toshiba Satellite U505) that I'd restored into a VMware Workstation 7.1.3 "Workstation 6.5-7.x virtual machine" using Acronis True Image Home 2011.

Note: the Windows 7 x.64 recovery disk .ISO I used was a generic one downloaded from Neowin, because any attempt to use the Windows 7 x64 recovery disk generated from my Toshiba results in a "ERROR: F3-F100-003" -- which I understand is Toshiba's oh-so-informative way of saying "inaccessible boot device."

I still get the 7B when booting Windows.

Even more confusing, if I simply re-start back into my Windows Recovery disc and repeat continuum's steps, I find the LSI_SAS startup type value is again "1" -- presumably meaning the change I thought I'd made to the image's registry did not take effect?

Any suggestions?

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

sounds like you forgot the "unload hive" step or just loaded the wrong hive.

I can check if you list your steps exactly.

If you do not have a good win7 recovery CD - google and download one - like this one

http://neosmart.net/blog/2009/windows-7-system-repair-discs/




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
IlDavo
Enthusiast
Enthusiast
Jump to solution

Many thanks for your quick reply, continuum!

The win7 recovery CD is actually the one from the neosmart link you provided (sorry: I'd described it as "neowin" -- it was "neosmart") -- so far, so good.

Steps (repeated in morbid detail so you can tell me if I'm missing something):

- Create Acronis .TIB image on source physical machine using Acronis TIH 2011-

- Generate Acronis Recovery CD

- Create new VM in VMWare Workstation 7.1.3 with same hard drive size, memory spec and 2-core CPU (source pc is a core i3) as source machine

- Boot VM with Acronis Recovery CD and successfully restore .TIB to hard disk -- I restore all 3 partitions that were on original disk, including "System" partition, a Toshiba HDD Recovery partition and the original C: drive. I set "System" partition to "Active" as on original system.

- Verify that .VMX for VM includes:

scsi0.virtualDev = "lsisas1068"

scsi0:0.fileName = "imported.vmdk"

- Boot VM to Windows and get 7B

- Boot VM with Windows Recovery CD from neosmart link, specify US keyboard and click "Next"

- Click "Next" on "System Recovery Options" dialog, whcih lists one found "Windows 7" operating system (I've attempted an alternate path where I first load LSAS drivers via the "Load Drivers" button before clicking "Next" with same results as follow)

- Cancel automatic repair, if it starts up (I've attempted alternate paths where I allowed automatic repair, which was unsuccessful with same results as follow)

- Click "Command Prompt" link

- Run "regedit.exe" from command prompt

- Click on HKEY_LOCAL_MACHINE

- File->Load Hive

- Dialog opens in "Boot (X:):\Windows\System32"

- Double-click on "config"

- Double-click on "SYSTEM" that is "File" as opposed to "SYSTEM" that is listed as "Text Document"

- type "p2v" as key name

- Expand "HKEY_LOCAL_MACHINE"

- Expand "p2v"

- Expand "ControlSet001"

- Expand "Services"

- Click on "LSI_SAS" (observe that "Start" REG_DWORD value is already "0")

- Click on "Type"

- Right-click on "Type"

- Select "Modify"

- Enter "0" (no quotes) in "Value Data:" field and click "OK"

- Scroll up to HKEY_LOCAL_MACHINE\p2v and click "p2v"

- File->Unload Hive->Yes

- File->Exit Registry Editor

- Type "Exit" in command prompt window

- Click "Restart" button in "System Recovery Options dialog

- Allow to boot into Windows 7

- Get 7B

Am I missing anything or incorrectly interpreting your guidance?

Many thanks for any clues!

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

- Dialog opens in "Boot (X:):\Windows\System32" ...

- Double-click on "config"

thats the mistake - you select the system hive of the LiveCD itself - clever - but useless Smiley Wink

select the same file from the original Windows directory

all your other steps are fine - good boy 😉




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
IlDavo
Enthusiast
Enthusiast
Jump to solution

continuum, you're a genius! Thanks very much for getting me out of the VMware 7.1.3 Windows 7 P2V rut I'd been stuck in for 2 weeks!

As it turns out, I made 2 mistakes instead of one: Not only did I modify the wrong hive, but I modified the wrong parameter. I needed to modify "START" for LSAS to 0 instead of "TYPE."

Steps that got me past my Windows 7 7B BSOD:

•Verify that .VMX for VM includes:

scsi0.virtualDev = "lsisas1068"

scsi0:0.fileName = "imported.vmdk"

•Boot VM with Windows Recovery CD from neosmart link, specify US keyboard and click "Next"

•Click "Next" on "System Recovery Options" dialog, whcih lists one found "Windows 7" operating system (I've attempted an alternate path where I first load LSAS drivers via the "Load Drivers" button before clicking "Next" with same results as follow)

•Cancel automatic repair, if it starts up (I've attempted alternate paths where I allowed automatic repair, which was unsuccessful with same results as follow)

•Click "Command Prompt" link

•Run "regedit.exe" from command prompt

•Click on HKEY_LOCAL_MACHINE

•File->Load Hive

•Dialog opens in "Boot (X:):\Windows\System32" -- navigate away from this and find the Windows\System32 directory on the virtual disk that will serve as the main (normally "C:") drive in the new VM (this was my "D:" drive on a system I'd booted from the recovery CD).

•Double-click on "config" directory

•Double-click on "SYSTEM"

•type "p2v" as key name

•Expand "HKEY_LOCAL_MACHINE"

•Expand "p2v"

•Expand "ControlSet001"

•Expand "Services"

•Click on "LSI_SAS"

•Click on "Start"

•Right-click on "Start"

•Select "Modify"

•Enter "0" (no quotes) in "Value Data:" field and click "OK"

•Scroll up to HKEY_LOCAL_MACHINE\p2v and click "p2v"

•File->Unload Hive->Yes

•File->Exit Registry Editor

•Type "Exit" in command prompt window

•Click "Restart" button in "System Recovery Options dialog

•Allow to boot into Windows 7

Thank you, thank you, thank you!

Reply
0 Kudos
juliovm
Contributor
Contributor
Jump to solution

Hi there!

Sorry, but I am a bit confused here: Does all these steps really worked for the original issue (Booting windows 7 64bit partition as RAW device in VMware workstation 7.1) ? I have the same problem of musfa´s original thread, what is keeping the original Windows 7 partition untouched.

I actually managed to do it (raw partition in a VM) with Windows XP as well. I hope to do the same with Windows 7. Can I?

Thanks in advance!

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

Can I ?

yes- you can.

If you have any question about my instructions let me know


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
musfa
Contributor
Contributor
Jump to solution

The steps provided here are only applicable if you do a P2V on Windows 7. They do not apply or solve my issue of booting the RAW Win 7 64bit partition in workstation 7.1 on linux host. I've been successfull in other direction i.e. i've been able to boot the linux partition as RAW device in workstation 7.1 on a windows 7 64 bit host. The hardware in this case is Lenovo W510, with rescue&recovery partitions intact. Its a standard dual boot setup. The only reason its dual boot is because its corporate laptop with Windows 7 Enterprise 64bit. I don't need to do a P2V on it.

I've been able to boot Windows 7 32bit as raw device in linux (debian squeeze) on a Lenovo T400.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

the imaging part of course is not required in a dualboot scenario

the patching part though is applicable.

It will help you get by the usual bluescreen 7b you will very very likely receive if you try the boot without it.

As you can directly edit registry when booted into win7 natively you can directly set start to 0 for LSI-SAS.
Settings this in CurrentControlSet will do


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
juliovm
Contributor
Contributor
Jump to solution

Dear continuum, thanks for giving me hope to have it working.

I remember that when I configured a XP raw partition to boot through a VM in my Linux Workstation, one of first steps was to create a hardware profile and install a SCSI disk driver on it. Windows 7 does not have hardware profiles so I beleave that I will jump this SCSI part and download a Win 7 recovery disk, according to your instructions.

So do I start from editing my .vmx files like this?


> scsi0.virtualDev = "lsisas1068"

> scsi0:0.fileName = "imported.vmdk"

Next step would also be the boot from recovery CD and edit the register exactely as mentioned above?

> Boot VM with Windows Recovery CD and click "Next"

> ...

> Run "regedit.exe" from command prompt

> ...

> Allow to boot into Windows 7

Thanks for your help!

Julio.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

Hi
if unsure post the vmx file

but it really is way easier then with with XP


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
juliovm
Contributor
Contributor
Jump to solution

Dear continuum,

I created a new Windows 7 64 bits VM and tried to boot from my Windows 7 existing partition. When I select Windows 7 from the grub loader, Windows 7 seems to start and shows the message "Windows is loading files..." with a sliding bar.After some seconds, it resets and go back do grub loader.

Here goes my Windows 7 x64.vmx file:

#!/usr/bin/vmware
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "7"
maxvcpus = "4"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsisas1068"
memsize = "1024"
mem.hotadd = "TRUE"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Windows 7 x64.vmdk"
scsi0:0.deviceType = "rawDisk"
ide1:0.present = "TRUE"
ide1:0.fileName = "/dev/scd0"
ide1:0.deviceType = "cdrom-raw"
floppy0.startConnected = "FALSE"
floppy0.fileName = ""
floppy0.autodetect = "TRUE"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.virtualDev = "e1000"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
usb.present = "TRUE"
ehci.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
mks.enable3d = "TRUE"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"

pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
roamingVM.exitBehavior = "go"
displayName = "Windows 7 x64"
guestOS = "windows7-64"
nvram = "Windows 7 x64.nvram"
virtualHW.productCompatibility = "hosted"
extendedConfigFile = "Windows 7 x64.vmxf"
ethernet0.generatedAddress = "00:0c:29:f0:fa:1c"
uuid.location = "56 4d cd 72 93 68 17 f0-2c 36 fb 37 42 f0 fa 1c"
uuid.bios = "56 4d cd 72 93 68 17 f0-2c 36 fb 37 42 f0 fa 1c"
cleanShutdown = "TRUE"
replay.supported = "FALSE"
replay.filename = ""
scsi0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "160"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "33"
sound.pciSlotNumber = "34"
ehci.pciSlotNumber = "35"
vmci0.pciSlotNumber = "36"
scsi0.sasWWID = "50 05 05 62 93 68 17 f0"
vmotion.checkpointFBSize = "134217728"
usb:0.present = "TRUE"
usb:1.present = "TRUE"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "1123088924"
usb:1.deviceType = "hub"
usb:0.deviceType = "mouse"
svga.maxWidth = "640"
svga.maxHeight = "480"

OBS.:

1) I have tried with and without svga lines (found some posts with similar issue): Nothing changes.

2) Although my Windows 7 is 64 bits, I also tried to create a 32bit VM but... the same issue.

Do you have any idea of what could be possibly going on?

Again, thanks for any help!

Julio.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

did you change the registry before trying this ?

if yes - what exactly did you change ?


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
juliovm
Contributor
Contributor
Jump to solution

Dear continuum, I just realized what was going wrong: Before starting the virtual machine, I rebooted the Linux host and enabled VT in BIOS setup. By doing that, I finally managed to execute the recovery CD and changed the registry as you guys recommended.

IT WORKED!!!!!

Perfect!

Thanks A LOT for all your help!

Julio.

Reply
0 Kudos
apatrid
Contributor
Contributor
Jump to solution

Hello,

sorry to re-open the old thread, I do not know better Smiley Happy

I am having problems to start my win. I have:

hp probook 6560b

8Gb RAM,

quad-core i5,

VT enabled,

all the other problems regarding vmware fixed;

windows 7 64-bit,

fedora 16 64-bit.

Disks are fine:

[root@localhost Windows_7_x64]# cat Windows_7_x64.vmx | grep scs
scsi0.present = "TRUE"
scsi0.virtualDev = "lsisas1068"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Windows_7_x64.vmdk"
scsi0:0.deviceType = "rawDisk"
scsi0:0.redo = ""
scsi0.pciSlotNumber = "160"
scsi0.sasWWID = "50 05 05 60 47 7b 31 10"
[root@localhost Windows_7_x64]#

I want to be able to use both operating systems as standalone systems, but I also want, if possible, to boot windows as a VM from fedora.

now I am getting that ugly 7b. I tried to fix HKLM\p2v\ControlSet001\services\LSI_SAS according to this thread and your site Sam, however I still get 7b bluescreen. From what I can tell, when I go to re-do the same task (hoping it might help this time), I notice that my loaded hive has kept edited value, i.e. it remains with value 0, so I believe I edited the right hive. I shall try to do it from windows, for a current set as well, however I doubt the results would differ. I have tried several different combinations, including (but not limited to) repetitive repairs of windows, this way or that way...nothing works out for me, I still get that dumb BSOD.

Is there a good soul that can help me out with this? I fought hard and this 7b is the last thing that needs to be removed before I will be happy with the way my laptop is set up.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

did you check if the system uses Controlset001 ?

the vmx-settings look ok


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos