Difference between revisions of "Virtual Machine Management"

From CSLabsWiki
m (Update VM)
m (added note)
Line 8: Line 8:
==Configure DNS==
==Configure DNS==
On [[Dns]], you need to edit <tt>cu_hosts</tt> in <tt>/root/scripts/</tt> by adding a line in the following format. If your VM is going to be on server room network or the internal network, you will also need to edit <tt>sr_hosts</tt> and <tt>in_dns_hosts</tt> in a similar format.
| type = serious
| text = '''This process is not documented yet. Please send DNS requests to [[User:Mccarrms|Matt]]'''.
<imagename> <IP Address>
You then need to run:
sudo dnsupdate
==Create VM==
==Create VM==

Revision as of 15:06, 5 March 2010

This how-to summarizes how to create a new Ubuntu or CentOS virtual machine in the labs. To follow these steps, you need sudo/root access on Dns and the Dom0 (Xen1 or Xen2) that you wish to run this VM on.

The new virtual machine will be based off of one of the following generic VMs:

Configure DNS

Create VM

Execute the VM creation script on the Dom0 you have chosen.

sudo create-vm
  • Proceed through the initial welcome screen.

VM Create 1.png

  • Choose the operating system for the new VM.

VM Create 2.png

  • Enter in the name of the new VM.

VM Create 3.png

  • Enter in how many CPUs the new VM should have.

VM Create 4.png

  • Enter in how much RAM the VM should have.

VM Create 5.png

  • Enter in the initial user account that should be created on the new VM.

VM Create 6.png

  • Enter in the initial user's email address. Note: This will be used to email the initial user details about their VM and their user account credentials.

VM Create 7.png

  • Confirm the initial user's email address.

VM Create 8.png

  • Enter in the Clarkson IP address for the new VM.

VM Create 9.png

  • Choose whether the new VM needs to be on the server room network. Note: For security reasons, most VMs should not be on the server room network.

VM Create 10.png

  • Choose whether the new VM needs to be on the internal network. Note: Most VMs don't need to be on the internal network.

VM Create 11.png

  • That's it!

VM Create 12.png

Post Creation

Receive Email

The initial user should receive an email in roughly 5-10 minutes with details about their VM and their initial password to log in. If an error occurs, the initial user and several other members of the labs will receive a failure email indicating what part of the process failed.

The email should look similar to the following:

VM Create Email.png

Update VM

It is recommended that you update your new VM after it is successfully created. You will have to restart your VM to apply kernel updates.

  • On Ubuntu
apt-get update && apt-get upgrade
  • On CentOS
yum clean all && yum update

Extra Packages

If you need web services, you can install them using the following:

  • On Ubuntu
apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql
  • On CentOS
yum install httpd php php-mysql mysql mysql-server

Newer Distribution

To update Ubuntu to the latest distribution, update apt

apt-get update

and then install the package update-manager-core.

apt-get install update-manager-core

Next, edit the file /etc/update-manager/release-upgrades to change Prompt=lts to Prompt=normal

Lastly, run


to start the distribution upgrade.


The virtual machine should now be up and running. Be sure to add the new VM to the List of VMs.