Difference between revisions of "Virtual Machine Management"

From CSLabsWiki
m (Create VM)
(Such ancient, very remove.)
Line 1: Line 1:
  +
Please document how to create a new VM here.
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 [[Dns1]] and the Dom0 that you wish to run this VM on.
 
 
 
The new virtual machine will be based off of one of the following generic VMs:
 
*[[Ubuntu 10.04 Generic VM]]
 
*[[Ubuntu 8.04 Generic VM]]
 
*[[CentOS 5 Generic VM]]
 
 
 
==Configure DNS==
 
{{ambox
 
| type = serious
 
| text = '''This process is not documented yet. Please send DNS requests to [[User:Mccarrms|Matt]]'''.
 
}}
 
 
==Create VM==
 
 
'''Currently, all new VMs should be created on [[Xen2]].'''
 
 
 
Execute the VM creation script on the Dom0 you have chosen.
 
<code><pre>
 
sudo create-vm
 
</pre></code>
 
 
*Proceed through the initial welcome screen.
 
[[Image:VM_Create_1.png]]
 
 
 
*Choose the operating system for the new VM.
 
[[Image:VM_Create_2.png]]
 
 
 
*Enter in the name of the new VM.
 
[[Image:VM_Create_3.png]]
 
 
 
*Enter in how many CPUs the new VM should have.
 
[[Image:VM_Create_4.png]]
 
 
 
*Enter in how much RAM the VM should have.
 
[[Image:VM_Create_5.png]]
 
 
 
*Enter in the initial user account that should be created on the new VM.
 
[[Image:VM_Create_6.png]]
 
 
 
*Enter in the initial user's email address. <b>Note: This will be used to email the initial user details about their VM and their user account credentials.</b>
 
[[Image:VM_Create_7.png]]
 
 
 
*Confirm the initial user's email address.
 
[[Image:VM_Create_8.png]]
 
 
 
*Enter in the Clarkson IP address for the new VM.
 
[[Image:VM_Create_9.png]]
 
 
 
*Choose whether the new VM needs to be on the server room network. <b>Note: For security reasons, most VMs should not be on the server room network.</b>
 
[[Image:VM_Create_10.png]]
 
 
 
*Choose whether the new VM needs to be on the internal network. <b>Note: Most VMs don't need to be on the internal network.</b>
 
[[Image:VM_Create_11.png]]
 
 
 
*That's it!
 
[[Image: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:
 
 
[[Image: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
 
<code><pre>
 
apt-get update && apt-get upgrade
 
</pre></code>
 
 
*On CentOS
 
<code><pre>
 
yum clean all && yum update
 
</pre></code>
 
 
===Extra Packages===
 
If you need web services, you can install them using the following:
 
*On Ubuntu
 
<code><pre>
 
apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql php5-suhosin
 
</pre></code>
 
 
*On CentOS
 
<code><pre>
 
yum install httpd php php-mysql mysql mysql-server
 
</pre></code>
 
 
===Newer Distribution===
 
If you need to update Ubuntu to the latest distribution, update <tt>apt</tt>
 
 
<code><pre>
 
apt-get update
 
</pre></code>
 
 
and then install the package <tt>update-manager-core</tt>.
 
 
<code><pre>
 
apt-get install update-manager-core
 
</pre></code>
 
 
Next, edit the file <tt>/etc/update-manager/release-upgrades</tt> to change <tt>Prompt=lts</tt> to <tt>Prompt=normal</tt>
 
 
Lastly, run
 
 
<code><pre>
 
do-release-upgrade
 
</pre></code>
 
 
to start the distribution upgrade.
 
 
==Conclusion==
 
The virtual machine should now be up and running. Be sure to add it to the [[:Category:VMs|List of VMs]].
 
 
[[Category:Internal How-Tos]]
 

Revision as of 15:47, 18 July 2015

Please document how to create a new VM here.