Notes on Xen

Management commands

The 'xm' command is the main one you need to know about. It seems the main gateway through which you accomplish things in Xen. 'xentop' is actually an alias to this.
  • xm console is useful. It lets you view the virtual console of the machine. The useful hotkey here is ctrl-], which is the same hotkey you use to break to a prompt in the telnet command. Here, it breaks the console session without you having to kill the process elsewhere.
  • xm list will show you a list of all currently running domains.

Useful concepts to understand

When Xen says 'destroy', in its settings, that doesn't mean the death of the VM. All that destruction means is that the VM is 'shut down'.

Setting the Config Files

Host configs/settings tend to live under /etc/xen, and if you want it to start up on boot you must place the config file under /etc/xen/auto.
  • If you wish for the host's interface to be on the same network as the parent machine, one would use 'bridge=xenbr0' instead of 'virbr0'.
  • The config files are generally created via the command 'virt-install'. An example from my own system is below. I would suggest deciding upon a MAC address before this, if you wish to ultimately control everything via dhcp.
    • virt-install --name mail --disk path=/dev/XenVG/mail_main -r 1024 --location --extra-args="ks="

Getting the IPs you want

  • First, see the bit above about the bridge if your host is grabbing IPs on the 192.168.122 network and you don't like that.
  • Next, if you're on a CentOS machine, chances are that it will have decided to use dnsmasq instead of dhcpd. It's not terribly hard to use, just different.

-- SeanNewton - 27 Mar 2011

This topic: Notes > WebHome > LinuxStuff > XenReference
Topic revision: r1 - 2011-03-27 - SeanNewton
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback