Sei sulla pagina 1di 8

How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

A B OU T AN I L DASH B E ST OF M OST POPU L AR M OR E I N F O »

AN I L D A SH A B LO G AB O UT M AKI NG
CULTU RE

OC TOB E R 21 , 2009 HOW T O R U N WIND OWS 7 U ND ER M AC OS


XEarlier:
1 0. 6 FORandFR
Communications EE
Perception
Next: Twitter, Outlines, Lists, Directories, Y!ou
Update: Since this post got a lot more readers than I expected, it's become clear to me that
the title was unintentionally vague. I thought it's amazing that a technology I still think of as
fairly advanced, virtualizing operating systems on the desktop, has become commoditized
enough that free, open source tools are very mature. When I said "for free" here, I meant that
virtualization is available at no cost, not that Microsoft's giving Windows licenses away for
free. Sorry for assuming that was obvious!

Pardon the uncharacteristically nerdy post, but I thought I'd write up a handy way I'd found to
run Windows 7 in a seamlessly-integrated virtual machine under Mac OS X 10.6. I started
with these basic components:

A MacBook running Mac OS X 10.6.1 (Snow Leopard)

A license for a full install of Windows 7 Ultimate

VirtualBox 3.08 for Mac OS X

If you're like a lot of geeks that I know, you have a Mac as your main machine, but often need
to drop into Windows to check things like browser compatibility or to use some particular
Windows applications. I happen to just really like Windows 7 (it's on par with Mac OS overall
for me, with some parts being better, such as the Windows Taskbar being much better than
the Mac's Dock, and of course some parts being worse.) Some of these instructions may be
obvious, but I hadn't seen a writeup anywhere, so here goes.

Here's what you'll need to do:

1. Install Windows 7 under Boot Camp, following the normal instructions. All of the Vista
drivers for Boot Camp worked fine for me, and the install was actually pretty quick.

2. Download and install VirtualBox. This is an open source virtualization system that runs
on Mac OS, a lot like Parallels Desktop or VMWare Fusion, but available for free.

3. The tricky part: You'll need to do a little bit of geeky stuff. First, eject the Windows boot
camp disk in Finder. (It's usually called "Untitled".) Then, launch Terminal so you can
enter two commands.

sudo chmod 777 /dev/disk0s3

VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename


win7raw.vmdk -partitions 3

4. Start up VirtualBox, make a new Windows 7 machine, and browse to win7raw.vmdk in


your home directory to choose the virtual hard drive for the machine. Your Windows
install should boot up. It'll fuss for a little while as it installs new drivers.

5. Once that's done, you can optionally install the VirtualBox Guest Additions software to
let your Windows install completely integrate with your Mac OS X environment.

While it's not quite as seamless as some of the paid alternatives out there, I've found it was
very easy to do (under an hour total, and only 15 minutes or so if you already have Windows
installed), works very well, and is speedy enough to use regularly.

As always, your mileage may vary, and comments or corrections or feedback are welcome. I
was too lazy to do screenshots of the whole process, but if you want to turn this into a complete
gadget blog-worthy writeup, I'll be happy to link to it. If you really liked this how-to, you can

1 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

buy WIndows 7 from Amazon and I'll make a few bucks.

11:34 PM | 59 Comments

Tagged fusion, mac os, microsoft, parallels, snow leopard, virtualbox, virtualization, vmware, windows 7

59 C O M M ENT S

1 - 50 Newer Comments >>

If you don't need dual boot, you can Windows 7 as a new machine straight into Virtual Box,
I've done this without any problems - avoids the terminal voodoo ... Chris

https://www.google.com/accounts/o8/id?id=AItOawld43omhX_yhtklMXx8sp9zQJtK7iJLxrM |
October 22, 2009 1:35 AM | Reply

Agree with Chris.

For a little more specifics: create a new blank VM, I suggest give it 1gb of RAM if you have
4gb in your Mac.

Before starting the VM for the first time, from the 'you just created a new VM' use the
settings pane on the VM; click on the CD/DVD section and tell it to use either your physical
Win7 DVD or your Win7 .ISO.

And away you go!

This approach works in pretty much every VM app, for what it's worth. No terminal jiggery
required.

dan.becker | October 22, 2009 2:27 AM | Reply

Yep, I shoulda mentioned that. I just like the Boot Camp option too.

Anil | October 22, 2009 3:03 AM | Reply

The title teases me too much. My hope that I'll read about converting that free Windows 7
VHD into VirtualBox is ruined now. :(

priglup | October 22, 2009 3:54 AM | Reply

Next time you drop a line of commands on people, take that extra, oh, 5 minutes to write out
what the command is actually doing to their system, instead of going "Trust Anil".

Jason | October 22, 2009 4:35 AM | Reply

Does Windows 7 behave better than XP in a situation where it is run under both Boot Camp
(ie. native hardware) and a virtual machine (ie. virtual hardware) with respect to Windows
Activation? I have XP installed on my Mac in this way, but as the hardware changes
whenever I switch from booting via Boot Camp to VMware and vice versa it keeps wanting
to check in with Microsoft... which I am sure means I am going to run afoul of some
licensing restriction over at Redmond.

jim.mcslim | October 22, 2009 5:17 AM | Reply

Got this error in Terminal after the second command:

Error opening the raw disk '/dev/disk0': VERR_ACCESS_DENIED


The raw disk vmdk file was not created

craig.herm | October 22, 2009 10:25 AM | Reply

I have the same issue as craig.herm above.

Any help here?

2 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

Michael | October 22, 2009 10:35 AM | Reply

@Michael, craig.herm - don't have my system in front of me, but are you sure you are typing
"disk0" (as in zero) and not "disko" (as in the Bee Gees)?

klbostian | October 22, 2009 11:04 AM | Reply

@klbostian yes, I am typing 0, the number.

I found this issue on the VirtualBox forum:

http://forums.virtualbox.org/viewtopic.php?f=8&t=19866

It appears that you need to specify the partition (disk0s3, not disk0).

Michael | October 22, 2009 11:07 AM | Reply

Two questions: Is there any reason this wouldn't work with Ubuntu? And won't Windows
detect a difference in hardware and ask for a re-activation?

rowancorbett | October 22, 2009 11:08 AM | Reply

I was having the same issue but got it to work by running the command with sudo-

sudo VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename


win7raw.vmdk -partitions 3

Also, after that, I had to chown it back to my user-

sudo chown win7raw.vmdk

albert.volkman | October 22, 2009 11:08 AM | Reply

I like to start up the VM and then log into it via remote desktop connection - much more
snappy.

I'll have to give the guest OS additions a try.

https://me.yahoo.com/a/Xty4ZEV219vofbI3p3dgxrbF7hY_RA_si0A-#21eb6 | October 22, 2009


11:09 AM | Reply

Hey, thanks for the guide!! I've wanted to do this with my Linux partition for some time, so
I'm gonna try this out! I just wish that there was a way of installing Snow Leopard in VB,
because it would be great to be able to pop over to the mac side for a program, while still
running things on my linux side, and vice versa. ::shrugs::

-dreadpirate15

shortntough | October 22, 2009 11:31 AM | Reply

I guess it's just me, but no where did I discover to run Windows 7 for free.

If you have to have something that costs money, then you can't run it for free; you can't run
it if you don't have it.

Sorry I'm grumpy today, but your misleading title and the time I wasted reading the article
left me no choice but to leave this comment.

Seriously, you're a good enough writer that this kind of verbal wordplay is, honestly,
beneath you.

glowrocks | October 22, 2009 12:08 PM | Reply

I've run into the same issue with the disk0. Specifying the partition didn't seem to make any
difference.

Albert's solution seems to work until I get to choosing the boot disk in VirtualBox. I click
Add, then navigate to the file, but I get "failed to open the hard disk," "could not open the
hard disk," and "VD: error opening the image file."

3 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

Any ideas? Perhaps I chown-ed it incorrectly?

joel.whitney | October 22, 2009 12:28 PM | Reply

You can use the installer in VirtualBox directly.

Andrew Steinborn | October 22, 2009 1:15 PM | Reply

Same issue as Joel. Almost there... Then denied import...

Ron | October 22, 2009 1:36 PM | Reply

@Joel and @Andrew

Try "sudo [USERNAME] chow *.vmdk"

you need to give yourself back permission on both


win7raw.vmdk and win7raw-pt.vmdk

That's what resolved the issue for me.

Brendan | October 22, 2009 1:54 PM | Reply

That said, I'm now getting a bluescreen of death and a repeating restart whenever I run the
VM

Brendan | October 22, 2009 1:57 PM | Reply

That said, I'm now getting a bluescreen of death and a repeating restart whenever I run the
VM

Brendan | October 22, 2009 1:58 PM | Reply

Does bootcamp still run alright?

Ron | October 22, 2009 2:04 PM | Reply

That said, I'm now getting a bluescreen of death and a repeating restart whenever I run the
VM

Brendan | October 22, 2009 2:13 PM | Reply

Yes. Bootcamp still runs fine, just the VM image that's bluescreening.

Brendan replied to comment from Ron | October 22, 2009 2:14 PM | Reply

Does this only work for Windows 7? I'm trying it with Vista, but it doesn't seem to boot.

gadamc | October 22, 2009 2:19 PM | Reply

OK, I fixed my issue. I changed the IDE Controller Type to "ICH6" and I was able to boot
into the machine. Given that my BSOD was referenced as a HD error on several forums, this
makes a kind of sense (I'm still pretty new to using VMs).

Might be other issues to uncover, but for now I'm in. :)

Brendan replied to comment from Ron | October 22, 2009 2:29 PM | Reply

Why is Windows 7 Ultimate required for this? Can't I use it with Home Premium?

https://www.google.com/accounts/o8/id?id=AItOawmbY1zdmqcM-D3alu83Nx1y_cOHpWP-xEk |
October 22, 2009 2:29 PM | Reply

4 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

There's a VMware solution to this problem for VIsta. I haven't tried it with 7, but it seems
like it should work.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&
cmd=displayKC&externalId=1003426

You activate in Bootcamp, install VMware tools, reboot to OS X, launch inside of Fusion,
activate again, and install VMware tools again. It will use 2 activations, but you're allowed 2.

bguilbault replied to comment from jim.mcslim | October 22, 2009 4:16 PM | Reply

Hi Anil,

Really keen to get this going and I think your guide is great. After dismounting my Windows
7 BootCamp installation drive and copy and pasting the first command it prompts me to
enter my admin password. I do this and then copy and paste the second command - It
responds with the following error;

Error opening the raw disk '/dev/disk0': VERR_ACCESS_DENIED


The raw disk vmdk file was not created

Any ideas?

Kev

Kevin | October 22, 2009 6:38 PM | Reply

Considering the cost of a Windows 7 license, I wouldn't call this anything close to free.

mls14cim | October 22, 2009 7:26 PM | Reply

If you're getting the following error:

Error opening the raw disk '/dev/disk0': VERR_ACCESS_DENIED

just open Disk Utility, right click on your Boot Camp partition, and click "Unmount" then try
the command again. You'll need to leave the disk unmounted while using Windows under
VirtualBox.

lhagan.myopenid.com | October 22, 2009 8:01 PM | Reply

Unfortunately even following a dismount I continue to get that error. Further suggestions?

Kevin | October 22, 2009 8:42 PM | Reply

Wait, "uncharacteristically nerdy"?

Excuse me while I giggle uncontrollably.

:D

Elizabeth | October 22, 2009 10:18 PM | Reply

Are you using sudo in front of the VBoxManage command as suggested above by
albert.volkman? It doesn't work on my machine otherwise.

Aside from that, I can't think of much else. Perhaps your Boot Camp disk isn't disk0s3. In
Disk Utility, select the disk and press the Info button. Check to make sure the Disk
Identifier is disk0s3. If not, you can change the disk/partition numbers in the terminal
commands to match your disk's identifier.

lhagan.myopenid.com | October 22, 2009 10:34 PM | Reply

I was getting the same access denied error even after doing the chown of win7raw.vmdk, but
i noticed there is a second file win7raw-pt.vmdk I did:

sudo chown [username] win7raw-pt.vmdk

and then i was able to mount the partition

5 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

Brian | October 22, 2009 11:09 PM | Reply

I have the free Windows 7 RC running on VirtualBox (not Bootcamp).

Kattya | October 22, 2009 11:32 PM | Reply

The second command, needs to be preceded by a "sudo", that is:

sudo VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename


win7raw.vmdk -partitions 3

Doing so will create two files in your home directory called win7raw.vmdk and win7raw-
pt.vmdk. Because the second command is run via sudo, the two files created will be owned
by root user. Perform the following command to change the ownership:

sudo chown win7raw.vmdk win7raw-pt.vmdk

This will change the ownership of the two files (do not include the "" in the above
command).

After that you can proceed to add this to VirtualBox.

ktula | October 23, 2009 3:28 AM | Reply

Looks like the comment system removed part of the chown command i listed. It should be:

sudo chown your_login_name win7raw.vmdk win7raw-pt.vmdk

ktula | October 23, 2009 3:31 AM | Reply

is there a way to do this with windows xp too?

Andrew | October 23, 2009 10:29 PM | Reply

Fantastic job guys thank you very much. I'm very impressed with your help :-D

Up and running!

Kevin | October 24, 2009 4:08 AM | Reply

So after all these comments and revisions can someone repost the exact text one needs to
input and can you clarify whether it is specific to Ultimate or works on any Win 7 install?

dbrake | October 24, 2009 10:00 AM | Reply

Anyone tried this with SSD disk? Somewhere I get the error
VERR_NET_OPERATION_NOT_SUPPORTED ...
And yess I have used both commands preceding with sudo

Somewhere in the back of my head, I remembered that wth ubuntu the disk were mounted
in other paths.
Don't know if this happens under Mac OSX?

beyond3d | October 24, 2009 10:15 AM | Reply

I'm having the bluescreen of death as well. I'm not sure how changed the drivers that fixed
the problem. Could you please explain in more detail what you did? Thanks in advance.

boruchsiper | October 24, 2009 8:20 PM | Reply

I'm having the bluescreen of death as well. Does anyone have the same issue and have you
found a solution?

boruchsiper | October 24, 2009 8:30 PM | Reply

To get rid of the blue screen problem, go to virtualbox and change the IDE Controller Type

6 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

to "ICH6. (courtesy of brendan above).

Has anyone else not been able to get sound to work? If anyone has a solution I'd appreciate
it.

n.robhenry replied to comment from boruchsiper | October 26, 2009 7:30 PM | Reply

To get rid of the blue screen problem, go to virtualbox and change the IDE Controller Type
to "ICH6. (courtesy of brendan above).

Has anyone else not been able to get sound to work? If anyone has a solution I'd appreciate
it.

n.robhenry | October 26, 2009 7:35 PM | Reply

When I start the VM I get "A disk read error occurred"

jvantuno | October 26, 2009 9:48 PM | Reply

I'm able to get it to work, but after booting into Win7 via Boot Camp, I'm not able to get back
into the image in Virtualbox.

The error it gives me is that "VERR_ACCESS_DENIED." Anyone else having this issue?

James | October 27, 2009 11:17 AM | Reply

I've found that every time I restart my system (or at least after booting into Win7 via Boot
Camp) I need to run the command "sudo chmod 777 /dev/disk0s3" in order for the
Virtualbox setup to work.

James | October 27, 2009 11:26 AM | Reply

I'm having the same problem. I execute the second command and get:

Error opening the raw disk '/dev/disk0': VERR_ACCESS_DENIED

I use sudo, and get:

Error while creating the raw disk VMDK: VERR_NET_OPERATION_NOT_SUPPORTED

I'm on Snow Leopard, and VirtualBox 3.0.8.

jftalarico | October 28, 2009 10:33 AM | Reply

1 - 50 Newer Comments >>

LE A V E A C O M M E NT
Sign in to comment, or comment anonymously.

Comments (HTML is okay)

SEAR CH W HY , HEL L O!
I'm Anil Dash, and I've blogged half a million words
here since 1999, writing about how culture is made.
Contact me at anil@dashes.com, phone +1 646 833

7 of 8 6/25/2010 1:16 PM
How to run Windows 7 under Mac OS X 10.6 for free - Anil Dash http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-1...

8659, follow
anildash on
Twitter or IM, or
subscribe. Still
curious? Find out
more about Anil »

AR CHIVES

1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan
Feb Feb Feb Feb Feb Feb Feb Feb Feb Feb Feb
Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar
Apr Apr Apr Apr Apr Apr Apr Apr Apr Apr Apr
May May May May May May May May May May May
Jun Jun Jun Jun Jun Jun Jun Jun Jun Jun
Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul
Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug
Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep
Oct Oct Oct Oct Oct Oct Oct Oct Oct Oct Oct
Nov Nov Nov Nov Nov Nov Nov Nov Nov Nov Nov
Dec Dec Dec Dec Dec Dec Dec Dec Dec Dec Dec

This site is published under a Creative Commons License and powered by Movable Type Pro. Ideas expressed
here are mine alone, and do not represent Expert Labs, AAAS, Activate, my wife, or any other institution or
organization. Thank you for reading my site. I appreciate it.

8 of 8 6/25/2010 1:16 PM

Potrebbero piacerti anche