commit e52df20b9010ebac266e2b593628ea1876a578f9 Author: Mattias Holmqvist <mattias.holmqvist@gmail.com> Date: Sun Oct 23 23:59:25 2011 +0200 Added function ApplyMemoryToMachine for virtualbox. commit a43e189b306fddbdc5ee5930355f20d90d148854 Merge: 3f6de26 041360e Author: Mattias Holmqvist <mattias.holmqvist@gmail.com> Date: Sun Oct 23 23:26:42 2011 +0200 Merge branch 'master' of https://github.com/jclouds/jclouds into functionalize Conflicts: sandbox-apis/virtualbox/src/main/java/org/jclouds/virtualbox/functions/AttachNATRedirectRuleToMachine.java commit 3f6de265d7342676fdeab99badd31f31cb43aadc Author: Mattias Holmqvist <mattias.holmqvist@gmail.com> Date: Sun Oct 23 23:23:49 2011 +0200 Added AttachNATRedirectRuleToMachine to virtualbox.
Administation viewpoint
These steps are usually in charge of cloud provider, in this case it's up to you
The experiment assumes almost nothing: only a running Ubuntu 11.04 where java6 and maven3 are installed.
Prepare your Master VM
By launching "VirtualboxAdministrationTest" an helper class to execute a number of preliminary steps needed to have a properly configured ubuntu box and to create a golden template for your experiment.
The "VirtualboxAdministrationTest" helper will run these preliminary steps:
- Create a working dir on 'user.home' called by default "jclouds-virtualbox-test" (this value can be overwritten directly on the commandline using -Dtest.virtualbox.workingDir)
- Install Virtualbox from the internet (mac os x lion and ubuntu host are supported at the moment)
- Download by default an ubuntu 11.04 server i386 ISO into "jclouds-virtualbox-test" from http://releases.ubuntu.com/11.04/ubuntu-11.04-server-i386.iso.
- Download VirtualBox Guest Additions ISO (tested with VBoxGuestAdditions_4.0.2-update-69551.iso) into "jclouds-virtualbox-test"
- Disable login credential: $ VBoxManage setproperty websrvauthlibrary null
- Start an embedded jetty server that serves a preseed file specifically written for ubuntu 11.04
- Start webservice with increasead timeout: $ /usr/bin/vboxwebsrv --timeout 10000 and then will:
- create a "jclouds-virtaulbox-kickstart-admin" vm in the the vbox default machine folder ("/user.home/VirtualBox VMs")
- install automatically the OS (ubuntu 11.04) in this vm using preseed
- Set NAT on network interface eth0
- Set port forwarding localhost:2222->guest:22
- Mount Guest Additions ISO
- Install Guest additions
- Shutdown VM
- create a snapshot of this machine, to enabling linked clone feature.
- Remove port forwarding rule
- Change NIC from NAt to bridge
At this stage, you can use your template as a master for your "private" cloud through VirtualBoxLiveTest
Bootstrap your private cloud through VirtualBoxLiveTest helper
To use this helper, you have to specify the name of the VM (-Dtest.virtualbox.vmname=) and choose the numberOfVirtualMachine you need using -Dtest.virtualbox.numberOfVirtualMachine=<#ofVMs>, These VMs will be cloned starting from the golden template VM created before
It will create a "numberOfVirtualMachine" in a vbox default machine folder with 'VMName_i' name, by cloning the golden template in linked mode with a bridged NIC.