Xen virtualization

  • need a xen specific kickstart file (both for dom0 and domU)
  • helper script to add a virtual machine, using an LV for the data:
    #!/bin/bash
    #
    # Xen MACs start with: 00:16:3e
    
    NAME=xen-test-client
    MAC=00:16:3e:00:00:00
    VGNAME=xen_vg0
    
    # create a logical volume
    lvcreate -L 8G -n $NAME $VGNAME
    
    # install
    virt-install \
        --name=$NAME \
        --ram=256 \
        --os-type=linux \
        --os-variant=rhel5.4 \
        --location=/mnt/artemis/wspace/OS/CentOS/5.5/ \
        --disk path=/dev/$VGNAME/$NAME \
        --mac=$MAC \
        --nographics \
        -w bridge:xenbr0 \
        -x "cmdline ks=nfs:192.168.1.2:/wspace/OS/kickstart/centos5.5xenclient.ks ksdevice=eth0"

some commands

  • start:
    xm create NAME
  • shutdown cleanly:
    xm shutdown NAME
  • list running vms:
    xm list
  • shutdown forcibly:
    xm destroy NAME
  • get a console:
    xm console NAME
  • detach from console: Esc, Ctrl+]

Other Notes

linux/server/xen.txt · Last modified: 2011/05/30 22:19 by john
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki