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.