Question

I'm looking for a solution that would enable me to install Ubuntu and run it as a virtual machine under OS X but still be able to boot directly Ubuntu.

If possible I would like to test both scenarios: Ubuntu guest on OS X host and Ubuntu host and OS X guest.

Was it helpful?

Solution

If I remember correctly, you should be able to install Ubuntu into Boot Camp, and then virtualize it using Parallels Desktop. Works great with Windows; most likely with Ubuntu as well.

OTHER TIPS

I also wanted to run ubuntu native on my iMac and could not figure it out for the longest time. I refused to use virtualization software. Took a look at ubuntu's website and the instructions it provides work the best for me.

First make bootable Ubuntu USB Stick

http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx

Restart your computer.

Hold down Option ⌥ when chime sounds.

Select your installation method (i.e.: install Ubuntu along side OS X)

  • installing Ubuntu as dual boot with OS X
  • running OS X from within Ubuntu:

    • install VirtualBox
    • add yourself to disk group: sudo usermod -G disk,vboxusers -a `whoami`
    • create a virtual disk pointing to your real disk

    VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/OSX.vmdk -rawdisk /dev/sda -partitions 2 -relative (if your OS X is not on /dev/sda2, change disk and partition number accordingly)

    • create a virtual machine with system OS X 64-bit, with the disk pointing to virtual disk you've just created
    • you're ready to launch

People have gotten VirtualBox to use a partition as a drive for a virtual machine. However, I don't believe it is officially supported. This link, while discussing windows as the guest, may point you in the right direction.

http://forums.virtualbox.org/viewtopic.phpf=7&t=20793&p=89806&hilit=raw+partition+vista#p89806

Old but still contains useful information:

http://blarts.wordpress.com/2007/12/06/how-to-run-virtualbox-using-a-physical-partition-using-ubuntu-feisty-fawn/

Your best bet is going to require a significant amount of manual work. Technically, you can't Boot Camp Ubuntu as it is a specialized way to streamline Windows dual boot installs on Macs.

However, you can use it to create an initial partition, which you delete and format for Ubuntu's use. Alternatively, you can use Disk Utility to decrease the size of your OS X partition. Then use Ubuntu's installer to modify that empty space into usable partitions for Ubuntu. From there, install Ubuntu as usual. (Be sure to hold down C while booting to ensure you boot from the disc.)

Finally, you would have to choose your virtualization platform:

  • VirtualBox supports raw disc access but has very large warnings against its usage due to data corruption concerns, etc. Chapter 9 of their manual covers raw disc access.
  • VMware Workstation supports raw disk access, but unfortunately doesn't work on OS X. Even worse, VMware Fusion doesn't appear to support setting up raw disk access from the GUI.

The workaround, should you choose the VMware approach, is to use the command line tools and manually editing config files to give you access to raw disk access. This forum thread has useful discussion on this process, as well as other concerns.

Yeah your only option is to install Ubuntu and OS X in a dual boot scenario and install VirtualBox on both. the OS X (guest) inside V-Box is pretty difficult to do but definitely possible because I have done it. Ubuntu (guest) inside OS X is simple to set up.

To my knowledge, you can't have an Ubuntu virtual machine (VMware, VirtualBox or even Xen) and then be able to native boot the same. Seems kind of crossed purposes to me... :)

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top