|Installing W7 on a virtual machine I’m sure is not as fun as having it installed on a physical machine. The problem is, I no longer have enough space to squeeze W7 into my laptop’s hard drive. So I thought of having it installed via an external USB hard drive (Maxtor 40GB) but doing so unfortunately is not possible; the W7 installation wizard tells me that it does not support such a hardware configuration. Frustrated, I searched the Internet to see if it was possible; there were instead lots of “How To’s” on installing W7 from a USB stick especially on Netbooks where presence of an optical drive is absent. Well, I eventually end up installing W7 on a 16GB Transcend USB flash drive instead. Now, I’ll be sharing how I did it. I will divided this tutorial into three phases; Phase I is about how to prepare your USB flash drive while Phase II tackles staging the virtual machine and installing W7 then Phase III walks you through tweaking the W7-VM to become W7-on-stick. Here’s a list on what you need to achieve our goal:
- A PC with a working USB 2.0 port/s.
- A 16GB USB stick/flash drive or larger (the actual install size is a little over 8GB).
- VMware Workstation 6.5.x
- A pre-installed Windows Vista as guest OS in VMware Workstation.
- A copy of the Windows 7 installation (DVD or ISO).
- An administrative user account.
- Tons of PATIENCE.
PHASE I – Preparing the USB Stick/Flash Drive
- Plug in the USB stick into your PC’s USB port.
- Fire up your VMware Workstation. If you don’t have it yet, download at least an evaluation version from VMware. You need to register before you can actually download the software. You’d probably ask why VMware Workstation and not Microsoft Virtual PC? Well, I tried this trick on VPC 2007 but it didn’t work but I guess with Hyper-V, it might. Sorry, I currently don’t have a 64 bit PC to install Hyper-V.
- Turn on your Vista guest OS.
The Removable Devices message box would popup.
- Just click OK to close it and login to vista when the login screen is presented.
- VMware can load your USB stick within the guest OS. To do this, click the VM menu then hover your mouse pointer to Removable Devices and hover your mouse pointer to your USB stick from the list of devices then finally select Connect (disconnect from host) from the sub-sub menu. Click here to view image.
- Click OK when a message box will popup.
- You will know when the USB stick is loaded because Vista will present you the Autoplay dialog box. Just click Close.
- Click the Start menu then type comp in the Start Search field then click Computer Management when it gets listed.
- Click Continue when prompted by the UAC.
- In the Computer Management snap-in, click Disk Management.
Notice that your USB stick is identified as Disk 1 with its corresponding drive letter assignment or higher if you have more than one currently plugged in. Take note of this. Click here to view image.
- Close Computer Management.
- Click Start -> All Programs -> Accessories -> then right-click your mouse on Command Prrompt and select Runas Administrator from the context menu then deal with the UAC dialog box when it pops up.
The Command Prompt should launch thereafter.
- It’s geek time folks so in the Command Prompt, type diskpart and hit the Enter then type list disk and hit Enter again.
Notice that the USB stick will be listed as Disk 1 or higher.
- Now do the following commands exactly as sequenced:
- select disk 1 <<< selects the USB stick
- create partition primary
- select partition 1 <<< you can do list partition to check the partition number if you wish
- active <<< marks the new primary partition active
- format fs=ntfs override <<< tested your patience will be but patient you must…he he he
After you exited diskpart, don’t close the Command Prompt. Just have it on the background.
Remember that you have to hit Enter everytime you finished typing a command.
- Load the W7 install DVD into your PC’s optical drive or map the W7 ISO you downloaded from Microsoft to VMware Workstation.
- VM menu -> Removable Devices -> CD/DVD (IDE) -> Settings -> Use ISO image file -> Browse then locate the W7 ISO and click Open then OK.
- VM menu -> Removable Devices -> CD/DVD (IDE) -> Connect
- Close the Autoplay dialog when it pops up.
- Back in the Command Prompt, change drive to your CD/DVD drive then change directory to BOOT.
- type D: then hit Enter.
- In drive D:, type cd boot then press Enter.
- Type bootsect /nt60 X: /force then hit Enter. This is going to make the USB stick compatible with BOOTMGR bootcode. X: is the drive letter assignment of the USB stick.
Now that the USB stick is ready, let’s dive into the next phase…
PHASE II – Setting up the W7 Virtual Machine and Installing W7
- If you have 2GB or more RAM on your PC, you don’t have to do this procedure; shutdown the Vista VM to give way to W7.
- Click the File menu -> New -> Virtual Machine.
- Tick Custom (advanced) then click Next when the New Virtual Machine Wizard pops up.
- Workstation 6.5 is pre-selected for Hardware Compatibility so just click Next.
I haven’t tried this on an earlier version, sorry. It might work but you will have to try it yourself and perhaps share your experience.
- Tick the last option, I will install the operating system later then click Next.
- Choose Vista as guest OS from the list under Microsoft then click Next.
- Type Windows 7 in the Virtual machine name field then click Browse.
- In the Browse for Folder dialog, create a new folder on drive C: named Windows_7 and click OK then click Next.
- If you have a dual core CPU, choose Two for Number of processors then click Next. Choose One if using a single core CPU.
- The RAM is pre-set to 512MB so click Next. Otherwise, assign a larger RAM if you have the hardware for it.
- Tick Do not use Network connection then click Next.
- LSI logic is pre-selected for SCSI Adapter so click Next.
- Select the last option Use a physical disk (for advanced users) then click Next.
- In the Device list, choose PhysicalDrive1 then click Next. PhysicalDrive0 is used by the host OS. If you use this, you’ll mess up the host OS.
- Click Browse and locate your Windows 7 folder then click Save and click Next.
- Uncheck Power on this virtual machine after creation and click Finish.
- We’re not done yet. Under the Commands window, click Edit virtual machine settings.
- Select Hard Disk (SCSI) then click the Advanced button located in the lower right corner of the Virtual Machine Settings window.
You will see something like this…
- Tick Independent. Persistent is pre-selected so click OK.
It should look like this…
- Select CD/DVD (IDE) then choose how the optical drive is connected, Use physical drive or Use ISO image file (in my case, I used an ISO image).
- Remove both the Floppy drive, USB Controller, and Sound Card then click OK.
- Before you continue, make sure that the USB drive where you wanted to install W7 is attached to VMware Workstation. Otherwise, this trick ain’t gonna work. Click Power on this virtual machine to start installing W7. Just go through the installation routine as you would on a physical machine.
- Press F2 when you start the virtual machine to change the boot sequence to boot from the CD/DVDROM.
- Format the USB stick within the W7 installation.
- Be patient. The installation is not as fast as it is on real hard drive.
That’s it, you now installed W7 into your USB stick but we have to do something before we can shed tears of joy
PHASE III – Tweaking W7-VM to become W7-on-stick
After the installation, you will be logged into the Desktop for the first time. This will also take time so again be… Yep, that’s right.
- First, change the resolution to 800×600. Just right-click the Desktop then select Screen Resolution from the context menu.
I don’t have a huge Desktop workspace thus the resolution change.
- Click Start (it’s the Windows orb) then type command in the Search programs and files text field.
- Right-click Command Prompt then select Run as Administrator from the context menu and click Yes when the UAC dialog pops up.
- In the Command Prompt, type cd \WINDOWS\inf and hit Enter. Add this tag:[*.AddService]
StartType = 0
LoadOrderGroup = boot bus extender
On each of the files below:
You can use Notepad to edit these files. In Notepad, press CTRL+Endto navigate to the last portion of the file then insert or add the above-mentioned tag.
- When you’re done, fire up the Registry Editor by typing regedit in the Search programs and files text field then hit Enter.
- Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
- On each of these services:
Start = 0
Group = boot bus extender
- USBSTOR (for this service, you create a new key string value named Group and do the same as the other services )
- When you’re done, exit the Registry Editor.
- Change your user picture unless you want to be represented as a flower.
- Shutdown W7 then close VMware and shutdown your PC.
- To be sure that you won’t mess up the host OS, either disable the physical disk/s in BIOS or remove your PC’s the hard drive. You don’t have to do this if you wish but I don’t take chances so I did it.
- Turn on your PC then alter the BIOS settings to boot first on the USB drive.
- Save the settings and exit the BIOS.
Momentarily, you will see the fruit of your labor coming to life.
Welcome to the future of USB computing…