Using VirtualBox to run Ubuntu and any other operating system

Using VirtualBox to run Ubuntu and any other operating system


GNU/Linux can be scary to a new user. After all, what if you mess up? What if you end up corrupting your hard drive so badly that you need to format it to get rid of GNU/Linux? The solution is to use virtualization technology. A virtual machine creates a virtual hard drive as well as a virtual computer, so you can install and run it from within another operating system. If you want to get rid of the virtualized (also known as the guest) operating system, just delete the virtual hard disk from the real (host) computer’s hard drive.

Introduction

First, choose which virtualization tool to use. Right now, there are four big ones: Parallels, VMWare, QEMU, and VirtualBox. Parallels is commercial at US$49.99 for Windows and GNU/Linux. For me, that is way too expensive. That leaves us with VMWare, QEMU, and VirtualBox. VMWare has two freeware versions. One (called a player) runs pre-built operating systems (known as appliances). The other one (called a server) will make machines, but isn't as fast as the professional version. The problem with QEMU is that it is completely command-line (there are GUIs made for it, but they never worked for me). Therefore, it is extremely complicated to create a new virtual machine with it. Besides, it just can’t do some basic things that the others can (like pause a virtual machine, for example). That leaves us with VirtualBox.

VirtualBox is free software. It is cross-platform (runs on Windows and GNU/Linux, with an Intel Mac version in beta). It runs Windows, OS/2, GNU/Linux, BSD, Netware, Solaris, and L4 guests. And on certain guests, you can install VirtualBox Guest Additions, which lets you share files and more between the guest and the host. The next version, coming soon, will include support for running the pre-built VMWare appliances [1]. It simply works.

Getting VirtualBox

Getting VirtualBox varies from platform to platform. There are binaries on the download site for Windows, Ubuntu 6.06-7.04, Debian 3.1-4.0, openSuSE 10.2, Mandriva 2007.1, Red Hat Enterprise 4, and the Univention Corporate Server 1.3-2. The SimplyMEPIS site has a guide to installing VirtualBox here. If you run Ubuntu or MEPIS, you can install Automatix, which will install VirtualBox for you. Lastly, there is also a generic installer for GNU/Linux on the download page. Unfortunately, there are two versions of VirtualBox: one is freeware and one is free software. These binaries are for the freeware version, rather than the free software version. For some reason, Innotek (the company behind VirtualBox) hasn’t released open-source edition binaries. I’m not really sure why hackers haven’t released any binaries using the source code (the exception is one by a Macintosh programmer, who created an unofficial free software OS X 10.4 binary here). However, I am sure binary versions of this fantastic piece of software will eventually appear for many different distributions.To compile, visit the Build_instructions page at the VirtualBox wiki. GNU/Linux and Windows are supported, with Macintosh OS X (Intel-only) and OS/2 in testing.

Setting up your first virtual machine

Now that VirtualBox is installed, create your first virtual machine. Your first guest will be the well-known Ubuntu. Download the 7.04 Desktop edition CD image here. When it finishes downloading, open VirtualBox (on GNU/Linux, LD_LIBRARY_PATH=. ./VirtualBox, on Windows, run VBoxSDL.exe in the folder you compiled it in).

Select the “New” button (or hit Ctrl + N). A “New Machine Wizard” window should pop up (figure 1).

Figure 1: New Machine WizardFigure 1: New Machine Wizard

Click “Next”. Then, type a name for the virtual machine (I typed Ubuntu). Choose Linux 2.6 (the standard for most modern Linux distros) for the OS type, then hit “Next”. You will be asked how much memory to give. Choose 256MB. For most GNU/Linux distros, you’ll need at least 256MB of RAM to be comfortable (you’ll also need to make sure you have at least 512MB of total physical RAM and have all possible programs closed). Next, you will be confronted with an option to create a hard disk (figure 2).

Figure 2: New Virtual Disk WizardFigure 2: New Virtual Disk Wizard

Click “New”, and yet another window opens. Click “Next”. Now, you have an option to create a dynamically expanding image (hard drive) or fixed-size. Fixed size stays a certain size, while a dynamically expanding one gets bigger or smaller depending on what’s on it. For now, choose dynamically expanding. The next dialog asks you how big you want the hard drive to pretend to be (actual size will vary as mentioned before). Choose 5GB. Next, make sure all details are correct, then click “Finish” to exit the virtual disk wizard. Hit “Next”, confirm everything is correct, then “Finish” to exit the new machine wizard.

Now, click “Ubuntu” once, then click “Settings” (figure 3).

Figure 3: Adding a CD/DVD-RomFigure 3: Adding a CD/DVD-Rom

Select “CD/DVD-ROM”. Then, check the “Mount CD/DVD Drive”, select “ISO Image File”, then click the folder icon. The Virtual Disk Manager will pop up. Click “Add”, browse to the place where you saved the Ubuntu file, then highlight it and click “Open”. Now, click “Select” to assign the Ubuntu CD to the Ubuntu virtual machine. You may also want to make sure the “Enable Audio” under the Audio section is checked, so your audio is working.

You are now ready. Click “Okay” and then double-click the “Ubuntu virtual machine”. A new window should launch (figure 4).

Figure 4: The Ubuntu installerFigure 4: The Ubuntu installer

Select “Start or Install Ubuntu”, with the arrow keys, then hit “Enter”. Clicking inside of the window will capture the mouse so you can use it in the virtual machine. To release it hit the right control (Ctrl) key. Wait for Ubuntu to load the desktop. Then, double-click on the “Install” icon. Select a language, then a city, then a keyboard layout, and give some personal info. When you are asked to prepare disk space, choose to erase the whole disk, then hit “Next”. Verify everything is correct, then hit “Install”. Wait for Ubuntu to finish installing (this will take a very long time). Then, restart when it prompts you to. It will tell you to remove the CD. Click the “Devices” menu at the top of the window, and click “Unmount CD/DVD-ROM”. Then, hit “Enter”. Ubuntu will finish restarting. Now, you are done! You can delete the CD image by taking the following steps: first stop the virtual machine by shutting it down (click the power button in the top right corner in Ubuntu). Then click on the Virtual Disk Manager (“File→Virtual Disk Manager” in the main VirtualBox window), then the CD/DVD Images tab, then click “Release”, then “Remove”. Then, delete the actual CD image.

More advanced usage

Now that Ubuntu is up and running, do some more advanced things with it. You can integrate the mouse (in other words, you won’t have to keep hitting the right Ctrl key to release it) by installing Guest Additions. Guest Additions will also improve your video support and synchronize your time with the virtual machine’s time. Here’s how to install it: open the Ubuntu virtual machine, click “Devices” at the top of the window, and then “Install Guest Additions”. Then go to “Accessories→Terminal”, type cd /media/cdrom0. Then type sudo sh ./VBoxLinuxAdditions.run and hit “Enter”. Follow the on screen instructions. Then, restart (hit the power icon in the top right corner). Now, the cursor isn’t trapped inside the virtual machine!

Another powerful tool that VirtualBox offers is the pause feature. If you close the virtual machine, it will pop up a message asking whether to power off or save machine state. Powering off is the equivalent of unplugging the power cord to the virtual machine. Saving the virtual machine state basically pauses it. It is sort of like hibernating. When you open up a saved machine, it will automatically pick up from where it left off. This is particularly useful when you are installing a new operating system, and want to turn it off without messing up the install.

Where to go from here

Ubuntu isn’t the only GNU/Linux distribution (or operating system) that VirtualBox can run. It can run Windows, SuSE, Linspire, and much more (see the Guest OSes page at the VirtualBox wiki for more). It’s a great way to test out GNU/Linux distros before you install them for real. It’s great for security: getting viruses in the virtual machine doesn’t affect the host machine. And GNU/Linux users can run it and Windows at the same time without paying a cent. All in all, VirtualBox is a powerful program that is worth the download.

References

[1] Open source at CeBIT 2007

Category: 
License: 

Comments

Lucanuscervus's picture
Submitted by Lucanuscervus (not verified) on

Dear Andrew,

Unfortunately, virtualbox doesn't run on a 64 bits box.Therefore, Vmware is the only available option.

From VIrtualbox wiki website:

VirtualBox does not yet support 64-bit hosts. This is actively being worked on. (And no, you can't install the 32-bit version on a 64-bit host.)

Andrew Min's picture
Submitted by Andrew Min on

VirtualBox must have heard you, since 1.4 was just released WITH support for 64 bits.

--
Andrew Min

Freejack's picture
Submitted by Freejack on

Jun 5, 2007 VirtualBox 1.4.0 released!

With version 1.4.0 innotek added AMD64 machines as host.

Downloads can be found here: http://www.virtualbox.org/wiki/Downloads
Change log here: http://www.virtualbox.org/wiki/Changelog

gspil's picture
Submitted by gspil (not verified) on

i am running it fine on my 64 bit amd 3600 core2, had more trouble with vmware server, virtualbox will run on 64bit box, but it will only run 32 bit os's

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

QEMU has long supported "pausing" a virtualized OS. QEMU is not extremely complicated, except perhaps for compiling the kqemu kernel kernel for hardware accelleration in x86 environments. But if you have to compile the kernel module for VirtualBox, I don't see why
it would be "extremenly complicated".

It might not be "easy", but is not more difficult than using cat, less, grep or any command line software. Since the author seem to call "easy" only something with a point&click interface.

In my opinion QEMU is far easier than setting up Xen por example.

qemu-img create MyVirtualHardDisk.img 10GB
qemu -hda MyVirtualHardDisk.img -cdrom /dev/hdb -boot d -m 128 -monitor stdio

On 2 lines its already running booting from CD with 128MB of ram with standard I/O for controling fine tuning.

Andrew Min's picture
Submitted by Andrew Min on

QEMU has long supported "pausing" a virtualized OS.

Really? How?

It might not be "easy", but is not more difficult than using cat, less, grep or any command line software. Since the author seem to call "easy" only something with a point&click interface.

Is it easier to teach a new GNU/Linux user how to use a GUI, or learn the command line? I personally love the command line for certain things, but not every new GNU/Linux user does.

In my opinion QEMU is far easier than setting up Xen por example.

Agreed, but is it easier than VBox?

--
Andrew Min

Edmundo Carmona's picture

I can only speak about running qemu on linux:

On the fake monitor, if you type alt-ctrl-2 (not F2), you will get to a command line interface... qemu's CLI. There you can send keyboard combinations (like alt-ctrl-del, so you can restart your virtual computer) send a power down, or reset, or use commands like 'stop' to make the VM stop.

After stopping, you can save the VM state into a file (with savevm) so you can "reload" it for later execution (that's why you have the qemu -loadvm option).

There's also a help command that can tell you the commands you have available.

The info about this "hidden" CLI is in qemu's man page.

undefined's picture
Submitted by undefined on

i am using qemu-launcher and qemuctl in debian testing & ubuntu feisty.

i had some problems with the version of qemu-launcher in ubuntu launching qemuctl, but i didn't try to debug it as i created a wrapper for qemu (if $DISPLAY, then run qemuctl, else qemu) and that works. the qemu-launcher in debian is newer, has a better interface, and i don't remember having any problems setting it up.

i don't use qemu-launcher or qemuctl much beyond the simple use cases because i initially learned to do everything manually and often revert to that.

i would like to try virtualbox to compare it against qemu, but until the debian package progresses to a buildable state, i'll stick to qemu. http://bugs.debian.org/406992

undefined's picture
Submitted by undefined on

i've been using the debian virtualbox packages (originally "virtualbox", now "virtualbox-ose") for a month or so now and i'm really impressed by the speed. my desktop is an AMD Athlon XP 2100+ (1700 MHz K7), about 5 year old technology, and qemu was slow and almost unbearable. the worse part is that i couldn't enable guest-supervisor-acceleration in kqemu (only guest-userland) without my windows guest spontaneously rebooting, blue-screening, or unexplainably failing windows updates. with near daily use, i've only had virtualbox crash a guest on me once.

i recompiled the debian packages for ubuntu feisty/7.04 for my wife (only needed to recompile debian's kbuild package for feisty to satisfy virtualbox-ose's build-depends), but the speed-up over (k)qemu isn't as noticable on her hardware (AMD Athlon 64 3000+; 1800 MHz K8). neither is virtualbox's user-friendlier interface an improvement over qemu for her as she only used virtualization for one windows application and she didn't need to mount media, create shared folders, manage snapshots, launch multiple guests, etc (though i appreciate being able to do that from a gui instead of through a terminal and the filesystem). so if you are on fast hardware and have simple use-cases, then (k)qemu is sufficient.

my only want/need is for virtualbox to support compaction/compression in their disk format (guest-integrated by vmware or semi-manually like qemu). i would also be nice to branch snapshots to support different guests (like with qemu's base_image support, where an image can be the base for one or more new images).

if you found (k)qemu too slow or manually intensive, may i recommend virtualbox ose (open source edition).

luisgustavoneves's picture

I have a Win/Linux dual boot machine at work with two hard disks.
Is there a way I can use Virtual Box or Qemu to boot using as guest the OS installed in the other physical hard disk and Linux or Windows as host?

Andrew Min's picture
Submitted by Andrew Min on

I believe VirtualBox has support for "raw disks", but I don't know how to use it. VMWare Server has support, but I never got it to work (plus, VMWare Server is proprietary, only free as in beer).

--
Andrew Min

Edmundo Carmona's picture

Just remember that if you tell qemu to boot using one of those disks (using the disk raw device: /dev/hda or /dev/hdb or whatever... which already means you face a permission problem), qemu will probably boot the system... BUT qemu is in itself a different computer from the one you are running... so no matter what OS you will try to boot, there will be driver recognition involved, if not full stop (like XP would do because it's a different computer from the one it's installed on, right? XP's license is bound to the computer, not the HD).

It _could_ be something like:

qemu -hda /dev/hda

In case you do try.. keep me posted. :-)

PS I must sound like a qemu fan by now.... but I'm not... not yet, at least. It just happens to be the tool I've been fiddling with lately.

Andrew Min's picture
Submitted by Andrew Min on

If you figure something out, I'd like to know too (neither VBox or VMWare worked, though that could be because it's trying to boot something on the same hard drive as an active one...)

--
Andrew Min

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Both VMware and VBox work, and XP detects VMware and allows you to run without having to activate again. You must be doing something wrong.. simply set them to boot from the physical partition (C:, /dev/hda1, etc etc); very easy.

Marc C's picture
Submitted by Marc C (not verified) on

Ubuntu also installs and works just fine on Micro$oft's VirtualPC under XP, now a free download.

Andrew Min's picture
Submitted by Andrew Min on

...is that it is REALLY slow. After all, it's optimized for Windows. VirtualBox can be optimized for several operating systems (different flavors of GNU/Linux, BSD, Windows, etc).

--
Andrew Min
http://andrew.timstown.net/dock.htm

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

... Virtual PC doesnt play very well with Ubuntu or linux in general, but if theres a will theres a way. First of all, vpc will crash if you try to run it in normal mode, so only safe mode works - this may be due to the graphics drivers but I doubt it as virtualbox works fine, plus I tried it independently on 3 machines; win xp/dual xeon/nvidia, win xp/intel4/ati and a vista pentium dual core laptop computer with an ati graphics card.

Second, the mouse doesn't work in ubuntu which is due to some problem with vpc's way of interfacing the mouse driver to the OS.

In conclusion, it is WAY easier to just go with virtualbox, since its both faster and easier.

// CT

xivulon's picture
Submitted by xivulon (not verified) on

Wubi is probably the easiest way to try Ubuntu today. And it runs it at full speed with full hardware access.

http://wubi-installer.org

VeRTiTo's picture

well, i would stay with virtualbox and/or vmware to do deeper messing stuff with any OS children :)

here is my 2 cent of installing virtualbox with fedora

http://vertito.blogspot.com/2007/07/howto-install-virtualbox.html

Point-less's picture
Submitted by Point-less (not verified) on

Ease of use, GUI's, freeness and so forth are pointless. The most important feature for a virtual machine is SPEED! Which virtual machine performs the fastest and the closest to native hardware speeds. I don't understand how all of these articles about virtualization can and do completely ignore this most important attribute.

In this article the closest mention of speed is where you say that the free VMWare server is not as fast as the professional version, which isn't discussed at all in the article. Talk about a pointless and arbitrary benchmark. Nowhere do you compare the speed of VirtualBox to Qemu or VMWare.

I don't care if the product is gratis, libre, $1,000,000, easy or hard. These attributes are pointless in comparison to the most important and most ignored issue. Is the virtual machine the fastest available?

undefined's picture
Submitted by undefined on

...of this website.

This is the FREE software magazine website, and not necessarily the "fast", "featureful", or even "feel-good" website. maybe "fanatical", but that might just be me.

heck, the first goal of this website is "to promote free software and its use" (see for yourself @ http://www.freesoftwaremagazine.com/about).

maybe you meant to visit:
http://www.microsoft.com/windows/
http://www.apple.com/macosx/
http://www.imdb.com/title/tt0232500/

you might even like http://www.opensource.org/docs/osd

but definitely stay away from http://www.fsf.org/licensing/essays/free-sw.html

OIC's picture
Submitted by OIC (not verified) on

Forget about performance and forget about which tool is better for the very specialized job and forget about features. The important thing is to feel good about FREE software. Forget about its shortcomings. Avoid discussing its deficiencies and possibly effecting improvement. This is Free Software Magazine so, you should all bury your heads in the sand and ignore the outside world completely. Better you spend time reading FLOSS licenses and reciting the mantra so as to reinforce your banal philosophy. Get over yourself!

The article is about VirtualBox. That's great. The article rightly contrasts VirtualBox with the other major players in the virtualization field. That's fine and is the proper way to write such an article. But, the article and all the other articles about virtualization software completely ignores the most important attribute of virtualization software and that is performance. It doesn't matter how many features it has if it doesn't perform. It doesn't matter if it is free or even if it is made out of platinum. What matters is how it performs compared to other virtualization software and/or running natively on the hardware.

Your self confessed fanaticism makes you ignorant. Enjoy.

undefined's picture
Submitted by undefined on

Forget about performance and forget about which tool is better for the very specialized job and forget about features.

when did i ever say that performance, features, or applicability are irrelevant? hint: i didn't. but that is what the parent post said regarding performance: "forget about software license and forget about which tool is better for the specialized job and forget about features" (paraphrased in your terms). i merely pointed out that as this is a self-proclaimed free software web site, don't expect performance to be the only criteria, or even the most important one.

The important thing is to feel good about FREE software.

i specifically said the F in FSM stands for "free", not "feel-good".

Forget about its shortcomings. Avoid discussing its deficiencies and possibly effecting improvement. This is Free Software Magazine so, you should all bury your heads in the sand and ignore the outside world completely.

feel free to discuss it's shortcomings. i myself mentioned the shortcoming of no official debian packages. i even disagreed with statements made by the article's author about the functionality of qemu graphical front-ends. please, if you think performance comparisons are missing from this article, then run some benchmarks and publish your findings here as a comment. saying "performance is all that matters and it sucks!" is provably wrong (because if performance was really all that mattered then we would be running native hardware) and doesn't "effect improvement".

The article rightly contrasts VirtualBox with the other major players in the virtualization field. That's fine and is the proper way to write such an article.

in an article about "Using VirtualBox to run Ubuntu and any other operating system" you expect a product review/comparision? this wasn't a software virtualization product comparison, or even a virtualbox review, but an introduction on how to use virtualbox. it just happens to mention in the introduction how the author decided upon virtualbox. so why are people expecting performance reviews & comparisons?

But, the article and all the other articles about virtualization software completely ignores the most important attribute of virtualization software and that is performance.

"most important"? don't make the logical fallacy of projecting your situation onto everybody else. for me virtualization just has to be "fast enough", with higher importance put on software license, community support, cost, customizability, etc.

when i'm required to use windows, i use vmware. it's free, has a decent user interface, a sizable community, and is fast enough. is it faster than virtual pc? i don't know and don't care as vmware fulfills my performance criteria and virtual pc doesn't fulfill all of my other criteria. on linux i refuse to use binary kernel modules and refrain from using closed source. i've done a cost/benefit analysis and the cost outweighs the benefit, so i use qemu. once official debian packages become available (even in prerelease form from the debian developer) i'll try virtualbox. only if virtualbox is equal to qemu in all higher priorities will performance be the deciding factor.

It doesn't matter how many features it has if it doesn't perform. It doesn't matter if it is free or even if it is made out of platinum. What matters is how it performs compared to other virtualization software and/or running natively on the hardware.

no, what matters is how it performs compared to requirements. you need the fastest solution? run real hardware. oh, so something slower than native hardware is "fast enough" when balanced against other higher priorities? funny that.

performance is not my top priority and probably isn't for a few other regular readers of free software magazine. as long as it performs "fast enough" for my particular use, i don't care if it is the fastest.

Your self confessed fanaticism makes you ignorant.

humorous that i'm labeled a "fanatic". i'm not the one making self-proclaimed, narrow-minded, absolute statements (ie "the most important attribute of virtualization software... is performance").

kaso_da_zmok's picture
Submitted by kaso_da_zmok (not verified) on

I am using vmware server and vmware workstation, tried virtual box and the interface and features of it are vmware rip off in my opinion, i had vmware workstation and virtual box on my gentoo and the system hung after some time. so i removed the virtualbox and is working fine (my gentoo laptop)
I had also dualboot windows vs gentoo and vmware server in both to boot the other. On gentoo you have to compile kernel that fits the physical and also virtual hw. On Windows you should have Hw profiles created. the only problem with running the windows from the physical partition is the blue screen with inaccessible boot device error code 0x000008b (not sure bout the correct code right now)

piedoggie's picture
Submitted by piedoggie (not verified) on

speed of I/O that is. One of the things that drives me absolutely insane about VMware is that if you have multiple virtual machines accessing a disk, load average climbs through the roof and performance really drops. Any ideas on that?

With regard to QEMU, and thinking about using it to provide virtual machines in a firewall context. The thought is, each virtual machine would hang off of the DMZ interface and be treated as if it were a machine on the DMZ. I wasn't able to get any feedback on the qemu forums as to whether or not this was practical about them hoping I'll have the time to do so in the next few weeks.

themacmeister1967's picture
Submitted by themacmeister1967 (not verified) on

I tried installing 5 very different Linux and Unix-Like operating systems under VirtualBox, and it failed miserably on each one - 0% success.

I am not a n00b when it comes to virtualisation, but this program needs months (years?) more testing and improvement before being unleashed on an unsuspecting public - at least QEMU works as advertised.

Fabio.com.ar's picture

i has no problem on that version of Windows, even it's the most tested one! you can try testing a LiveCD distro like DSL or Puppy Linux to test it.

Andrew Min's picture
Submitted by Andrew Min on

Odd, because half of the testing WAS done under XP SP2.

--
Andrew Min
http://andrew.timstown.net/dock.htm

rufi's picture
Submitted by rufi (not verified) on

Recently I tried Wubi, it is also a great thing.
http://wubi-installer.org/

Wubi is an unofficial Ubuntu installer for Windows users that will bring you into the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other application. If you heard about Linux and Ubuntu, if you wanted to try them but you were afraid, this is for you.

Dr P Singh's picture
Submitted by Dr P Singh (not verified) on

Hi
I tried to install Ubuntu using Wubi on my three pcs. Had no success at all. these are configurations
(a) Pentium IV, 2 320GB SATA , one 250GB Firefly HDs, 2GB RAM
(b) Pentium IV, 2 120 GB HD, 500 MB RAM
(c) Pentium III, 1 120 GB HD 1 300GB HD 500MB RAM

In all cases installation of Wubi succeeded but Ubuntu failed in each case.

I followed all instruction in letters. No luck.

Dr P Singh

sheldon's picture
Submitted by sheldon (not verified) on

I am pretty well a newbie, and tried virtual box. It was really simple to setup and get going. I had two problems though.

1 - I hit "full screen" and cannoit figure out how to get out of it.

2 - I cannot get USB working.

Any help would be appreciated.

NutZ's picture
Submitted by NutZ (not verified) on

Same here; I cannot figure out how to exit full screen. This is silly...

Andrew Min's picture
Submitted by Andrew Min on

Try Host Key+F (usually Right Ctrl + F).

--
Andrew Min
http://andrew.timstown.net/dock.htm

ja4509's picture
Submitted by ja4509 (not verified) on

I have successfully gotten USB to work on my Linux host with an MS Swindles guest by putting an entry to mount the /proc/bus/usb in the /etc/fstab file on an Unbuntu/Debian machine which isn't the way it is supposed to work on these distributions. The Unbuntu/Debian way just didn't work but when I modified the fstab it worked perfectly.

Also you have to install the host additions on the guest OS.

My big gripe with VirtualBox is on my WinXP host running Ubuntu I can't seem to get USB to work and there seems to be no one else with this problem and a fix yet either.

I have tried VMware, Xen, Virtual PC (Puke and Choke), and VirtualBox.

VMWare on a Windows host seems to work with little or no fiddling. However when I installed VMWare on a Linux host I spent days configuring a fixing their install. I also had many annoying minor bugs like an marker file named "not_configured_yet" (or something similar) showing up everytime I booted the host machine. The guy who wrote the rc script I think might have been from the seventies and suffering from LSD flashbacks. His shell scripting was a nightmare to follow and I taught Unix for years.

VirtualBox however installs and runs on a Linux host flawlessly (at least for me it did.) But I did not feel VirtualBox was a good choice on a Windows host. This may only be because Windows does not play well with other operating systems.

Xen was arcane and complicated to setup and I had to run Ubuntu's Xen kernel which mean I would have had to re-compile a boat-load of support plus tweek stuff for a week so I didn't try.

Virtual PC (Piece of Crap) was horribly slow loading from the CDROM. I spent an hour trying to figure out how to mount an ISO file which helped a bit. By the way, it only supports 16 color/pixel display which is why Ubuntu needs to be loaded in the Safe Mode (Ubuntu's default color depth is 24 color) and navigating with no mouse is painful at best. In order to get a mouse support or sharing between the host and the guest you need to load the host/guest additions software but, you probably can guess that Microshit doesn't supply a Linux version. Go figure huh, with everybody gagging on Vista you would think they would prefer you to run Linux on Windows not the otherway around. But I guess when you think you are the only game in town you get a false sense of security.

Website Design's picture

I've been running vmware and virtualbox off and on, but I keep coming back to virtual box. Even with 4 gigs of ram (2 for my host and 2 for my virtual) vmware is still laggy all over the place. Virtual box screams though :)

puleen's picture
Submitted by puleen on

Has anyone scucessfully been able to achieve this? I have a dual boot of Windows XP and Ubuntu 7.04 and wanted to find out if there is a way to use the Windows XP installation from the hard drive as a VirtualBox image from within Ubuntu.

Cheers!

-Puleen

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

It is certainly possible, but not without risks. You can corrupt the partition or invalidate your windows license. If you want to do so, you have to create a second hardware profile in windows and then lookup how to use a raw harddrive in vbox.

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

running the .run file in ubuntu fails to install additions and the VB forum has many users tuck in same way.
Any idea how to get "Then type sudo sh ./VBoxLinuxAdditions.run and hit “Enter”. Follow the on screen instructions."
to work ?

undefined's picture
Submitted by undefined on

host (debian testing/lenny):

user@debian:~$ dpkg -l | grep virtualbox
ii virtualbox-ose 1.5.0-dfsg2-2 PC virtualization solution
ii virtualbox-ose-modules-2.6.21-2-vserver-k7 1.5.0-dfsg2-1+2.6.21-6 VirtualBox modules for Linux (kernel 2.6.21-2-vserver-k7)
ii virtualbox-ose-source 1.5.0-dfsg2-2 Source for the VirtualBox module
user@debian:~$ wget -N http://www.virtualbox.org/download/1.5.0/VBoxGuestAdditions_1.5.0_OSE.iso

guest (ubuntu feisty/7.04):

root@ubuntu:/media/cdrom# sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 1.5.0 Guest Additions for Linux installation......................................................................................................................................
VirtualBox 1.5.0 Guest Additions installation
Building the VirtualBox Guest Additions kernel module...
Building the shared folder support kernel module...
Installing the VirtualBox Guest Additions...

Successfully installed the VirtualBox Guest Additions.
You must restart your guest system in order to complete the installation.
root@ubuntu:/media/cdrom# /etc/init.d/vboxadd start
root@ubuntu:/media/cdrom# /etc/init.d/vboxvfs start
root@ubuntu:/media/cdrom# /etc/init.d/vboxadd-timesync start
root@ubuntu:/media/cdrom# pkill -USR1 gdm

everything works after logging out and back in on the guest (ie you don't have to restart the guest as the installer says). well, everything but the vboxvideo driver doesn't produce a resolution higher than 1024x768 without manually editing xorg.conf and adding the desired resolution(s) to a "Modes" line, but that's regardless of rebooting and really a missing "feature" than a "bug".

edit: reformatted the post because a blank line within a <code> block will prematurely end the <block> as the blank line generates a <p>.

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

In the middle of installation, I get a dialog box stating that VirtualBox has not passed Windows Logo testing. Is this normal? Has anyone encountered the same?

Also, I don't see any "freeware" version or "free software" version. I only see one binary download (msi file) for VirtualBox 1.5.2 for Windows hosts x86.

undefined's picture
Submitted by undefined on

1. download the source
http://www.virtualbox.org/wiki/Downloads#VirtualBoxOpenSourceEditionOSE

2. build the binary
http://www.virtualbox.org/wiki/Windows%20build%20instructions

do those two steps and you'll have a binary of virtualbox ose (gpl).

afaict innotek does not provide binary versions of virtualbox ose. doesn't surprise me as most linux distributions will want to build it themselves to guarantee that it conforms to their standards. and most windows users don't care whether it's foss or freeware as long as it's a free download, so only the personal/trial version is provided.

MetalHellsAngel's picture

I had never even looked at a linux anything before but using this article I was able to easily install vb and then Ubuntu 7.10 Desktop on my windows vista home premium 32 bit and it runs great! Thanks so much for such a helpful article!!

cozmos9's picture
Submitted by cozmos9 on

This thread has been inactive for several months, so maybe nobody will hear me, but here goes. I used to use vmware exclusively. Now, I am messing with new (to me) contenders in the arena. So far, I like Xen. But, I am also intrigued by VirtualBox. Seems very nice. Even though it is probably not as fast as baremetal Xen, it's got some real positives. Which leads to my question. If I wanted to install VBox on a light distro with minimal gui, what would you suggest? I started out with Ubuntu server & headless install (which I have not completely ruled out), then moved to Ubuntu desktop, then onto Xubuntu in the hopes of gaining some speed. I messed with Arch Linux some, but gave up after being unable to make nvidia ethernet on the mobo work. Any suggestions would be appreciated. While headless VBox is an option, it will be easier to delegate admin duties if a lightweight gui was available.

TIA
coz

Author information

Andrew Min's picture

Biography

/ˈændruː/ /mi:n/
(n): a Christian.
(n): a student.
(n): a technology enthusiast.
(n): a journalist for several online publications.

Andrew Min is a student, programmer, and journalist from New York City.

My main forte in the technology realm is journalism. I’ve written for a variety of magazines, both print and non-print, with a focus on open source software and the new web. I’ve also been interviewed on a long list of topics, ranging from politicians on Twitter to open source software and homeschooling.

I also have experience with a variety of programming languages (Bash, Batch, CSS, JavaScript, PHP, and (X)HTML) and content management systems (WordPress). I’ve been hired to design and administer several websites. In addition, I’ve been the lead programmer on several small coding projects.