I have 2 zpools
pool: zones
pool: zpool_repos
I want to add to a KVM machine a disk living not in the zones pool, but in the other one.
My VM is already provisioned.
First of all I must stop it.
vmadm stop <uuid>
Now I create a ZFS volume
zfs create -V 10G zpool_repos/mykvmdata
Now I create a json file for the update
vi adddisk.json
{
"add_disks": [
{
"media": "disk",
"model": "virtio",
"nocreate": "true",
"boot": false,
"path": "/dev/zvol/rdsk/zpool_repos/uuu"
}
]
}
Now I update the KVM machine.
vmadm update 5942c90f-ecbb-4acd-822f-43e1901e2eb6 -f dataset.json
That's all.
Now, after starting the virtual machine, from inside it, I must partition the new disk (i.e. /dev/vdb in linux) and format.
No comments:
Post a Comment