User Tools

Site Tools

Action disabled: source

wiki:software:win32:vmware

VMWare – Installing a virtual machine on a physical disk in Windows 7

This article was originally published on July 9, 2011.

We recently started working on an old Unisys Aquanta EN (which is a rebranded Acer AcerNote Pro 950cx) for the lulz. However, since the thing won’t boot off any external disks and we have no internal floppy or CD-ROM module for it, it turned out that getting an operating system onto it wasn’t so easy. After several hours of fiddling with USB sleds and other possible solutions, we gave up on doing it directly to the hardware.

Enter virtual machines. We first tried VirtualBox, but it turns out that there’s not any easy way to install an operating system directly to a physical hard drive attached to the host OS. We decided to try VMWare Workstation.

Trying to install was a little disconcerting – we could get it booted and going, and the Windows 98 SE installer saw our 4GB IDE hard drive attached to my computer over USB, but as soon as the installer tried to format the hard drive or write files to it, it choked and VMWare gave us a “could not write to the disk” error.

It turns out that, unsurprisingly, UAC in newer versions of Windows prevents software like VMWare from directly accessing a hard drive and writing to it – even though VMWare presented a UAC prompt requesting elevated privileges to access the physical disk. After a little swearing and a bit more Googling, it turns out that you need to manually unmount the hard drive and set it as writable. This isn’t all that hard, but it does require a few minutes of command line work.

Open up a command prompt, type diskpart, and hit enter. Once diskpart launches, type list disk and hit enter to view a list of attached physical drives. You’ll now need to identify which of the drives listed is yours. Once you’re certain you’ve got the right disk, type select disk $n (where $n is the number of your disk). To take the disk offline (unmount), just type offline disk. Once you’re sure the disk is unmounted (you can double-check by looking in Explorer), type attribute disk clear readonly to make the disk writeable. Type rescan to wrap up, and you can now exit diskpart.

Open up VMWare, start your virtual machine, and now you can format your disk normally.

VMWare is a great way to get an operating system on to a disk when you’re unable to do so from the real host computer. VirtualBox is a good free alternative, although it’s a little rough around the edges in a few places. If you have problems or need a more advanced configuration, you can find an in-depth article on this issue on VMWare’s website1).

Happy geeking!