How is TrueNAS SCALE cloning VM's?

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
Hi

I would like to know how TrueNAS SCALE is cloning VM's? Does it take a snapshot of the zvol and clone that, or does it utilize some other method under the hood?

I've searched around but haven't found any useful information.

Thannks in advance.
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Same question here ... I am currently confused because I created a new Windows 11 Pro VM called "Win11-s0077".

The size I gave the VM is 80 GB and inside the Windows VM it shows that 40 GB are already used by Windows leaving 40 GB potentially free.

In the TrueNAS it appears correct that more than the 80 GB are reserved by the VM.

I now cloned the VM "Win11-s0077_Win11_clone0" and it just takes a few MB on the storage pool? I even started the cloned VM once to see if the space is claimed then - but still just a few barely above 1 GB even though Windows also claims 40GB of data.

Screenshot 2022-11-19 145212.jpg


So can I delete the original "Win11-s0077" dataset or will the clone also break then?
 

Straafe

Dabbler
Joined
Mar 24, 2023
Messages
33
So can I delete the original "Win11-s0077" dataset or will the clone also break then?
Did you ever get the answer on this specific question? I cloned a VM because I want to try a potentially destructive operation on it, but noticed the cloned ZVOL is tiny as well.
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
I moved all VMs and apps out of TrueNAS. Running Proxmox as hypervisor with truenas as VM using only the „NAS“ portion..
 

Straafe

Dabbler
Joined
Mar 24, 2023
Messages
33
So for posterity it looks like when you "clone" a VM, it creates a new snapshot of the original ZVOL attached to the original VM and points the cloned VM to use that ZVOL snapshot. The snapshot only stores the differences between it and the original ZVOL, which is why it is so small. If you "promote" the snapshot, it can become a full ZVOL, but apparently at the cost of the original ZVOL becoming a clone of it and all that might delete other snapshots that were associated with the original ZVOL. I think using cmd line you can probably turn them both into full and unique ZVOLS unrelated to each other (for the cloned VM and the original VM), but I didn't find any easy way to do that in the WebUI, even though that would be my expected behavior by a default clone of a VM and what I specifically wanted to do. I think it is a great option to be able to clone a VM to use a snapshot of the original, but I don't understand why I can't just get a full, unique copy of a VM I have that is no longer related or linked in any way to the original easily in the WebUI.
 

Aquilino.br

Cadet
Joined
Apr 19, 2021
Messages
1
Dears
I did a clone using image iso in CD-rom device Todobackup for a folder in my network
Aquilino
 

shoulders

Dabbler
Joined
Jul 3, 2021
Messages
14
I did a small write up about what a VM clone is which might help.

 

Straafe

Dabbler
Joined
Mar 24, 2023
Messages
33
Yea, I went down a similar path it looks like you did, and ended up just using send/receive and ignoring the poorly named "Clone" button
 
Top