• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Run VirtualBox on Ubuntu 14.04 Cloud Server Instance

By Abhishek Ghosh January 2, 2015 9:29 am Updated on January 2, 2015

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance

Advertisement

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance – Yeah, Virtualization within Virtualization! It is actually possible to install and run. When we run virtual machines with VirtualBox on computer, normally we use the VirtualBox GUI to manage the virtual machines – like we shown in the guide to run Ubuntu on MacBook Pro. but a server does not have a desktop environment unless we specifically prepare it for using as VNC. VNC setup is not required to run VirtualBox on Ubuntu 14.04 Cloud Server Instance. VirtualBox has a tool called VBoxHeadless that basically allows you to connect to the virtual machines over a remote desktop connection, so the GUI is not required.

 

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance : Initial Steps

 

You can open an account on DigitalOcean using this link, if you have a Credit Card and no Account on DigitalOcean. You’ll get $10 account credit plus you can add any coupon (if applicable) to increase your account’s credit. Enough to test our guides free of cost.

We are taking that you are using either DigitalOcean or Rackspace Cloud or HP Cloud to test. For HP Cloud, you need to set Ingress-Egress policy. HP Cloud is a bit hard and great to learn networking and OpenStack.

Advertisement

---

Spin a 4GB instance with Ubuntu 14.04 LTS image. First SSH to the instance :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
ssh root@IP-Address
##The authenticity of host '127.0.0.1' can't be established.
##ECDSA key fingerprint is
################
##Are you sure you want to continue connecting (yes/no)?
# type yes and hit the return key
# you will have the password, use it and change it
# upgrade and update
apt-get update -y && apt-get upgrade
# do a dist-upgrade
apt-get diet-upgrade -y
# reboot and login again
ssh root@IP-Address

Ubuntu 14.04 is named trusty, open your /etc/apt/sources.list :

Vim
1
nano /etc/apt/sources.list

Add this line :

Vim
1
deb http://download.virtualbox.org/virtualbox/debian trusty contrib

Download the Public Key and update apt :

Vim
1
2
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
apt-get update -y

 

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance : Main Steps

 

Run this :

Vim
1
apt-get install dkms unzip linux-headers-$(uname -r) build-essential virtualbox-4.3 -y

That dkms is an important thing. Run this :

Vim
1
2
cd /opt
wget http://download.virtualbox.org/virtualbox/4.3.14/Oracle_VM_VirtualBox_Extension_Pack-4.3.14-95030.vbox-extpack

We got the link from here :

Vim
1
https://www.virtualbox.org/wiki/Downloads

Run this command with sudo :

Vim
1
sudo VBoxManage ext pack install Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack

You should create users other than root. Take that you have created a user named abhishek, then run this :

Vim
1
sudo adduser abhishek vboxusers

You can set password in this way :

Vim
1
sudo passwd vbox

VirtualBox is now installed and ready to be used. VBoxManage brings the interactive mode. Like running :

Vim
1
VBoxManage --help

will show you the commands.

 

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance : Optionally Adding a Web Interface

 

Adding a Web Interface to run VirtualBox on Ubuntu 14.04 Cloud Server is optional. We will run Apache2 web server and install the PHP components for it :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
apt-get install apache2 php5 libapache2-mod-php5 php-soap -y && service apache2 restart
cd /opt && rm -r
wget 'http://downloads.sourceforge.net/project/phpvirtualbox/phpvirtualbox-4.3-1.zip' -O phpvirtualbox.zip
unzip phpvirtualbox.zip
mv phpvirtualbox-4.3-1 /var/www/html/phpvirtualbox
mv /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php
nano /var/www/html/phpvirtualbox/config.php
# this are instructions  
# That $username and $password should match the user you created
nano /etc/default/virtualbox
# make sure you have this line :
# Add VBOXWEB_USER=vbox
sudo /etc/init.d/vboxweb-service start

In a browser, i you point go to http://your-IP/phpvirtualbox and login with username ‘admin’ and password ‘admin’. You should change it after login into phpvirtualbox.

These are optional steps.

 

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance : Managing Virtual Machines From SSH

 

If we do not use the Web Interface, we still can use VirtualBox to create instance, import and run ISO. All guides are written on :

Vim
1
2
http://www.virtualbox.org/manual/ch08.html
http://www.virtualbox.org/manual/ch07.html#vboxheadless

Another important part is VirtualBox networking setting, you need to select bridged rather than the default of NAT. By default, VirtualBox VMs will present the guest operating system with a networking setup that works well enough for a web browser.

Selecting this bridged networking makes the virtual machine to appear as if it is simply another computer attached to your network via an Ethernet cable. That is separate story though. This way, we found even easier than container based virtualization.

Run VirtualBox on Ubuntu 14.04 Cloud Server Instance

 

Run VirtualBox on Ubuntu 12.04 Cloud Server Instance : HP Cloud

 

Another way we found probably work on HP Cloud Only. Notice that, this is for Ubuntu 12.04.

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
## Install necessary packages
apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## kvm unloaded
modprobe -r kvm_amd kvm_intel
service virtualbox stop
service virtualbox start
## cloud image of 12.04
img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
img_url="${img_url}/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
## cloud-localds is not in archive
localds_url="http://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/download/head:/cloudlocalds-20120823015036-zkgo0cswqhhvener-1/cloud-localds"
which cloud-localds ||
  { sudo wget "$localds_url" -O /usr/local/bin/cloud-localds &&
    sudo chmod 755 /usr/local/bin/cloud-localds; }
## download a cloud image to run
img_dist="${img_url##*/}"
img_raw="${img_dist%.img}.raw"
my_disk1="my-disk1.vdi"
wget $img_url -O "$img_dist"
qemu-img convert -O raw "${img_dist}" "${img_raw}"
vboxmanage convertfromraw "$img_raw" "$my_disk1"
## create user-data
seed_iso="my-seed.iso"
cat > my-user-data <<EOF
##cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
EOF
cloud-localds "$seed_iso" my-user-data
## create a virtual machine using vboxmanage
vmname="precise-nocloud-1"
vboxmanage createvm --name "$vmname" --register
vboxmanage modifyvm "$vmname" \
   --memory 512 --boot1 disk --acpi on \
   --nic1 nat --natpf1 "guestssh,tcp,,2222,,22"
# Another option for networking
--nic1 bridged --bridgeadapter1 eth0
vboxmanage storagectl "$vmname" --name "IDE_0"  --add ide
vboxmanage storageattach "$vmname" \
    --storagectl "IDE_0" --port 0 --device 0 \
    --type hdd --medium "$my_disk1"
vboxmanage storageattach "$vmname" \
    --storagectl "IDE_0" --port 1 --device 0 \
    --type dvddrive --medium "$seed_iso"
vboxmanage modifyvm "$vmname" \
--uart1 0x3F8 4 --uartmode1 server my.ttyS0
## start VM
vboxheadless --vnc --startvm "$vmname"
## connect to the vnc port that vboxheadless
## showed was used.  The default would be '5900', after the system boots, you can ssh in with 'ubuntu:passw0rd'
## via 'ssh -p 2222 ubuntu@localhost'
## To see where kernel output goes, you
## can use 'socat', like this:
socat UNIX:my.socket -
## poweroff
vboxmanage controlvm "$vmname" poweroff
## clean up
vboxmanage storageattach "$vmname" \
   --storagectl "IDE_0" --port 0 --device 0 --medium none
vboxmanage storageattach "$vmname" \
   --storagectl "IDE_0" --port 1 --device 0 --medium none
vboxmanage closemedium dvd "${seed_iso}"
vboxmanage closemedium disk "${my_disk1}"
vboxmanage unregistervm $vmname --delete

You should read the Ingress-Egress for HP Cloud.

Tagged With Ubuntu10 04下运行VirtualBox显示非致命性错误 , cloud computing virtualbox role , cloud sync virtualbox , how to install virtualbox on ubuntu instance? , oracle cloud ubuntu установка virtualbox , run virtual box from a cloud , run virtualbox in cloud , virtual box running on ubuntu server , virtualbox open cloud instance

This Article Has Been Shared 449 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Run VirtualBox on Ubuntu 14.04 Cloud Server Instance

  • Virtualization : A holistic approach

    Virtualization not a mere technology but a system. Each an every member of the team where Virtualization has been deployed should have some knowledge about what is going on.

  • Server Virtualization and Intel VT-x Processor

    Server Virtualization and Processor specific technologies are important for implementing advanced Virtualization Softwares like VMware or Virtuozzo.

  • Virtual Network Computing or VNC

    Virtual Network Computing or VNC is a setup where the GUI of a remote computer or server can be controlled from a local computer. The server can be Cloud VPS.

  • Types of Virtualization and Cloud Computing and Their Differences

    Types of Virtualization and Cloud Computing and their differences focuses on the underlying technology, analyzes the perspective of resources in easy words.

  • Red Hat Virtualization : Beyond 2013

    Red Hat Virtualization comes in to question for their work on Linux and open source solutions which fostered innovation, adoption of virtualization and cloud.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023
  • What is COB LED? How LED Chip On Board Works January 20, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Run VirtualBox on Ubuntu 14.04 Cloud Server Instance," in The Customize Windows, January 2, 2015, January 27, 2023, https://thecustomizewindows.com/2015/01/run-virtualbox-on-ubuntu-14-04-cloud-server-instance/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT