Skip to content

Instantly share code, notes, and snippets.

@bageljp
Last active December 14, 2015 00:49
Show Gist options
  • Save bageljp/5001507 to your computer and use it in GitHub Desktop.
Save bageljp/5001507 to your computer and use it in GitHub Desktop.
XenServer utils.
#!/bin/bash
#-------------------------
# define
#-------------------------
OUTPUT="/var/log/messages"
LANG="C"
#------------------------
# main
#------------------------
date +"===========================================" >> ${OUTPUT} 2>&1
date +"### XenServer Running VM list. ###" >> ${OUTPUT} 2>&1
xe vm-list power-state=running >> ${OUTPUT} 2>&1
date +"===========================================" >> ${OUTPUT} 2>&1
date +"### XenServer Running VM summary list. ###" >> ${OUTPUT} 2>&1
xe vm-list power-state=running | grep name-label | sort >> ${OUTPUT} 2>&1
date +"===========================================" >> ${OUTPUT} 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment