While creating an image is more efficient and should be the way to do it
(specially if you plan to deploy it multiple times) you can also do this:

Create a folder inside /zones to store the files.

1.  Shutdown the VM and snapshot all hard drives

zfs snap zones/uuid-disk0
zfs snap zones/uuid-disk1

2.  zfs send zones/uuid-disk0 > file

(If the disk(s) use compression gzip,lz4,lzjb,zle there is no need to gzip
the stream since the gains are negligible )

3. vmadm get > vmconf

If you need to create a VM with your backup do this:

vmadm create (new kvm)

vmadm stop (new-kvm)

zfs destroy -f zones/{new kvm}-disk0

zfs receive  zones/{new kvm}-disk0 < file

On Wed, Jun 27, 2018, 4:53 PM Youzhong Yang <[email protected]> wrote:

> If I need to store our own kvm image on our server, what format of the
> image file should be? zfs send stream and compressed by gzip? where to put
> the file? together with the manifest file?
>
> The following image on joyent server does not say anything about the file
> location. I have no idea what it is:
>
> https://images.joyent.com/images/0ed8e3fa-154e-4302-8d4e-d74f877dbf37
>
>   "files": [
>     {
>       "sha1": "55719bec7dcde369ca8bfdff8e289335d798216e",
>       "size": 329064188,
>       "compression": "gzip"
>     }
>   ],
>
> Just want to ask before digging in.
>
> Thanks,
>
> --Youzhong
>
> *smartos-discuss* | Archives
> <https://www.listbox.com/member/archive/184463/=now> | Modify
> <https://www.listbox.com/member/?> Your Subscription
> <http://www.listbox.com>
>



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125
Powered by Listbox: http://www.listbox.com

Reply via email to