EEL6892 Fall 09 HW 1: Instructions for getting familiar with the Xen image

From Grid-Appliance Wiki

Jump to: navigation, search

Contents

Introduction

HOW-TO Author: Girish Venkatasubramanian, girish, Renato Figueiredo, renato

Overview: This document provides instructions for the students of EEL 6892 (Fall 2009) for HW1. The objective of this hands-on lab component of HW1 is to allow you to familiarize yourself with using a virtual machine appliance, and interact with the Xen hypervisor. In this lab, you will boot a virtual machine which runs other virtual machines inside of it - specifically, you will run a VMware virtual machine in your host, and within the VM you will run Xen virtual machines to become familiar with the Xen system and management interface. The architecture of both VMware and Xen will be covered in detail in class; this hands-on lab will give you exposure to these systems that will be used in later homeworks and the project.

The Xen® hypervisor is an open source virtual machine which offers a powerful, efficient, and secure feature set for virtualization of x86, x86_64, IA64, PowerPC, and other CPU architectures. It supports a wide range of guest operating systems including Windows®, Linux®, Solaris®, and various versions of the BSD operating systems. More information about Xen can be found at the Xen Website.


Pre-Requisites

  • A computer with atleast 1GB memory and VMware player or similar hosted virtualization software. (The instructions in this page relate to VMware player and have not been tested on other software)
  • A reasonable familiarity with Xen management interface

Instructions

  1. Download and install VMware player
  2. A virtual machine with Xen installed in it and one guest created in it is provided here(note: this is a large file, 1.4GB). Download the virtual machine and unzip it.
  3. Browse to the location where the virtual machine was unzipped. Double click on the eel6892_xen.vmx file. This should start the fc5_3.0.2 virtual machine.
  4. At the GRUB menu, press any key before the time expires then select and boot into Xen 3.0.2
  5. Booting the system may take a while so be patient
  6. Login to Xen with username "root" and password "password"
    1. You are now in the Xen guest virtual machine called "Domain 0" (a.k.a. dom0)
    2. This domain runs a patched version of the Linux O/S, and it is privileged in the sense that it can issue virtual machine management operations, such as create/destroy VMs
    3. Check that you are running the Xen-patched kernel by typing: uname -a
  7. Start the Xen daemon using the command "xend start"
  8. Once xend starts, see a list of the domains currently runing using the command "xm list"
  9. Start another virtual machine (called user domain in Xen terminology) using the command "xm create -c file-config-6GB". You will see the virtual machine booting up. (You may see some udev related error messages, which you can ignore)
    1. If nothing happens, try running the command again ("xm create -c file-config-6GB").
    2. All other domains besides dom0 are unprivileged, and they are normally referred to as "domU"
  10. Once it has booted up, another log in prompt shows in your console - this is the prompt for the domU virtual machine
    1. Log into the virtual machine (domU) using user name "root" and password "password"
  11. You can break out of the domU console back to the dom0 console by using CTRL]
    1. You can re-enter the domU console from dom0 using "xm console <domid>" where <domid> is the domain number of the domU shown in "xm list".
    2. Note that all "xm" commands work only in dom0. You can tell whether you are in the Dom0 by the differences in their root directories

Lab questions

  1. Look up the behavior of the "xm top" command; run this command and explain the output that you see in your virtual machine
  2. Look up the behavior of the "xm sched-sedf" command. Run this command to configure domU to have smaller time slice, while configuring it to prevent from using extra time. Switch the console back and forth to domU. Describe and explain any difference you notice in the interactivity of the domU guest.

Note: use the following syntax for xm sched-sedf:

Usage: xm sched-sedf domain_id [options]

Get/set EDF parameters.
  -p [MS], --period[=MS]         Relative deadline(ms) 
  -s [MS], --slice[=MS]          Worst-case execution time(ms). (slice < 
                                 period)
  -l [MS], --latency[=MS]        Scaled period (ms) when domain performs 
                                 heavy I/O
  -e [FLAG], --extra[=FLAG]      Flag (0 or 1) controls if domain can run 
                                 in extra time.
  -w [FLOAT], --weight[=FLOAT]   CPU Period/slice (do not set with 
                                --period/--slice)


For Network Connectivity for domU

Setting the guest to acquire IP address via DHCP does not work very well. The best option is to assign it a static IP in the

  1. Modify the /etc/sysconfig/network-scripts/ifcfg-eth0 of the guest to have the desired IP, Netmask and Gateway.
  2. Restart the network using "/etc/init.d/networking restart"
Personal tools