Skip to content

Instantly share code, notes, and snippets.

@groundwater
Created November 19, 2013 19:41
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 groundwater/7551227 to your computer and use it in GitHub Desktop.
Save groundwater/7551227 to your computer and use it in GitHub Desktop.

Creating a SmartOS VM

imgadm import 17c98640-1fdb-11e3-bf51-3708ce78e75a
vmadm create < vm.json

Update VM

  1. edit vm.json
  2. vmadm update -f vm.json
{
"zonename": "bfe58c1b-c39f-434e-be61-6d7421bd3cac",
"zonepath": "/zones/bfe58c1b-c39f-434e-be61-6d7421bd3cac",
"autoboot": true,
"brand": "joyent",
"limit_priv": "default",
"v": 1,
"create_timestamp": "2013-11-19T04:37:24.337Z",
"image_uuid": "17c98640-1fdb-11e3-bf51-3708ce78e75a",
"dns_domain": "local",
"cpu_shares": 100,
"zfs_io_priority": 100,
"max_lwps": 2000,
"max_physical_memory": 1024,
"max_locked_memory": 1024,
"max_swap": 1024,
"billing_id": "00000000-0000-0000-0000-000000000000",
"owner_uuid": "00000000-0000-0000-0000-000000000000",
"tmpfs": 1024,
"hostname": "web01",
"resolvers": [
"8.8.8.8",
"8.8.4.4"
],
"alias": "web01",
"nics": [
{
"interface": "net0",
"mac": "52:18:fa:cd:fb:66",
"nic_tag": "admin",
"gateway": "192.168.9.2",
"primary": true,
"ip": "192.168.9.131",
"netmask": "255.255.255.0"
}
],
"uuid": "bfe58c1b-c39f-434e-be61-6d7421bd3cac",
"zone_state": "running",
"zoneid": 3,
"last_modified": "2013-11-19T05:38:25.000Z",
"server_uuid": "564d58ae-1ce3-085a-748c-b1c0b29f9741",
"state": "running",
"customer_metadata": {},
"internal_metadata": {},
"tags": {},
"routes": {},
"quota": 10,
"zfs_root_recsize": 131072,
"zfs_filesystem": "zones/bfe58c1b-c39f-434e-be61-6d7421bd3cac",
"zpool": "zones",
"snapshots": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment