Start a guest | xm create {guest} -c |
---|---|
Stop a guest | xm shutdown {guest} |
Force a guest shutdown | xm destroy {guest} |
Gather a list of running domains or find one in particular | xm list |
---|---|
Connect to the ascii console of a running domain one of several ways | xm console {guest} or virsh console {guest} |
Start a domain and connect to the console at boot | xm create -c {guest} |
Connect to the GUI console of a running domain one of several ways, first on Dom0 | export DISPLAY={yourworkstationIP}:0.0 |
Open a X11 window manager on your laptop | xming.exe |
To show all virtual consoles, on Dom0 run | netstat -an | grep 590 |
OR do a | virsh vncdisplay {guest} |
Cycle through and find the right one on Dom0 | vncviewer localhost:590X & |
Or navigate the virt-manager GUI and find your console | virt-manager & |
To view bridged networks
brctl show
Shutdown virtual using bridge | xm shutdown {guest} |
---|---|
Shutdown network bridge | ip link set {bridge} down |
Rename bridge | ip link set {old_name} name {new_name} |
Bring up bridge | ip link set {new_name} up |
Edit xen config file with new bridge name | sed -i s/{old_name}/{new_name}/ /etc/xen/{guest} |
Start virtual | xm create {guest} |
Edit xen networking script | vi /etc/xen/scripts/{network_script} |
Find current vif for domain | xm network-list {guest} |
---|---|
Shutdown network bridge | ip link set {bridge} down |
Rename bridge | ip link set {old_name} name {new_name} |
Bring up bridge | ip link set {new_name} up |
Edit xen config file with new bridge name | sed -i s/{old_name}/{new_name}/ /etc/xen/{guest} |
Edit xen networking script | vi /etc/xen/scripts/{network_script} |
From a 'xm list' command
r | running | The domain is currently running on a CPU |
b | blocked | The domain is blocked, and not running or runnable. This can be caused because the domain is waiting on IO (a traditional wait state) or has gone to sleep because there was nothing else for it to do. |
p | paused | The domain has been paused, usually occurring through the administrator running xm pause. When in a paused state the domain will still consume allocated resources like memory, but will not be eligible for scheduling by the Xen hypervisor. |
s | shutdown | The guest has requested to be shutdown, rebooted or suspended, and the domain is in the process of being destroyed in response. |
c | crashed | The domain has crashed, which is always a violent ending. Usually this state can only occur if the domain has been configured not to restart on crash. See xmdomain.cfg for more info. |
d | dying | The domain is in process of dying, but hasn't completely shutdown or crashed. |
Note: Machines may be in “b” a lot, this is not a problem. The states other than “r” and “b” are ones which may require action.
This is the traditional option, meaning you end up with in linux rescue
mode, but it requires network connectivity.
#bootloader = “/usr/bin/pygrub”
kernel = "/net/swdepot/software/linux/xen/kernels/v5.5/vmlinuz" ramdisk = "/net/swdepot/software/linux/xen/kernels/v5.5/initrd.img" extra = "rescue"
This is an alternate option that does not require network connectivity. You end up booting to a minimal RHEL install, from which you can work on your broken system.
disk = [ "file:/path-to-file/rescue.img,xvdb,w", "phy:/dev/vg(original)/lv(original),xvda,w" ]
Default scheduler is cfg
however noop
may show improvements for busy Xen hosts & guests.
To view:
# cat /sys/block/{disk}/queue/scheduler
To change:
# echo 'noop' > /sys/block/{disk}/queue/scheduler
To change permanently, add elevator=noop
to grub.conf.