Skip to content

Instantly share code, notes, and snippets.

@fprimex
Created August 13, 2012 20:45
Show Gist options
  • Save fprimex/3343971 to your computer and use it in GitHub Desktop.
Save fprimex/3343971 to your computer and use it in GitHub Desktop.
UUID=$(imgadm available | grep smartos64 | head -1 | awk '{print $1}')
imgadm import $UUID
cat > /zones/myvm.json << EOF
{
"alias": "bashodev210",
"brand": "joyent",
"dataset_uuid": "$UUID",
"nics": [
{
"nic_tag": "admin",
"ip": "192.168.1.210",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1"
}
]
}
EOF
# edit myvm.json to suit
vmadm create -f /zones/myvm.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment