XenServer 6.x: Quick VM Protection Policy to VM name-label script September 15, 2013September 15, 2013 Christian Work Well, today I ended up writing a short script that’ll give me a list of VMPPs with the VMs that are associated to it. #!/bin/bash # Get a list of VMPPs for vmpp in `xe vmpp-list params=uuid --minimal | sed "s/,/ /g"`; do VMPP_NAME=`xe vmpp-list params=name-label uuid=$vmpp --minimal` for vm in `xe vmpp-list params=VMs --minimal uuid=$vmpp | sed -e "s/;//g" -e "s/,//g"`; do VM=`xe vm-list params=name-label uuid=$vm --minimal` echo "$VMPP_NAME: $VM" done done 123456789101112 #!/bin/bash # Get a list of VMPPsfor vmpp in `xe vmpp-list params=uuid --minimal | sed "s/,/ /g"`; do VMPP_NAME=`xe vmpp-list params=name-label uuid=$vmpp --minimal` for vm in `xe vmpp-list params=VMs --minimal uuid=$vmpp | sed -e "s/;//g" -e "s/,//g"`; do VM=`xe vm-list params=name-label uuid=$vm --minimal` echo "$VMPP_NAME: $VM" donedone