User Tools

Site Tools


user:cgaines:portfolio:hpc0project2

VM Server - Squeeze Install Part 2

Installation of i386 Debian/Squeeze Part 2

start date 2/6/13 end date 2/13/13

Partner Erik Scouten

Objectives

State the purpose of this project. What is the point of this project? What do we hope to accomplish by undertaking it?

Prerequisites

  http://www/user/bewanyk/portfolio/vmserver

Procedure

System Update and Configuration

   
Type “cd /etc/apt” and press <Enter>

Type “mv sources.list sources.list.salv” and press <Enter>.

Type “wget http://web.offbyone.lan/files/student/sources.list” and press <Enter>.

Type “vi sources.list” and press <Enter>.

In the amazing VI Editor type ”:%s/lenny/squeeze/g” and press <Enter>.
     

Still in the awe inspiring VI Editor typeAptitude Updates and Xen

      Type cd to get back to the '#' prompt, type “apt-get update” and press <Enter>.

      Type “aptitude upgrade” and press <Enter>.
      
      Type “apt-get install vim” and press <Enter>.
      When prompted to continue enter “Y” and press <Enter>.
	
  	Type “aptitude install xen-linux-system xen-tools” and press <Enter>.
      When prompted to continue enter “Y” and press <Enter>.

Type “apt-get install ssh” and press <Enter>.

      When prompted to continue enter “Y” and press <Enter>.
 

External script configuration

  Using an outside terminal within the lab logon to a terminal session.
  Log into the new VM server by typing “ssh root@vmserver02.student.lab” and press <Enter>.
  Enter the root password and press <Enter>.
  
      Type “vi /etc/xen/xend-config.sxp” and press <Enter>.
      In the elation instilling VI Editor type ”/network-script” and press <Enter>.
      Press the <N> key untill you find '(network-script network-bridge)'
      Use the arrow keys to place the cursor over the '#' character and press <X><X> to uncomment the line.
     
      Type ”:wq” and press <Enter> to save and exit the Orgasmic VI Editor.
  
      Type “vi /etc/xen/scripts/vif-common.sh” and press <Enter>.
      In the endorphin simulating VI Editor, type ”/frob_iptable()” and press <Enter>.
      Press the <I> key to enter insert mode (indicated in the lower left corner.)
      Within the frob_iptable function make two changes (as follows.)

The line:

 
  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT \

changes to:

  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in "$vif" "$@" -j ACCEPT \

AND the line:

  --physdev-out "$vif" -j ACCEPT 2>/dev/null

changes to:

  --physdev-is-bridged --physdev-out "$vif" -j ACCEPT 2>/dev/null

Press the <Esc> key to exit insert mode.

  Type ”:wq” and press <Enter>.
  
  Type “vi /etc/modules” and press <Enter>.
      Press <I> to enter insert mode in the Reality Altering VI Editor.

Change the lines:

  
  loop

into:

  
  loop max_loop=255
  #forcedeth max_interrupt_work=20 optimization_mode=1 poll_interval=100

and press <Esc> to exit insert mode.

  Type ”:wq” and press <Enter> to save and exit from the greatest editor you've ever used.
  
  Type “vi /etc/xen-tools/xen-tools.conf” and press <Enter> to once again be ushered into the enlightened presence of the VI Editor.
 
  Type “i” to clear the file and enter insert mode.
  Enter the following lines.
#
# /etc/xen-tools/xen-tools.conf
#

##
## Virtual Machine configuration
##
dir             = /xen
install-method  = debootstrap

##
## Disk and Sizing options
##
size            = 2Gb      # Disk image size.
memory          = 128Mb    # Memory size
swap            = 128Mb    # Swap size
fs              = ext3     # use the EXT3 filesystem for the disk image.
dist            = squeeze  # Default distribution to install.
images          = full

##
## Network configuration
##
dhcp            = 1
gateway         = 10.80.3.1
netmask         = 255.255.255.0

##
## Password configuration
##
passwd          = 1

##
## Package Mirror configuration
##
arch            = i386
mirror          = http://mirror/debian/
mirror_squeeze  = http://mirror/debian/

##
## Filesystem settings
##
ext3_options    = noatime,nodiratime,errors=remount-ro
ext2_options    = noatime,nodiratime,errors=remount-ro
xfs_options     = defaults
reiser_options  = defaults

##
## Xen VM boot settings
##
pygrub          = 1

##
## Xen VM settings
##
serial_device   = hvc0
disk_device     = xvda

##
## Xen configuration files
##
output          = /xen/conf
extension       = .cfg

Then press <Esc> to exit insert mode.

  Type ”:wq” and press <Enter> to once again save and exit from the only editor who's children you'd like to have, the VI Editor.
  
  Type “vi /etc/default/grub” and press <Enter> to bathe in the life altering oozieness that is THE VI Editor.
  
  Type “33” and press <Enter><I>.

Enter the following at the end of the file:

# Disable OS prober to prevent virtual machines on logical volumes from
# appearing in the boot menu.

GRUB_DISABLE_OS_PROBER=true

Then press <Esc> to leave insert mode.

  Once again type ”:wq” and press <Enter> to make your departure from the Pangeal Fracturing force that IS THE VI Editor.
 
  Type “mv /etc/grub.d/10_linux /etc/grub.d/50_linux” and press <Enter>.
  Type “update-grub2” and press <Enter>.
  
  Type “vi /etc/default/xendomains” and press <Enter> and <I>.

Make the following changes:

XENDOMAINS_SAVE=/var/lib/xen/save

gets changed to:

XENDOMAINS_SAVE=""

Then change the XENDOMAINS_RESTORE line to:

XENDOMAINS_RESTORE=false

Press the <Esc> key to exit insert mode.

  Type ”:wq” and press <Enter> to be torn from the bosom of the only editor you'd give your virginity to, THE VI Editor.

Directory creation

  Create directories
      Type “mkdir /xen” and press <Enter>.
      Type “mkdir /xen/images” and press <Enter>.
      Type “mkdir /xen/boot” and press <Enter>.
      Type “mkdir /xen/conf” and press <Enter>.
      Type “mkdir /xen/save” and press <Enter>.
  Type “shutdown -r now” and press <Enter> to reboot the system.

Final check

  Wait for the system to reboot.
  Login in again from the remots terminal by typing “ssh -v root@10.80.3.12” and pressing <Enter>.
  Enter the root password.
  Confirm that there are no errors, and only one Virtual machine running by typing “xm list” and pressing <Enter>.

VM server is now installed and confirmed. Type “exit” and press <Enter> to logoff.

Execution

Again, if there is associated code with the project, and you haven't already indicated how to run it, provide a sample run of your code:

lab46:~/src/cprog$ ./hello
Hello, World!
lab46:~/src/cprog$ 
user/cgaines/portfolio/hpc0project2.txt · Last modified: 2013/02/13 17:18 by cgaines