Skip to content

Instantly share code, notes, and snippets.

@rtomaszewski
Created May 17, 2014 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtomaszewski/d0faea99eaf90895d8fd to your computer and use it in GitHub Desktop.
Save rtomaszewski/d0faea99eaf90895d8fd to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -x
template=`xe template-list name-label="Ubuntu Lucid Lynx 10.04 (64-bit)" --minimal`
vm=`xe vm-install template=$template new-name-label=vm-label`
network=`xe network-list bridge=xenbr0 --minimal`
vif=`xe vif-create vm-uuid=$vm network-uuid=$network device=0`
xe vm-param-set uuid=$vm other-config:install-repository=http://archive.ubuntu.com/ubuntu
xe vm-param-set uuid=$vm PV-args="auto-install/enable=true interface=auto netcfg/dhcp_timeout=600 hostname=vm-host-name domain=mydomain.is.best"
xe vm-start uuid=$vm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment