Skip to content

Instantly share code, notes, and snippets.

@p7cq
Created December 22, 2015 16:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save p7cq/65564519fc337fc547da to your computer and use it in GitHub Desktop.
Save p7cq/65564519fc337fc547da to your computer and use it in GitHub Desktop.
SmartOS - Add a disk to an existing VM
{
"add_disks": [
{
"media": "disk",
"model": "virtio",
"nocreate": true,
"boot": false,
"path": "/dev/zvol/rdsk/tank0/s1node1",
"size": 20480
}
]
}
@p7cq
Copy link
Author

p7cq commented Dec 22, 2015

Stop VM:
# vmadm stop 1c46e62c-2b65-472d-a0d9-522de950d643
Create ZFS volume:
# zfs create -V 20G tank0/s1node1
Update VM:
# vmadm update 1c46e62c-2b65-472d-a0d9-522de950d643 -f kvm-add-disk.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment