« | »

Setting up a Virtual Machine on Ubuntu without KVM

I recently took a foray into the world of virtual machines on my Ubuntu server.  I decided that since I could not use the well known KVM (my cpu does not have the proper extensions) I could use virtualbox.  After installing it, I next learned how to mange the VirtualBox headless.

Main Installation Method

  • Create a vm with the name ubuntu
VBoxManage createvm -name ubunutu -register
  • Using the vm we just created limit its ram usage to 256MB, boot off the dvd and set the network interface card to use nat.
VBoxManage modifyvm ubuntu -memory "256MB" -acpi on -boot1 dvd -nic1 nat
  • Create a virtual hard disk drive, at that location.
VBoxManage createvdi -filename "/var/vbox/ubuntu.vdi" -size 5000 -register
  • Add the previouly created hard disk drive to the actual virtual machine.
VBoxManage modifyvm ubuntu -hda "/var/vbox/ubuntu.vdi"
  • Register the ISO with the virtual machine.
VBoxManage registerimage dvd /var/vbox/ubuntu-10.04-server-i38.iso
  • Modifying the virtual machine to use the ISO.
VBoxManage modifyvm ubuntu -dvd /var/vbox/ubuntu-10.04-server-i38.iso
  • Finally, we start the vm and the real fun begins.
VBoxHeadless -startvm ubuntu

Your new virtual machine is now running, however we need an application that can allow us to install the actual operating system.  On my Ubuntu desktop, I use gnome-rdp, you retrieve the ipaddress of the virtual machine, and type in port and after confirming, you will see the new OS booting from your server.

Alternate Installation Methods

Additionally, there are two other methods I came across that allow configuring a virtual machine easier with the use of a gui or web manager.  The first is enabling X Server forwarding through ssh and the other is PHP Virtual Box. PHP Virtual Box is a a web based application which uses Virtual Boxes built-in api to interact with virtual box.

Category: Helpful Tips
Both comments and pings are currently closed.

2 Responses to “Setting up a Virtual Machine on Ubuntu without KVM”

  1. We harmonise together with your conclusions and may anxiously look onward to your following updates. Merely saying thanks will not just be sufficient, for the exceptional lucidity as part of your writing. I will straightaway grab your rss to remain up-to-date of all posts. Great job and much results within your online business efforts! Toodles!

  2. You made some nice points there. I did a search on the subject and found most persons will go along with with your blog.