Skip to content

Instantly share code, notes, and snippets.

@jonludlam
Created June 17, 2014 16:17
Show Gist options
  • Save jonludlam/3c6cbc4aee7081864831 to your computer and use it in GitHub Desktop.
Save jonludlam/3c6cbc4aee7081864831 to your computer and use it in GitHub Desktop.
Raring installation script
#!/bin/bash
set -e
set -x
SERVER=$1
USERNAME=root
PASSWORD=xenroot
export XE_EXTRA_ARGS="username=root,password=xenroot,server=$SERVER,--nossl"
template=`xe template-list name-label="Ubuntu Precise Pangolin 12.04 (64-bit)" --minimal`
vm=`xe vm-install template=$template new-name-label=raring2`
network=`xe network-list bridge=xenbr0 --minimal`
vif=`xe vif-create vm-uuid=$vm network-uuid=$network device=0`
xe vm-memory-limits-set uuid=$vm static-min=1GiB static-max=1GiB dynamic-min=1GiB dynamic-max=1GiB
xe vm-param-set uuid=$vm other-config:install-repository=http://gb.archive.ubuntu.com/ubuntu other-config:debian-release=raring
xe vm-param-set uuid=$vm PV-args="auto-install/enable=true url=http://www.uk.xensource.com/kronos/precise_preseed.cfg interface=auto netcfg/dhcp_timeout=600 hostname=myvm domain=uk.xensource.com"
xe vm-start uuid=$vm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment