8
Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Embed Size (px)

Citation preview

Page 1: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Xen Basics

A Primer for the CPS 110 Programming Assignments

Angela Dalton

Page 2: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Objective

To prepare you for the course programming assignments

Page 3: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

What is Xen?

A virtual machine monitor (VMM) for x86-compatible computers Run multiple instances of OSes simultaneously

These are called Guest OSes Provides isolation between Guest OSes

Uses Paravirtualization Does not hide virtualization from the Guest OSes OS must be ported to work with Xen

Page 4: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Using Xen in CPS 110

Xen machine: cps210.cod.cs.duke.edu Each team will have an account on cps210

Watch your email for info Part of Assignment 1: Get your team’s Linux

Guest OS up and running on cps210

Page 5: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

The xm Utility

Command line utility to control guests Commands to know:

xm create xm console xm list xm help xm help <command>

Page 6: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Xen system structure

Xen is lowest, most privileged system level Xen hosts multiple Guest OSes (called

domains in Xen) running in secure VMs Domain 0 – special privileged management

domain Builds other domains and manages their virtual

devices The domain you are logging in to when you ssh to

cps210.cod.cs.duke.edu

Page 7: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

Launching your VM

xm create -c configfilename -c flag causes console to attach once VM is

created Useful because you’ll see bootup messages

Each team has its own config file Edit config file to specify location of linux kernel to

boot in your VM

Page 8: Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton

The Xen Commandments

Thou shalt not kill another team’s VM If there is a rogue VM causing some problem get

in touch with that team and/or Angela and/or a UTA to deal with it

Thou shalt not hog memory Config file specifies memory allotted for VM

You don’t need much for these projects