Can't find VM's virtual disk

TinyWorkshop

Dabbler
Joined
Jul 14, 2022
Messages
40
First of all I'm relatively New to freenas... so forgive me for the noob question:

I've a couple of VM running on a single nvme with a single vdev on my truenas (VirtIO on /mnt/Fast/VM on installation). I would like to copy the virtual disk to another Physical machine for some testing, the problem il that I can't find the image in the VM folder, it's actually empity (but from the storage dashboard I see space occupied)

obviously already checked for hidden files and folders.

Am I missing something?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The virtual disks are zvols (ZFS volumes), not files. You can list them with zfs list -t volume and copy them with zfs send.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Zvols live in /dev/zvols/, and aren't a file you can move. You can, however, use dd to copy the contents of a zvol to a RAW VM disk file, and then move the RAW file to your physical system. You can then dd the contents of the RAW file onto a physical disk in your physical system.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
@Samuel Tai Don't you think it's preferable to use zfs send pool/path/to/volume | gzip -c >/mnt/pool/some/path/to/file instead of dd?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
All things being equal, yes. However, the OP said he wanted to accomplish a V2P migration from the VM's virtual disk image to a physical disk on another system for testing. zfs send would only allow for duplicating the source zvol as another zvol on the send target.
 

TinyWorkshop

Dabbler
Joined
Jul 14, 2022
Messages
40
oh finally!

thank you for the help guys and sorry again for the dumb question :grin:
 

Chuck Munro

Cadet
Joined
Jan 3, 2016
Messages
8
Interesting mystery .... when I use "zfs list -t volume" it correctly reports the VM client disk sizes and remaining unused space on the pool. The dashboard's Dataset report is correct as well.

But ... when I do a simple Linux "df -H" of the system, it shows only 263kB usage of the pool that contains those zvols. Why would that be?

The system and VM clients are all running fine, I'm just curious why the "df" command misses showing the pool's used space. I'm currently running TrueNAS-SCALE-22.12.0
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
But ... when I do a simple Linux "df -H" of the system, it shows only 263kB usage of the pool that contains those zvols. Why would that be?

I explained that above already. Zvols don't live within the /mnt/<pool> directory tree. They live in /dev/zvols, which df doesn't know to count for ZFS file systems.
 
Top