User Tools

Site Tools


user:jhammo13:portfolio:project1

Project: Lenny (AKA not Squeeze) VM Server Install

A project for HPC0 by Justin Hammond 2012 Spring semester.

Began on Feb 2 and should take about 2 class periods.

Objectives

Install a VM Server on a local machine and able to successfully log in to it remotely.

Background

Installing a virtual machine on a remote system and then accessing it from an outside terminal. The virtual machine software will act just like a normal OS. In this case it will be a unix OS so it will behave exactly as a unix OS that you can remotely login to.

Scope

Id like to implement this in to a full VM that I can access and work projects out on because I don't wnt to do something and blow up lab46

Attributes

State and justify the attributes you'd like to receive upon successful approval and completion of this project.

  • Problem solving: With an involved project like this there is a very good chance of something small going wrong and being forgotten. In this case you are forced to go back through and review what every step does and what your end project is not doing. This gives you an idea of what to correct.

Procedure

1.) Go to the back of the room and pick 1 of the 4 Dell machines.

2.) Turn on the machine and let it boot. You may have to mes with the switch box (it is right above the computers) make sure the orange lights say 00 and the channels are comp1=5 comp2=6 comp3=7 comp4=8

3.) You should be at a login screen that doesn't matter so ctrl alt del to restart the machine and hit F12 to go to the boot menu

4.) Choose option 5. Choose 32 bit. Choose Debian. Choose Lenny.

5.) Domain Name student.lab

6.) For the mirror go to the top of the selection menu and select it and then type 'mirror' in the BOX box BOX

7.) The debian archive is /debian/

8.) There is no proxy to use, eastern time, use entire disk to partition, erase all, all files in one, finish partition, yes write changes.

9.) use 'bob' for root user name and password. Use 'a' for regular user name and password.

No survey, surveys suck

10.) Uncheck the 'desktop environment' in the selection box by using space bar and then use       to select next.

11.) Yes to grub loader.

Now the machine will restart

12.) Log in with 'a' password 'a' then to log in as root type 'su' and press enter. Then your root name and password 'bob'

13.) Change directory to “cd” /etc/apt“

14.) list files in this directory “ls”

15.) Remove the file sources.list “rm sources.list”

16.) Replace it with this list from the lair “wget http://web.lair.lan/files/student/sources.list

Install vim “aptitude install “vim” ( If you plan on using VI to edit your files that is)

17.) Edit the text in this file “vi sources.list”

  1. Change the lines that say “debversion” to “lenny”

18.) Updating files “aptitude update”

19.) Upgrading “aptitude upgrade”

20.) Now you must install ssh but we do an aptitude search because we are not 100% sure which to install “aptitude search ssh”

21.) We look through and find we need to install open-ssh server “aptitude install openssh-server”

22.) Now an aptitude search must be done on xen in order to look through and see what portions of xen need to be installed. “aptitude search xen”

23.) Now that we've looked through and seen what needs to be installed we install those files. “aptitude install xen-linux-system-2.6-26-2-xen-686” “aptitude install”

Now you can log in to the VM Server from an outside terminal. “ssh root@vmserver01.student.lab”

1.) Now we must vi in to the /etc/modules. “vi /etc/modules”

2.) Now the file must be edited to set the loop to the max by adding a line at the end of the text. “loop max_loop=255

3.) Now another file has to be edited but this time a larger piexe of text must be added to it. “vi /etc/xen-tools/xen-tools.conf”

4.) The following lines must be added to the end of the before mentioned file.

dir = /xen
install-method = debootstrap
size   = 2Gb      # Disk image size.
memory = 128Mb    # Memory size
swap   = 128Mb    # Swap size
fs     = ext3     # use the EXT3 filesystem for the disk image.
dist   = lenny    # Default distribution to install.
image  = full     # Specify sparse vs. full disk images.
dhcp = 1
passwd = 1
kernel      = /boot/vmlinuz-`uname -r`
initrd      = /boot/initrd.img-`uname -r`
mirror = http://mirror/debian/
ext3_options   = noatime,nodiratime,errors=remount-ro
ext2_options   = noatime,nodiratime,errors=remount-ro
xfs_options    = defaults
reiser_options = defaults
serial_device = hvc0 #default
disk_device = xvda #default
output    = /xen/conf
extension = .cfg

5.) Another file must now be edited. “vi /etc/xen-tools/xen-tools.conf”

6.) Now go in and edit line 18 to say 'lenny' instead of squeeze.

7.)Create Xen directories

  1. mkdir /xen
  1. mkdir /xen/images
  1. mkdir /xen/boot
  1. mkdir /xen/conf
  1. mkdir /xen/save

8.) There is one final file that must be edited. “vi /etc/xen/xend-config.sxp”

9.) Lines 123 and 154 must be uncommented. (one starts with 'network' and one starts with 'vif') Line 139 that begins with the word network must be commented out

10.) Shutdown and restart the virtual machine. “shutdown -r now”

This will reboot the system so you must then relogin… “ssh root@vmserver01.student.lab”

11.) Now you must check to see if the install worked “uname -a”

This line should bring up the kernel and the line “vmserver01 2.6.26.2-xen-686 blah blah blah” the word “xen” means that this has been installled correctly.

Now we must check to see if the VM server installed correctly by checking the Kernel

12.) “xm list” If this comes up with no errors you were successful

Execution

lab46:~$ aptitude search xen
i A xen-hypervisor-3.2-1-i386                               - The Xen Hypervisor on i386                                       
p   xen-hypervisor-3.2-1-i386-nonpae                        - The Xen Hypervisor on i386 without pae                           
v   xen-hypervisor-i386                                     -                                                                  
v   xen-hypervisor-i386-nonpae                              -                                                                  
p   xen-linux-system-2.6.26-1-xen-686                       - XEN system with Linux 2.6.26 image on i686                       
i   xen-linux-system-2.6.26-2-xen-686                       - XEN system with Linux 2.6.26 image on i686                       
i A xen-shell                                               - Console based Xen administration utility                         
i   xen-tools                                               - Tools to manage Debian XEN virtual servers                       
v   xen-utils                                               -                                                                  
i A xen-utils-3.2-1                                         - XEN administrative tools                                         
i A xen-utils-common                                        - XEN administrative tools - common files                          
p   xenomai-doc                                             - Xenomai documentation                                            
p   xenomai-runtime                                         - Xenomai runtime utilities                                        
i A xenstore-utils                                          - Xenstore utilities for Xen                                       
p   xenwatch                                                - Virtualization utilities, mostly for Xen

(I cut out some of the 'extra' as the search returned more than this) The important part is seeing that the search displays all available packages, a description of the package and wether they're installed. Installation is denoted by an 'i' next to the name of the package.

Reflection

The install of a VM is along the lines of a regular OS install. The only key differences were the slight altercations that had to be mae to certain files in order to communicate with it.

References

Haas is my reference in my time of need

user/jhammo13/portfolio/project1.txt · Last modified: 2012/03/08 15:01 by jhammo13