Skip to content

Instantly share code, notes, and snippets.

@mb00g
Created August 13, 2015 16:28
Show Gist options
  • Select an option

  • Save mb00g/3849c780c05cd04f3e05 to your computer and use it in GitHub Desktop.

Select an option

Save mb00g/3849c780c05cd04f3e05 to your computer and use it in GitHub Desktop.
cloning vm xenserver
#!/bin/bash
read -p "Template: " TEMPLATE
read -p "Name Prefix: " NAME
read -p "Quantity: " QUANTITY
COUNT=1
while [ $COUNT -le $QUANTITY ] ; do
xe vm-clone vm="$TEMPLATE" \
new-name-label="$NAME$COUNT";
let COUNT=COUNT+1
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment