Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] VMWare Workstation raw disk with WinXP guest
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Wed Nov 03, 2004 4:04 am    Post subject: [HOWTO] VMWare Workstation raw disk with WinXP guest Reply with quote

VMWare Workstation raw disk with WinXP guest

Having spent most of yesterday getting this to work, I thought I'd share the steps involved. There is scattered information on this in these forums and on the VMWare forums, but it took a while to put it all together and make it work. This guide is what worked for me, your mileage may vary.

Required:
Working dual boot Gentoo/WinXP installation
Working Linux installation of VMWare Workstation 4.5.2
Probably will only work with IDE hardware

Why do this?
I set this up on a laptop with a 10GB NTFS partition loaded with WinXP pro, with the rest of the 40GB disk used for Gentoo. I can successfully dual boot, but rarely do as I'm sort of allergic to Windows. However, I do need a few things in Windows from time to time, so I have had a small XP installation on a virtual disk which has worked fine, but uses a few GBs of space on my rapidly filling HDD. Using the existing 10GB XP install was the logical solution.

Results:
Well, it works! I can now successfully run WinXP from within Gentoo using VMWare, or boot natively into WinXP upon reboot. Besides saving space, I am very impressed with the speed increase. Booting WinXP from the raw disk is MUCH faster than from the virtual disk. Opening applications is MUCH faster.

For example, Photoshop 7 load times:
Virtual disk: 21 seconds
Raw disk: 10 seconds

Drawbacks:
Suspending the OS is not advised with raw disk use. Snapshots won't really work. Basically you lose the ability to undo things like you could with a virtual disk.

Warning:
You really could mess something up on your computer playing with this. VMWare says so, and it is certainly possible.

VMWare documentation:
Configuring a Dual-Boot Computer for Use with a Virtual Machine
Many users install VMware Workstation on a dual-boot or multiple-boot computer so they can run one or more of the existing operating systems in a virtual machine. If you are doing this, you may want to use the existing installation of an operating system rather than reinstall it in a virtual machine.

More VMWare documentation:
Setting Up Hardware Profiles in Virtual Machines
"Certain operating systems use hardware profiles to load the appropriate drivers for a given set of hardware devices. If you have a dual-boot system and want to use a virtual machine to boot a previously installed operating system from an existing partition, you must set up "physical" and "virtual" hardware profiles."

Steps:

1.
Make hardware profile in XP as described in VMWare docs above...

2.
Code:
/sbin/hdparm -g /dev/hda

With 2.6.x kernel the wrong disk geometry (65535/16/63 for my disk) is shown. Booting with 2.4.x kernel (Knoppix with 2.4.x for me because I don't have 2.4 kernel anymore) shows correct geometry (4864/255/63 for my disk). I added: hda=4864,255,63 to kernel args in grub.conf. So it looks like this:
grub.conf
Code:
title=Gentoo Linux 2.6.8-r10 (fb)
root (hd0,1)
kernel /kernel-2.6.8-gentoo-r10 root=/dev/hda4 video=vesafb:ywrap,mtrr vga=0x31A acpi=force hda=4864,255,63


When I tried before making these changes upon booting WinXP in VMWare it would stop at grub, with "Error 17".

3.
I'm sure there are many solutions and ways to fix this...but I did it the easy way and ran vmware with sudo. As a normal user VMWare can't access the raw disk (/dev/hda for me).

Code:
sudo vmware


Make new machine using raw/physical disk in VMWare.
IMPORTANT! YOU MUST select use whole disk, not the partition as you would think. When I tried that, I got the same grub error 17.

My cdrom didn't work at fist for some reason in XP, so I set cdrom in VMWare to use iso image at /opt/vmware/lib/isoimages/windows.iso so I could install VMWare tools in XP. I suggest doing this to make sure you get VMWare tools intalled upon first boot.

4.
Boot virtual machine, BE SURE to boot into XP and not linux in grub. You might want to increase your timeout in grub.conf?
Select your "virtual" profile from the XP hardware profile selection menu.
click cancel for installing any new hardware that is found.
Install VMware tools (virtual cdrom drive)
Shutdown XP
set cdrom to /dev/cdroms/cdrom0 (well, that is what I did and now it works)

5.
Start your VMWare XP, see if it works. Reboot your computer and see if you can still natively boot into XP. If so, congratulations!

Possible issues:
Windows XP activation. Not sure about this...I used the "corporate edition" which requires no activation.
Back to top
View user's profile Send private message
MaxDamage
l33t
l33t


Joined: 03 Jan 2004
Posts: 650
Location: Oviedo, Spain

PostPosted: Thu Nov 04, 2004 11:14 am    Post subject: Re: [HOWTO] VMWare Workstation raw disk with WinXP guest Reply with quote

10drill wrote:
Make new machine using raw/physical disk in VMWare.
IMPORTANT! YOU MUST select use whole disk, not the partition as you would think. When I tried that, I got the same grub error 17.


That's because grub needs to access the boot partition at start-up. Having a /boot partition and a / partition allows you to mantain / not accesed by vmware. All the other partitions can be de-selected too, and added after as a "network-folder" in the vmware options.
_________________
La PDA de tungsteno
Back to top
View user's profile Send private message
nsahoo
l33t
l33t


Joined: 17 Jul 2003
Posts: 618

PostPosted: Wed Nov 10, 2004 7:09 pm    Post subject: Reply with quote

I get a screen with

Code:

L 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 ...


At the boot and it freezes after that. I suppose it's because, it can't access my /boot folder. I don't have a separate /boot partition, it's in the same partition as my linux installation.

I have tried starting as root and as the regular user. The regular user is in the "disk" group, so that it can have access to the /dev/hd* devices.

Any idea as to what I can do to make it work?
Back to top
View user's profile Send private message
Um_Help
n00b
n00b


Joined: 17 Sep 2003
Posts: 74

PostPosted: Sun Nov 14, 2004 3:40 pm    Post subject: Reply with quote

i have bad luck with doing raw disk in vmware. It has corrupted manya drive. I dont recommend it for important data and such. Cool idea to just have the OS on the partition, it wouldnt really matter if it got corrupt i mean it takes like 9 mins to install windows. :P
Back to top
View user's profile Send private message
MaxDamage
l33t
l33t


Joined: 03 Jan 2004
Posts: 650
Location: Oviedo, Spain

PostPosted: Sun Nov 14, 2004 4:22 pm    Post subject: Reply with quote

Um_Help wrote:
i have bad luck with doing raw disk in vmware. It has corrupted manya drive. I dont recommend it for important data and such. Cool idea to just have the OS on the partition, it wouldnt really matter if it got corrupt i mean it takes like 9 mins to install windows. :P


Always be sure of unmounting in Gentoo the partitions Windows through vmware is going to access. Or at least mount them RO. If not, the data could get corrupted, or at least changes would be lost.
_________________
La PDA de tungsteno
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Thu Nov 18, 2004 12:55 am    Post subject: Reply with quote

Quote:
Any idea as to what I can do to make it work?
I never ran into an error as you described so I have no advice. Try searching the VMWare forums?
Back to top
View user's profile Send private message
pestilence
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 213
Location: Athens / Greece

PostPosted: Mon Nov 22, 2004 7:46 pm    Post subject: Reply with quote

I tryed to access my windows partition as a raw disk through vmware but i get the activation screen.....i can't activate windows (network fails?) through network...I tryed bridged through my works lan (using a proxy) and also tryed Nat through a pppd connection from my home, but neither seems to work.
_________________
Gentoo the rising hope
Back to top
View user's profile Send private message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 52
Location: France

PostPosted: Mon Nov 22, 2004 8:58 pm    Post subject: vmware XP guest on raw disk Reply with quote

Hello

I have tried what you described and I get a blue screen with:

A message about probable virus on drive or uninstall drive and controller from windows.

***STOP: 0x0000007B (0xF9C2E640,0xC0000034,0x00000000)


Is ther a way to empty (remove all hardware) the virtual hardware profile in XP (I created it by copying the phisical one...)

Thanks for your help



[/img]
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Tue Nov 23, 2004 12:43 am    Post subject: Reply with quote

Quote:
i can't activate windows (network fails?) through network
Did you have VMWare networking working correctly with a virtual XP machine? If so you should be able to use the same networking configuration, which is set up by running the /opt/vmware/bin/vmware-config.pl scripts. I use bridged networking and it works fine...and I did say activation could be an issue with this! If you figure it out, let us know.
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Tue Nov 23, 2004 12:48 am    Post subject: Reply with quote

Quote:
A message about probable virus on drive or uninstall drive and controller from windows.

***STOP: 0x0000007B (0xF9C2E640,0xC0000034,0x00000000)
I think you will find more info on this in the VMWare forums, for example check this thread and this one from MS. Post your solution if you get it working!
Back to top
View user's profile Send private message
pestilence
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 213
Location: Athens / Greece

PostPosted: Tue Nov 23, 2004 5:32 am    Post subject: Re: vmware XP guest on raw disk Reply with quote

dwardo wrote:
Hello

I have tried what you described and I get a blue screen with:

A message about probable virus on drive or uninstall drive and controller from windows.

***STOP: 0x0000007B (0xF9C2E640,0xC0000034,0x00000000)


Is ther a way to empty (remove all hardware) the virtual hardware profile in XP (I created it by copying the phisical one...)

Thanks for your help



[/img]


This is usually a problem with the IDE controller, boot into your vmware hardware profile of windows (normal not through vmware) and change the IDE controler as described in the vmware site, reboot into Linux and load windows through vmware and you should be fine.
_________________
Gentoo the rising hope
Back to top
View user's profile Send private message
Shemite_Dog
n00b
n00b


Joined: 22 Jul 2003
Posts: 35
Location: Hailing from parts unknown!!

PostPosted: Tue Nov 23, 2004 10:01 am    Post subject: Reply with quote

I had to apply the registry patch provided here http://support.microsoft.com/kb/314082, then everything worked just fine.
_________________
"Mr. Mc Cluck Cluck!"
Back to top
View user's profile Send private message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 52
Location: France

PostPosted: Tue Nov 23, 2004 7:12 pm    Post subject: patching registry worked Reply with quote

Thanks Shemite_dog that did it. :D

Now All I need is to get the briged network working and then activate XP...
If Anyone has any tips I'll take them for now I'm going through all I can find in the forum.

Thanks again.
Back to top
View user's profile Send private message
pestilence
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 213
Location: Athens / Greece

PostPosted: Wed Nov 24, 2004 8:57 am    Post subject: Re: patching registry worked Reply with quote

dwardo wrote:
Thanks Shemite_dog that did it. :D

Now All I need is to get the briged network working and then activate XP...
If Anyone has any tips I'll take them for now I'm going through all I can find in the forum.

Thanks again.


You don't need to tweak anything for networking to work under vmware, just choose the appropriate networking option and you should be fine, if you are using an ethernet network then choose bridged, if you use a Dialup / ISDN choose nat and it should play straight forward.
One remark though, i chose vmxnet instead of vlance (vlance would not work on my system / configuration).
_________________
Gentoo the rising hope
Back to top
View user's profile Send private message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 52
Location: France

PostPosted: Thu Nov 25, 2004 8:07 pm    Post subject: Reply with quote

Hy I've got 2 more questions

Vmware init script fails In "Bridged networking on /dev/vmnet0"
This seems to be due to the fact that /dev/vmnet0 is not present upon vmware_start_bridge function call. However it appears a few seconds later in /dev but when I start vmware it tells me bridged networking not activated...
Has anyone had this problem, and a solution other then duplicating the call to vmware_start_bridge (a bit brutal, but it activates the bridge after the /dev/vmnet0 has appeared) and erasing the not_configured file every time ???

Second, at each boot XP tells me that I have to activate, yet when I try it says I'm already activated... Ever had this happen ??? The number of days for activation are decreasing...

Thanks again.
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Mon Dec 13, 2004 7:55 pm    Post subject: Reply with quote

Hello,

I've found this thread which really helped me with my vmware installation (I had that problem with the wrong hdd geometry)
So now my native windows installation also runs within vmware but windows wants to be activated everytime I change between vmware and native boot. I've activated with both hardware profiles hoping that windows would be smart enough but the activation screen appeared again.
Has anyone solved that problem?
I do not have a corporate edition...
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
mvc
Tux's lil' helper
Tux's lil' helper


Joined: 27 Nov 2002
Posts: 98
Location: Portugal

PostPosted: Thu Dec 16, 2004 3:27 pm    Post subject: Reply with quote

I've found that editing the .vmdk file and putting the correct disk geometry in lines starting with "geometry" works without passing hda option to the kernel.

Why is hdparm reporting the wrong values? I used to tweak the hd performance as suggested in some gentoo installation how-to. I hope it is doing the right thing.
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Mon Dec 20, 2004 1:56 am    Post subject: Reply with quote

mvc wrote:
I've found that editing the .vmdk file and putting the correct disk geometry in lines starting with "geometry" works without passing hda option to the kernel.
Great tip, thanks.
Back to top
View user's profile Send private message
prolific
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 237

PostPosted: Mon Dec 27, 2004 10:53 pm    Post subject: Reply with quote

i just setup a vmware physical disk installation ....

i didn't have to find the geometry of the disk or anything like that ... all i had to do was to change the owner of /dev/hda to disk and add myself to the disk group :)
Back to top
View user's profile Send private message
10drill
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2004
Posts: 104
Location: 0{here}1

PostPosted: Fri Dec 31, 2004 1:15 am    Post subject: Reply with quote

Quote:
i didn't have to find the geometry of the disk or anything like that
What kernel are you running?
Back to top
View user's profile Send private message
mvc
Tux's lil' helper
Tux's lil' helper


Joined: 27 Nov 2002
Posts: 98
Location: Portugal

PostPosted: Sun Jan 02, 2005 2:22 pm    Post subject: Reply with quote

When I first installed vmware I was also able to run it without specifying the hd geometry. Then one day, apparently with no reason, it stopped working and I had to set the geometry.

Marco
Back to top
View user's profile Send private message
TrainedChimp
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2004
Posts: 87
Location: Just west of Earth

PostPosted: Sun Jan 02, 2005 8:32 pm    Post subject: Reply with quote

mvc wrote:
I've found that editing the .vmdk file and putting the correct disk geometry in lines starting with "geometry" works without passing hda option to the kernel.


I tried doing that sometime ago and was never able to get that to work nor was I able to pass the geometry to the kernel using Grub. What I wound up doing instead was creating a virtual boot floppy. Just incase it helps someone else see: http://www.vmware.com/community/thread.jspa?forumID=19&threadID=6282&messageID=42574#42574
Back to top
View user's profile Send private message
ichief
n00b
n00b


Joined: 07 Feb 2005
Posts: 8

PostPosted: Fri Feb 18, 2005 7:02 am    Post subject: Reply with quote

Shemite_Dog wrote:
I had to apply the registry patch provided here http://support.microsoft.com/kb/314082, then everything worked just fine.

I've recently set-up a similar configuration with a SATA drive as the Windows drive. For those of you who may have had as much trouble as I did getting this to work, here's a tip: use the link above, but instead of adding the registry entries as specified on that page, add an entry based on the SATA / IDE driver you need for Windows to be able to boot from the drive. You can find the PCI string in the *.inf file of the device you are trying to add.

For example, to get the VMWare SCSI driver loaded at startup, add the following registry entry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_104b&dev_1040]
"ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}"
"Service"="vmscsi"

Also make sure that the VMWare SCSI driver is already present in your Windows/System32/drivers folder...you can download this driver from http://www.vmware.com/download/downloadscsi.html, and use WinImage to extract the driver from the *.flp file.

Hope this helps! (I played around with sysprep and had to do multiple repair installs until I figured out that the above registry entry was all I needed, so I think this will prove useful for those of you interested in dual-booting a current Windows partition under VMWare in Linux.)
Back to top
View user's profile Send private message
m00nxaild
n00b
n00b


Joined: 22 Dec 2004
Posts: 8

PostPosted: Sun Feb 20, 2005 2:21 am    Post subject: keyboard and mouse don't function Reply with quote

hi all,

First of all, thank you all for your help. It's been useful to me.

I'm running gentoo with kernel 2.6 as the host, and win xp as the vmware 4.5.2 guest, on my asus laptop wich has an hdd ide.
I followed the steps and everything went ok.

Now I boot vmware winxp guest, and I could not pass the winxp login. No mouse, no keyboard.
I got back into win and configured auto-logon.

I'm still without mouse and keyboard, but I see that winxp detects, and wants to install
"BusLogic MultiMaster PCI SCSI Host Adapter".

Like i said, my hdd is IDE.. I have no ideia why vmware would need scsi.

Anyway, I went to vmware, downloaded the scsi driver, extracted the .flp, installed the .inf into the registry.
I also tried to do your step "ichief", but everything was in it's right place. the keys in registry, and the .sys in ../system32/drivers.

Am I missing out something ?
I tried different mouse settings in the virtual machine of winxp, but with no success.

It's been almost 2 days of testing and booting.. I feel like I'm almost there..
Please help. Thanks
Back to top
View user's profile Send private message
ichief
n00b
n00b


Joined: 07 Feb 2005
Posts: 8

PostPosted: Sun Feb 20, 2005 2:31 am    Post subject: Reply with quote

m00nxaild,

The mouse and keyboard drivers under VMWare are just based on basic PS/2 Mouse and Keyboard drivers. What type of drivers are you using normally (usb or ps2, custom or generic drivers)? If you created a seperate hardware profile for VMWare and "Real" Windows, boot into "Real" Windows using your VMWare hardware profile, uninstall the mouse/keyboard drivers, and reboot into Windows from VMWare.

As far as I know, Windows does not need the SCSI drivers for VMWare unless your CD/DVD drives or zip drive is going through ide-scsi emulation. If they are recognized as SCSI in linux, then they might be loading up as SCSI under VMWare/Windows.

Finally, you could try booting into Safe Mode through VMWare...this should redetect your devices and utilize only basic drivers.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum