How To Install Windows 7 on a Virtual Machine with VirtualBox

windowslogo1   How To Install Windows 7 on a Virtual Machine with VirtualBoxEarlier this month, Microsoft made the Windows 7 beta available for anyone to download and test drive it. Unless you have a spare computer, it can be somewhat inconvenient to test out new operating systems on your main system.¬† Although it is possible to dual boot Windows 7 with Vista or XP, you may still prefer to install it on a separate machine.¬† VirtualBox is just the separate machine you’ve been looking for, and it’s free! So, how to install windows 7 on a virtual machine using Virtualbox?

VirtualBox is a free and open source virtualization program. Essentially, it is like having a complete and separate computer within your computer. You can install any operating system on it, including Windows 7. The latest version of VirtualBox (2.1.2) has support for Windows 7, which makes it very easy and convenient to install.

First, you’ll want to download VirtualBox and install it. VirtualBox is available for multiple platforms: Windows, OS X, Linux, and Solaris. During the installation on a Windows system, you may receive a warning that untested software is being installed. Be sure to click continue when those boxes appear, as essential components for VirtualBox to function properly are being installed.

driver warning   How To Install Windows 7 on a Virtual Machine with VirtualBox

You’ll also need to download the Windows 7 beta. It is a large file, so it may take quite a while to download depending on your connection. The file you will download is a CD disk image. Fortunately, since you’re going to use it on a virtual machine, you won’t have to actually burn it to a CD to use it.

Once you have VirtualBox installed and you have the Windows 7 beta CD image, you’re ready to create your virtual machine amd install Windows 7 beta.¬†Launch VirtualBox and create a new machine. Be sure to select Windows 7 as your operating system.

windows 7 new virtualbox machine   How To Install Windows 7 on a Virtual Machine with VirtualBox

Click Next. On the following screen you will select how much memory you would like the virtual machine to have. I believe the minimum requirement for Windows 7 is 1GB of RAM, so be sure to set it to at least 1024MB.

memory allocation   How To Install Windows 7 on a Virtual Machine with VirtualBox

Click Next. On the following screen you will create a new virtual drive for the system. I would recommend using the default option of a Dynamically expanding storage. This way you won’t use any more disk space (on your main system) than necessary. Since you’re using a dynamically expanding drive, the size of the disk is somewhat arbitrary. You just want to be sure not to make it too small, so set it to 100GB to be safe.

Once you’re done creating the virtual machine, you’ll need to configure it to use the Windows 7 disk image you downloaded. Select your virtual machine, click Settings, and navigate to the CD/DVD-ROM section. Check the Mount CD/DVD Drive checkbox and click the ISO Image File radio button. Then click the folder icon and then browse to where you saved your ISO image and select it.

mounting the windows 7 iso   How To Install Windows 7 on a Virtual Machine with VirtualBox

If you have a multi-core processor, there’s an option you’ll want to enable to speed things up on the virtual machine.¬† Go to the General section and on the Advanced tab enable the Enable VT-x/AMD-V checkbox. This allows VirtualBox to take advantage of machine virtualization capabilities of your processor, and improves the performance of the virtual machine.

You may also want to add sound to the virtual machine as well. Go to the Audio tab, and click the Enable Audio checkbox and select Windows DirectSound for the Host Audio Driver. Once you have the machine configured, click the Start button to turn on the virtual machine.

You should see the Windows 7 installation begin. Just follow all the prompts and install Windows. If you need to get back to your main computer at any time, the hotkey to release control of the virtual machine is the Ctrl key on the right side of your keyboard.

Once you’ve installed Windows 7, you can install the guest additions. The guest additions will provide better video and audio support to the virtual machine. The guest additions also allow you to better integrate the virtual machine with your main system.

To install the guest additions, press the right Ctrl key on your keyboard, go to the Devices menu and select Install Guest Additions”¬¶

install guest additions   How To Install Windows 7 on a Virtual Machine with VirtualBox

During the guest additions installation, when prompted if you would like to install drivers, click the Install button. Once you’ve installed the guest additions, reboot the virtual machine. Upon rebooting, all of the virtual devices should be working.

Now that you have the guest additions installed, you will be able to share the clipboard, access to files on the main system, and move the cursor seamlessly in and out of the virtual machine. You can press the Right Ctrl-F and see the virtual machine full screen. What a pretty fish!

Have you tried Windows 7 with other free virtualization programs? Did you try to install Windows 7 as a virtual machine with Virtualbox? If so, let us know which ones and what sort of hacks were required to get it to work.

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

76 Comments -

daniel

100% agree, virtualbox is the right and easiest way to test windows7. :)

Moscowmodder

I already did this on a MacBook. Works fine, no Aero, no desktop gadgets, no screensaver; otherwise fine.

Thanks for telling me about version 2.1.2!

Simon Slangen

I’m running a Windows 7 singleboot on my desktop right know. Honestly, I’m having less trouble than with my previous (Vista) install.

A wonderful operating system, if you ask me.

PM

is it possible to install it onto an external (USB) hard drive?

Jorge Sierra

I just realized you probably wanted to know if it is possible to install Windows 7 on an external USB drive. I’m not sure if it is possible or not, I haven’t tried it. There is a post on Yahoo! Answers with this very question, but there are conflicting responses. The Best Answer suggests using Virtual PC. You could certainly use VirtualBox and place the virtual disk file onto a USB drive, assuming the drive is big enough to perform the installation (around 5.5GB).

PM

Thanks Jorge – I will try that.

Jorge Sierra

VirtualBox doesn’t make for the best portable app, because it requires installing some drivers to work properly. That being said, you can check out an article on making it “somewhat portable” as the author describes it. I haven’t tried it so I’m not sure if it works or not, but it’s worth giving it a shot.

cw

Anyone know if this might work on Microsoft Virtual PC?

TemetNosce

it sounds really good and efficent but could there possibly be any harm for our pc to use it? i mean, may this thing have any side effects or something? because imnot sure that we can trust these kinds(“free(!)”) of applications without questioning. whatever im gonna try it anyway, thanks for the article Jorge ;)

Jorge Sierra

It should do you no harm. I’ve been using VirtualBox for a while now, and it’s been very handy for testing things in some of the recent articles I’ve written.

Zy

My experience with parallels was pretty good but because of tools issues with win 7 I decided to install Win 7 on the VirtualBox. However when i put my DVD imaga as required and start the machine, nothing installs.

Martin

Getting “cannot collect info for OSImage …install.wim does not exist”
Any ideas?

Jorge Sierra

You may have a bad disk image. You can check the MD5 sum for the image you downloaded using WinMD5Sum. The MD5 hash should be f9dce6ebd0a63930b44d8ae802b63825 for the 32-bit version and 773fc9cc60338c612af716a2a14f177d for 64-bit.

Martin

No, they are the same.
Any other ideas?

Thanks for the speedy response and great suggestion.

Sean

First of all, this is a great tutorial. I was able to successfully install Windows 7 under VirtualBox with only about two problems (that aren’t the fault of the tutorial).

1) I’m unable to get Win7 to recognize my USB drive (specifically an OCZ Rally2 4GB Dual-Channel). I have installed Guest Additions twice and it’s still unable to even detect it. Any suggestions?

2)Whenever I try to create a shared machine folder with my VM, I am able to select the folder(s) I want to share just fine but when the ‘OK’ box is not clickable or anything. I’ve installed Guest Additions twice and it still won’t let me share it.

Any help is appreciated. Thanks in advance!

Jorge Sierra

USB drives
Did you enable USB support and specify the USB drive? If you go to the Settings screen for the virtual machine, you should see a USB section where you can enable USB support and specify the devices that will be available to the virtual machine with the device filters. Just be sure the device is not in use, because essentially it becomes disconnected from the host when made available to the virtual machine.

Shared Machine Folders
You’re probably specifying a folder that has a space in the name (such as “My Documents” for instance). Just remove the spaces in the Folder Name and the OK button will become enabled.

Logan

I tried this, but when it came to the memory part the virtual box I had a problem. After I slid the bar past 729 mb it wouldn’t allow me to click next. It has to be 729 or smaller! What does this mean, and can I do anything about it?

Jorge Sierra

Your computer probably does not have sufficient memory to run with any more than 729MB of RAM. You’ll need more RAM to be able to run a VirtualBox virtual machine with more than 729MB of RAM.

Kite

First off, it’s a really smart idea to install the Windows 7 Beta on Virtualbox. But not being familiar with VirtualBox, a few questions …

I tried installing Windows 7 Beta on the Virtualbox, but can’t help wishing that I can move the installation onto an external USB drive. Googling turned up a mention of installation on a firewire linked external drive, that’s all. I have difficulties even getting access to the USB drive for data purposes. Tried Shared folders, tried USB devices (Msg : busy with previous request, fail to attach)

Other than that, also wondering whether it’s possible to adjust the maximum size of the virtual hard disk post-installation. In the physical world, you can adjust using Paragon Hard Disk Manager, or clone onto a bigger hard disk, but not sure how it works here. Planning to juggle my files around to free up some space or upgrade to a larger primary disk sometime later, so that I will have more free space later.

And lastly, the installation cannot detect my wireless (Linksys/Intel)cards at all despite best efforts, nor my cable link to the router. Nothing on the device manager either except a Intel (R) PRO 1000 MT Desktop Adapter (which isn’t what I have either)

Jorge Sierra

Moving the installation to a USB drive is relatively easy. Just move the virtual disk file onto a USB drive. Because the virtual disk file will be over 4GB in size, you will need to format the USB drive with NTFS, because FAT32 has a 4GB file size limit.

Then go into th settings for your virtual machine, and go to Hard DisksVirtual Media Manager click the add button and navigate to the virtual disk file on the USB drive. Then select it and confirm the selection.

You won’t be able to adjust the size of the disk after you’ve created it. Remember, the virtual disk represents an actual physical disk. Paragon Hard Disk Manager allows you to adjust the size of partitions on a physical disk, but a 500GB drive is always a 500GB drive. This is why I suggest starting off with a rather large size for the virtual drive, since you will not be able to change it later.

The devices within the virtual machine are virtual devices. Any devices on the host machine (with the exception of USB, if you enable USB on the virtual machine) will not be visible on the virtual machine. However, if you are connected to a network with your wireless card on the host, the Intel (R) PRO 1000 MT Desktop Adapter on the virtual machine should be able to connect to the network.

It is best to just think of the VirtualBox virtual machine as a completely separate computer. If you have a wireless card one one physical computer, it does not exist on the other.

Kite

Hey Jorge

Thank you for the suggestions.

Unfortunately, the Virtual Media Manager did not allow me to add the translocated hard disk due to the common hard disk UUID. I tried releasing the hard disk, but it still would not work. Eventually, I went into the XML file to manually change the path, then it worked really well.

Do you have any suggestions on activating the USB drives?

I tried enabling the USB controllers and adding filters, but it only ended up with the hub being captured (how to uncapture it???) and not available for use. Could not detect the flash drives at all, though the USB hard drive was detected. Also could not share any folders on USB drives.

As for the internet connection, it’s simply not working. I tried the Windows 7 diagnostics, but it simply could not detect the problem, the device has the latest driver and reports back as working well, just no connection to the Internet,, while the host’s internet connection is working perfectly well.

Jorge Sierra

I’m not sure about the USB problems you’re encountering. Perhaps the VirtualBox forums may be of better assistance. As far as the network goes, take a look a the Network section of the virtual machine options.

It’s likely that the network adapter is being connected to the wrong host interface. The guest network adapter will connect through one of your host adapters, so it is important to make sure it is the correct one. You could also try experimenting with the Attached to settings as well.

Kite

Thanks, I’ve checked out other blogs and figured it out.

For the USB problems, I found out that the opensource version of Virtualbox does not support interaction between Guest and Host OS, also unlike shared folders, cannot capture / uncapture USB devices when the Guest OS is running. Further, I need to specify all details for the device in question and to delete all other non-specific filters, and not to specify a USB hub for capture.

As for the Network adaptor, somehow the default NAT setting interferes with my internet access. I have to remove the NAT setting and replace with Host Interface and Wireless Card option.

cameron

Great write up, cleared out the cobwebs and got Windows 7 guest up and running in no time!
Much appreciated.

SHRADDHA

Hey Jorge. Can you help me out with this…….
Is it possible to install Win7 on Vista notebook without errors?

Jorge Sierra

What errors are you getting?

Erik

I did everything fine, but it wont let me check the multicore processor thing and also, when I click install guest additions, it does nothing :(, should I start the process over again? Will my same beta key still work if I use it on the same computer?

Jorge Sierra

You may not have a multicore processor (or an unsupported one), so that’s probably why the checkbox is disabled.

When you click install guest additions, it mounts a virtual CD containing the guest additions. Just browse to the virtual CD named Virtual Box Guest Additions, and run VBoxWindowsAdditions.

Cheezwhiz

Wow! This is great. Now that my RAM finally came in through the mail, I can actually try this. One question, though: Should I pick custom (clean) installation or upgrade installation?

Jorge Sierra

Clean installation. Enjoy your new RAM and your new Windows 7 Virtual Machine!

Patrick

Jorge you seem really knowledgeable about this so I’m actually taking a chance at making a comment. At the moment my system comprises of : Intel(R) Pentium(R) 4 CPU 2.80GHz 2.81 GHz, Biostar P4M800CE-8237 motherboard, 768 MB of RAM, 2 80GB Disk drives(C: has 11.2GB free space and D: 45.7GB free space), NVIDIA GeForce 6200 and my OS is currently Microsoft Windows XP Professional(Version 2002) SP3.

I used to have a better video card( R.I.P. XFX 7600GS) and I used to have 1GB of RAM until i fried both 512 MB chips while changing my computer case(yea it really sucked). I’m in the process of building a new system(already have an EX38T-DQ6 and an E8500) but for now i have a few questions about my current system.

1) Will i be able to use VirtualBox and install WIndows 7 on my machine without any problems? If so which drive should i install the OS on?

2) When the Beta expires will the OS cease to work?

3) Will the gaming experience versus hardware requirements be better than Vista? I may be getting another AGP video card for this old machine soon.

Jorge Sierra

1) You’ll need more than 768MB of total system RAM to install it on VirtualBox. You should be okay if you put in at least 2GB (RAM is pretty cheap these days).

2) It should continue to work, but you won’t be able to receive updates.

3) If you’re going to run Windows 7 on a VirtualBox, you probably won’t be able to do much gaming. If you install Windows 7 as a system OS and not in a VirtualBox, the gaming experience should probably be very much the same as Vista.

Hope this helps.

Patrick

Thanks alot keep up the good work mate.

doctorz92

Hey Jorge, I have 2gbs of ram on my PC but when I try and run windows 7 on Virtual Box it gives me a “cannot allocate sufficient memory” error.

Do I need more memory?

What should I do?

also, I have an intel core duo 2.66ghz and more then 100gbs of free space.

Jorge Sierra

You need to allocate at least 1GB (1024MB) to the Windows 7 virtual machine.

doctorz92

so is there a way I could split the use, 1gb for host 1gb for virtualbox

Jorge Sierra

Essentially that is what you are doing when you assign 1GB to the virtual machine.

doctorz92

Yeah, but when I try and allocate that single gb I still get the error telling me to close applications.

and that doesnt even work…..

idk, maybe I just need more ram.

Jorge Sierra

Hmm… Yeah, you may need more. Just toss another 1GB stick into your box. RAM is pretty cheap these days. :-D

Calvin

PLEASE HELP!!!!! I’m new to Virtualbox I need help installing Windows 7 On VM I’m Using XP!!!! URGENT!!!!!

Joe

Calvin,
Could you be more specific?
Jorge’s page is all about installing Win7 on VM !
What’s the part that has you baffled?

Asiko

Hello to everybody!)) i just wanna make sure if im doing all rite before i start installation. i have Vista and im trying to install Virual Windows 7 on top of it. all i need is just dnload Windows6.1-KB958559-x64.msu , and follow the instructions?? what bout Window 7 beta? just wanna be be sure that im doing it correctly. TNX ahead for ur help!!!!

Jorge Sierra

I believe the latest version of Virtual PC does support Windows 7. I believe that particular file is the 64-bit version, so use it if you are using the 64-bit version of Vista. Otherwise, you will want to download Windows6.1-KB958559-x86.msu. The directions for Virtual PC will be different than what is here however, but conceptually the installation is very much the same.

Joe

Jorge – Great tutorial!!
A few questions:
1. Win7 RC is out. It comes as a 2.36GB DVD image. Are your instructions still the same?
2. My PC has two hard disks, 100GB each. The primary disk (with Vista) is pretty full. Can VB be installed on a secondary disk?
3. My PC has 2GB RAM. When I allocate 1GB to VB, is that permanently unavailable to the host system, or only when I am using the VB. I mean, when I want can I just run Vista with 2GB, by not activating VB?
Thanks in advance

Jorge Sierra

1. I haven’t tried the release candidate yet, but the instructions should remain the same.

2. Yes. Just be sure to save the virtual drive onto the second disk.

3. When you allocate the memory to VirtualBox, it will only be in use when the virtual machine is turned on. When you turn it off, the memory will once again be available to your host system.

You may need more than 2GB of RAM though, because someone else had commented that they have 2GB on their host and it wasn’t enough to allocate 1GB to the virtual machine. You could always pick up an extra Gig or two pretty cheap online.

Joe

Jorge,
I installed Win7 RC on VB following your instructions and all went smoothly.
However, once Win7 was installed, I can’t get the Audio to work (whatever settings I use for Audio under Settings in VB).
Also, I can’t activate Aero. Win7 tells me “it might work with a different driver for my graphics card”, but the latest VB driver does not do the job.
Needless to say that my host Vista PC has perfect Aero and sound.
Any suggestions?

Jorge Sierra

It may be that the guest additions for the latest version of VirtualBox (2.2.2 at the time of this comment) do not support the Windows 7 release candidate. So when you install the guest additions, everything seems to go smoothly? When you reboot the virtual machine after installing the guest additions, everything is the same as it was before installing them (i.e. no sound and ugly low-res graphics)?

Joe

Installation of guest additions went smoothly, but did not solve the audio/video problem, also after several reboots.
Could be its the RC compatibility.
In the VB manual on the VB website the latest Win version mentioned as supported for guest additions, is the Win7 Beta.
I assume Sun will come out with a version for RC soon, and if indeed that is what causes the problem, it should then get solved.
By the way when they do come up with the RC compatible, how do you update the guest addition install? Just mount the new guestaddition ISO? Or do you have to unmount (?) the present installation first?
Thanks

Jorge Sierra

Yeah, it definitely sounds like Virtual Box 2.2.2 is not compatible with the Windows 7 release candidate. When Sun does release a new version of VB that has guest additions compatible with Win7 RC, you should just be able to mount the new guest additions and install them.

Joe

Actually, after spending a few hours googling the internet, it is clear that the present version of VB doesn’t support Directx hardware acceleration, which is crucial for Aero.
VB’s guest additions support OpenGL 3D acceleration, but that is not the one Aero needs. So it’s not just incompatability of guest applications with win7RC, it’s a basic VB problem. SUN seems to be working on directx support, but so far none yet….
From what I see on all the forums, the same problem exists also when running Vista under VB. All works fine, but no Aero.
If all this is true then also on your machine, running Win7 Beta under VB, there should be no Aero. Is that so?
(By the way, the audio problem can be solved by downloading and installilng Realtek drivers with the DC97 option)

Jorge Sierra

Ahh… That makes sense. I thought the 3D support did provide some DirectX, but would appear it does indeed only provide OpenGL 3D acceleration. So yes, it would be safe to say that with Win7 on VB there will be no Aero.

Thanks for updating the thread here and keeping everyone else informed as well. If you’re determined to get Aero on a virtual machine, it seems as though it might be possible to do it on Virtual PC.

dc

Joe,

The realtek AC97 drivers fixed the Windows 7 sound problem on VirtualBox. I have selected…

1. Windows DirectSound
2. ICH AC97

Thanks for enlightement, and it works like champ!

josh

So, I did this, my main problem is that my video card isn’t registering, even though I checked the box to let it, so I can’t use aero… any chance you could help me out, my card is a ati x1550 (they have a driver that supposedly works w/ win 7, but I can’t install it in my vpc)

josh

****Edit**** after reading the guy above me, it is clear that I’m just an idiot and should read – no directX in the VPS – sad :(

pjaush

Hi I installed Windows 7 with the latest Version of VirtualBox (2.2.4r47978) and it works fine for me but I have no aero support since Windows 7 trouble shooter sais “The current video card may support Aero with a driver that is compliant with the Windows Display Driver Model (WDDM). Contact the manufacturer of your computer or video card for a WDDM-compatible driver.”

Is this a known issue with virtual box or does anybody know how to work around?

Kind regards
Patrick

Jorge Sierra

VirtualBox does not currently support DirectX in guest OSs, although some development is taking place to do so. For now, it would seem you cannot use aero.

Sushain

So, Windows Aero (In the 7 RC) does does not work in VM 3.0, but no installation of guest additions is required for audio, mouse, etc to work correctly, and both 64 bit and 32 bit versions of Windows 7 RC work on VM 3.0?

Jorge Sierra

I haven’t tried VirtualBox 3.0 yet, but that should be the case. If you want full-screen resolution you will probably still need to install the guest additions. If you want seamless mouse interaction between the guest and host (where the guest is windowed, and you move the mouse cursor outside of the window), that is definitely the case.

Sushain

Thank you, and one more question, do you know anything abour the copy/paste glitch in Windows 7

Jorge Sierra

Can’t say that I do.

Jonathan

How do i get my wireless internet to work on Windows 7 Microsoft Vitual Machine im running Windows Vista Home Premium SP1 and i wanting to know

Jorge Sierra

Just set the network device in VirtualBox to use your wireless card. You set this up on the Network tab in the virtual machine settings.

Tony Leather

Hi – I cannot get my network recognized with VM in Windows 7 – I am running a wireless setup.

Jorge Sierra

Did you set up the VM to connect through the local network and install the guest additions?

Tony Leather

Thanks Jorge I have got it figured out – and thank you for your help

DEVIL DIVINITY

Walah..gampang banget Thankzz ya bro…

richard

Jorge,

Hope you can help me. I’ve installed WIN7 RC in VirtualBox but have been unable to get the network to connect.

Jorge Sierra

Did you set up the VM to connect through the local network and install the guest additions?

ssmokin

I am running latest Version of VirtualBox in WinXP(Fat32) on my laptop and attempting to
install Win7. I notice that you say that to run on USB it needs to be NTFS.
Is this the same for a standard hard drive?
There is no mention of this in the forum except for USB use.
My VB is setup 1024Mb Ram (I have 2gb installed) and 10Gb Drive space(Dynamic sizing).

I continually get the error “Hard disk full” and this is when the installation is at 4GB file size(85% installed).
I have deleted files off C and D drives to free up space, altered the ram setting down to give more to the host

Jorge Sierra

Yes, the file size limit applies to a standard hard drive as well. That’s the reason you’re getting that error when you reach the 4GB mark. The virtual hard drive resides within a single file on the host system, so if you install VirtualBox on a FAT32 disk (USB, hard drive, or otherwise) you will encounter this limitation.

Really the only workaround would be to convert your FAT32 disk to NTFS.

ssmokin

Sorry, didn’t finish note.

Has anyone else experienced this and if so is there a work-around?
Thanks

ssmokin

Thanks Jorge, yea I took the plunge and used EASEUS partition
manager to create a 10gig NTFS partition, it was dead easy and Win7 installed straight up.
Best ssmokin

shahid

i have successfully installed windows 7 as guest OS on my windows XP system . however i am not able to access folders of my host OS within the guest OS. i have tried sharing folders but now i dont know how can i see them
any help?

Jorge Sierra

I also had trouble getting the folder sharing to work. I just set up regular folder sharing via Windows to get around it.

Paradigm

Jorge,

Thanks so much for the information. I got everything working pretty well but I’m having trouble installing applications on my shared drives.

I have an application drive that I share with both Windows7 and Ubuntu, I want to also use it for installing applications on my virtual Win7 machine. From my Win7 VM I can see the drive and access files and even execute files from them. However when I try to browse to the shared drive to install applications it shows up with an x on it and says that it not connected. Also when I execute a program from the shared drive, the program can not access any of it’s required data on the same drive, and I get errors saying that it can access the drive. Is there a problem fully connecting these drives, or is it just a limitation of Windows 7 preventing me from installing onto shared drives?

Jorge Sierra

Hmm… I’m not at all familiar w/ how Win7 treats Windows shares, but it sounds as though you may have some kind of permissions issue. Does your Win7 user have permission to read/write to the share?

You could always make the share public and read/write for all. That should solve the problem, although is an insecure solution. If all of your machines are behind a secure firewall, you should be relatively safe.