Ubuntu Natty in Virtualbox with Unity

I have found myself explaining multiple times over the past few weeks how to get Ubuntu Natty with Unity working in Virtualbox virtual machines, there seems to be a common misconception that it doesn’t work (it does) and a common perception that it is not obvious how to do it  (perfectly valid). So this is how. Firstly install a fairly new version of Oracle VirtualBox on your host operating system (I am using Ubuntu 10.10, I expect others including Windows would also work). The open source edition of Virtualbox might also work, but I am using the Oracle edition, not the OSE edition from the repositories.

Set up a new virtual machine, give it say a gig of ram and 32MB  video ram (works with less, but that seems comfy) and check the box in the display properties to use 3d acceleration. Now install Ubuntu Natty as you would normally, it will tell you that you don’t have the hardware to run 3d Unity, which is fine – you don’t have the right graphics drivers yet.

At this point you might be tempted to try and install the Virtualbox guest additions using the menu option on the host. Do not do this. That way lies pain, confusion, and no working graphics.

Instead, the right way to do it is to log in to the guest operating system and install the virtualbox-ose-guest-x11 package. Do not be tempted by virtualbox-guest-additions that is the wrong thing (it is the CD image that a host injects into a guest, no point installing that in a guest). Do not worry about installing a package with -ose – in the name inside a non-ose host, it doesn’t matter.

Once you have done that, restart your guest and you should boot into a shiny new Ubuntu Natty with Unity, if you got it right it should look something like the screenshot below with the sidebar. You can also see the onboard keyboard with brown keys that is going to be shipped as part of the shiny new Natty desktop, plus a version that I spent a few hours theming to make it look like it kind of belongs in the new branding. Would be nice to get the letters in the centre of the keycaps, if anyone wants to help with that give me a shout in the comments.

24 Comments

  • stlouisubntu says:

    Any possibility of running Unity under KVM? Is VMGL a possibility or has it been no longer devloped for quite some time.

    Also, on a little bit different note: the betas of the Ubuntu-Saner-Defaults-Remix (i.e. no mono and evolutions replaced with Thunderbird are available for download and feedback at http://sourceforge.net/projects/ubuntu-sdr/files/natty/

    • Alan Bell says:

      I really don’t know. In theory it looks like VMGL has a decent prospect of working, I just tend to use KVM on remote servers and virtualbox on the desktop – partly because I want 3d support and I didn’t think KVM could do that!

      • stlouisubntu says:

        Alan, it is killing us to wait. Please, tell us how do you remove all mono from Natty Narwahl?

        • Alan Lord says:

          I’ve so far avoided using Natty to any great extent, but from a short initial test, I think the previous command for 10.10 will catch most of it. Give it a try and let us know.

          • stlouisubntu says:

            I did and it seemed to work really well. In fact I did it in conjunction with the latest release of the Ubuntu-Saner-Defaults Remix and now have 32 and 64-bit CDs (the 64-bit is a bit larger than a CD so use a USB stick for that) available for download. Further, I have 32 and 64 bit DVD isos available (which include the saner-restricted extras packages as well as gimp, scribus, wine, gnucash, and luckybackup.

            I was referring to the “How to Remove Mono” blog post you usually make which has become a traditional part of the 6-month release cycle to which your followers eagerly look forward with great anticipation.

            http://sourceforge.net/projects/ubuntu-sdr/files/natty/

  • […] Instruktionerna för att fÃ¥ Unity att fungera i VirtualBox hittade jag pÃ¥ webupd8.org och theopensourcerer.com. […]

  • Mircea says:

    Nice work on the theming of onboard. I hope it will be included in natty.

    • Alan Bell says:

      I have been talking to the design team, it may get in as a 0day SRU, i.e. an update released on the day the iso images are released. I also managed to get the keycaps centred and a circle of friends on the super key rather than the sub-optimal “Win” that is there at the moment.

  • Ris says:

    It works! Thank You.

  • Avni says:

    FYI, I tried this on a Mac OS X 10.6.7 host running Virtualbox 4.0.4 and after installing the package and restarting, it crashed the host causing me to hard reset. But thanks for the tip, I’ll try it on a windows host next time.

  • Owen says:

    Just a note: This does work in VirtualBox OSE as long as you are using ver. 4. If you’re just using VirtualBox from the Ubuntu repository it will not work. Download v. 4 from http://www.virtualbox.org/wiki/Downloads first, then setup your new VM. After installing the additions using sudo apt-get update
    sudo apt-get install virtualbox-ose-guest-*

    and rebooting everything worked great!

  • […] Ubuntu Natty in Virtualbox with Unity […]

  • Michael Miller says:

    Yeah, didn’t work at all.

  • Mike says:

    I have 3D enabled and 32 MB of video RAM and have tried VB Guest Additions and OSE Guest Additions in the latest VB 4.0.6r71416 on Windows 7 x64.

    Natty 32 bit does not boot into Unity for me …

    • kris says:

      Did you not read. Do NOT use guest additions. Install the virtualbox x11 driver from the drop on the guest.

      • Mike says:

        Sorry I mistook “virtualbox-ose-guest-x11” as some kind of Guest Addition – so I tried that too, without other guest additions …

        In the end I installed Guest Additions and unity-2d which does work

        • Mike says:

          http://www.ubuntuupdates.org/packages/show/292944

          Name: virtualbox-ose-guest-x11
          Description: x86 virtualization solution – X11 guest utilities
          VirtualBox is a free x86 virtualization solution allowing a wide range
          of x86 operating systems such as Windows, DOS, BSD or Linux to run on a
          Linux system.
          This package provides the X11 guest utilities of the Open Source Edition of VirtualBox. These utilities are meant to be run inside the virtual machine. They provide closer integration and improve the interactive performance.

          Sounds like open source guest additions to me

  • […] had read here that you should only install the Open Source Edition (OSE) of the VirtualBox Guest Additions in […]

  • John M. says:

    Does this not work with the amd64 version of Ubuntu? I tried wiping my virtual drive and reinstalling. My vm has 32 MB of video ram, 3D Acceleration turned on, 2048 MB of RAM and 2 processors allocated. This time I did not install the guest additions from the virtual CD but installed the virtualbox-ose-guest-* packages using apt-get.

    After rebooting my VM, I still get the classic desktop even though I have selected “Ubuntu” in the login screen.

    • bingo says:

      This does work with 11.04 64bit. I’ve just setup a fresh VM from the official ISO (1536MB RAM, 128MB video, 3D enabled) using the method detailed in this post.

      First boot gave the expected alert, restarted and let it log in as Classic, installed virtualbox-ose-guest-x11, restarted and was able to use Unity. It took a minute or two to display Unity on the first run, otherwise it was flawless.

      Thanks to the original author for this article.

  • aikiwolfie says:

    I tried installing the suggested package. It did nothing to help with the graphics. Damn thing can’t even hold it’s theme in place never mind run Unity.

  • SyncroMicha says:

    I can tell you that here a Natty 64bit is working with Unity in a VirtualBox VM using the supplied guest additions.

    Host: Ubuntu Lucid (10.04) 64bit with VirtualBox 4.1.2
    Guest: Ubuntu Natty (11.04) 64bit with guest addition 4.1.2

  • Nicola says:

    Hi,

    I’m trying to get Unity running on Ubuntu 11.04×64 as a guest under Windows 7×64.
    When I install the virtualbox-ose-guest-x11 and then reboot, after the log on screen it won’t load anything.
    Also, in the log on screen I don’t get the option to boot with Classic or Unity, it’s just not there after installing updates and then the vb package you said to install.

    I’m very, very rusty with linux and have been using windows only for the last 10 yrs or so, so beginner-friendly help would be really appreciated.

    Thanks!

  • Sumanth says:

    Hi, I am facing one problem. Hope you guys can help me.
    I installed Ubuntu 11.04 in latest virtual box 4.1.4. I have given 36 Mb of video memory and 1700 Mb of RAM. The Unity is not working in my installed Ubuntu(i.e. the side bar). Its showing the classic view. If I enable 3G-Acceleration in virtual box settings, its showing only black screen when i run. I want to run Unity in my virtual box. Please help. My host OS is Windows 7.

Leave a Reply to Links 22/4/2011: Planning for GNOME 3.2 | Techrights

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>