On 03/05/16 11:06, TRITONIA SOLUTIONS LIMITED wrote:
Hi,
I've been using KVM on Linux (ProxMox VE) for some years and was
interested to try it out on SmartOS as wanted to use KVM + ZFS
(although newer versions of ProxMox do support ZFS on Linux). Using
qcow2 files on linux, and VHDX files on Hyper-V, you can create
differencing disks so that you have a single 'parent image' which is
shared between all of your vm instances (saves a lot of space as your
obviously only storing changes for each vm).
I created a custom KVM image from a sysprep'd Windows Server 2012 R2
x64 vm and imported it locally as in the wiki. From that I was able to
generate new vm instances but I assume that the zvol created for each
new instance is not a clone of the original zvol (from the golden
image) and thus each new vm is getting a copy of the whole original zvol?
From a ZFS point of view you can check to see if the volume has an
"origin" property.
If you have built a KVM from an image, the boot volume should be a
clone. For example I have an Ubuntu KVM built from a Joyent image, thus:
# vmadm get 756317f1-1eb8-427f-880a-8605dc53965b | json disks
[
{
"path":
"/dev/zvol/rdsk/zones/756317f1-1eb8-427f-880a-8605dc53965b-disk0",
"boot": true,
"model": "virtio",
"media": "disk",
"image_size": 10240,
"image_uuid": "b33d4dec-db27-4337-93b5-1f5e7c5b47ce",
"zfs_filesystem": "zones/756317f1-1eb8-427f-880a-8605dc53965b-disk0",
"zpool": "zones",
"size": 10240,
"compression": "lz4",
"refreservation": 10240,
"block_size": 4096
}
]
The "image_uuid" shows it was built using this image:
# imgadm avail | grep b33d4dec
b33d4dec-db27-4337-93b5-1f5e7c5b47ce ubuntu-certified-15.04 20150807
linux 2015-08-08T04:06:41Z
To verify disk0 is a clone:
# zfs get origin zones/756317f1-1eb8-427f-880a-8605dc53965b-disk0
NAME PROPERTY
VALUE SOURCE
zones/756317f1-1eb8-427f-880a-8605dc53965b-disk0 origin
zones/b33d4dec-db27-4337-93b5-1f5e7c5b47ce@final -
I'm just interested to know if there is a method using a cloned
snapshot of the original zvol that means I can save all this
duplicated space? or maybe I am just misunderstanding what imgadm
actually does?
PS: I can't really afford the memory to enable dedup on the zones pool.
Good, dedup invariably ends it tears...
Many thanks and sorry for being a novice...
We all started sometime!
--
Ian.
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com