User Tools

Site Tools


user:bewanyk:portfolio:vmserver

VM Server - Squeeze Install

Installation of i386 Debian/Linux 5.0.Squeeze

System Setup

  • Install a new unformatted hard-drive into the server case.
  • Power on the CPU

Netboot Install Selection

  • At the Network Boot Menu select '32-bit (i386)' and press <Enter>.
  • At the Lair i386 netboot Menu select 'Debia/i386 netboot' and press <Enter>.
  • At the Debian/i386 Netboot menu select 'Install Squeeze/testing [text]' and press <Enter>.

Configuration and Installation

  1. At the Select a Language menu select 'English - English' and press <Enter>.
  2. At the Select your location menu select 'United States' and press <Enter>.
  3. In the Select a Keyboard Layout menu select 'American English' and press <Enter>.
  4. When prompted to enter a Server Hostname press <Enter> for the default.
Configure the Network
  1. When prompted for a Domain Name verify that the default is “student.lab” and press <Enter>.
  2. When prompted to choose a mirror site use the arrow keys to move to the top of the list and select 'enter information manually' then press <Enter>.
  3. Enter the site name “mirror” and press <Enter>.
  4. Press <Enter> to use the default.
  5. Press <Enter> with the line blank to select no HTTP Proxy.
Account Setup
  1. When prompted for the root password type “BoB” and press <Enter>.
  2. Reenter “BoB” and press <Enter> to verify the root password.
  3. Type the Full Name for your user account or “THE DOOR” and press <Enter>.
  4. Type in the username for the new user or “tdoor” and press <Enter>.
  5. Choose a password for the new user and press <Enter>.
  6. Reenter the password and press <Enter> to verify.
Clock Configuration
  1. Verify that the timezone highlighted is your timezone, if not use the arrow keys to select the correct timezone and press <Enter>.

Disk Partitioning

Partition Disks
  • Use the arrow keys to select 'Guided - Use entire disk' and press <Enter>.
  • When prompted to select disk to partition, select the appropriate disk (New disk you just installed) and press <Enter>.
  • For the Partitioning Scheme use the arrow keys to select 'All files in one partition (recommended for new users)' and press <Enter>.
  • Use the arrow keys to select 'Finish partitioning and write changes to disk' and press <Enter>.
  • Confirm your selection by using the arrow keys to select '<Yes>' and press <Enter>.
Red Screen of Doom
  • If and When the 'Red Screen of DOOM' appears, just use the arrow keys to select '<Continue>' and press <Enter>.
Software Packages
  • Use the arrow keys and <Space Bar> to deselect all options.
    • Once none of the software packages have an '[*]' in front of them press <Enter>.
Configuring grub-pc
  • Use the arrow keys to select '<Yes>' and press <Enter>.
Finish the installation
  • Select '<Continue>' using the arrow keys and press <Enter>.

System Update and Configuration

  • Once the system finishes it's reboot, you will be prompted to logon to the newly installed system.
  • Enter the username you input during the installation and press <Enter>.
  • Enter the password for the user account and press <Enter>.
  • At the '$' prompt enter “su” and press <Enter>.
  • Enter the root password selected at installatin and press <Enter>.
    • The prompt should now be '#'
  1. Type “cd /etc/apt” and press <Enter>.
  2. Type “mv sources.list sources.list.salv” and press <Enter>.
  3. Type “wget http://web.offbyone.lan/files/student/sources.list” and press <Enter>.
  4. 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 typw “:x” and press <Enter>.
Aptitude Updates and Xen
  1. Back at the '#' prompt, type “apt -get update” and press <Enter>.
  2. Type “aptitude upgrade” and press <Enter>.
  3. Type “apt-get install vim” and press <Enter>.
    • When prompted to continue enter “Y” and press <Enter>.
  4. Type “aptitude install xen-linux-system xen-tools” and press <Enter>.
    • When prompted to continue enter “Y” and press <Enter>.
  5. Type “apt-get install ssh” and press <Enter>.
    • When prompted to continue enter “Y” and press <Enter>.
  6. Type “aptitude install xen-hypervisior-4.0-i386” and press <Enter>.
    • When prompted to continue enter “Y” and press <Enter>.
  7. Type “aptitude purge xen-hypervisor-4.0-amd64” 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>.
    1. In the elation instilling VI Editor type “/network-script” and press <Enter>.
    2. Press the <N> key untill you find '(network-script network-bridge)'
    3. Use the arrow keys to place the cursor over the '#' character and press <X><X> to uncomment the line.
    4. Type “:x” and press <Enter> to save and exit the Orgasmic VI Editor.
  • Type “vi /etc/xen/scripts/vif-common.sh” and press <Enter>.
    1. In the endorphin simulating VI Editor, type “/frob_iptable()” and press <Enter>.
    2. Press the <I> key to enter insert mode (indicated in the lower left corner.)
    3. 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 “:x” 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
    forcedeth max_interrupt_work=20 optimization_mode=1 poll_interval=100
    

into:

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

and press <Esc> to exit insert mode.

  • Type “:x” 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 “2000ddi” 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 “:x” 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 “:x” and press <Enter> to make your departure from the Pangeal Fracturing force that IS THE VI Editor.
  1. Type “mv /etc/grub.d/10_linux /etc/grub.d/50_linux” and press <Enter>.
  2. Type “update-grub2” and press <Enter>.
  3. 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 “:x” 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
    1. Type “mkdir /xen” and press <Enter>.
    2. Type “mkdir /xen/images” and press <Enter>.
    3. Type “mkdir /xen/boot” and press <Enter>.
    4. Type “mkdir /xen/conf” and press <Enter>.
    5. Type “mkdir /xen/save” and press <Enter>.
  • Type “shutdown -r now” and press <Enter> to reboot the system.
Final check
  1. Wait for the system to reboot.
  2. Login in again from the remots terminal by typing “ssh root@vmserver02.student.lab” and pressing <Enter>.
  3. Enter the root password.
  4. 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.

user/bewanyk/portfolio/vmserver.txt · Last modified: 2011/02/14 15:23 by bewanyk