Bhyve zvol

Jasonachmed

Dabbler
Joined
Feb 24, 2021
Messages
10
I have a few vms running in VirtualBox and i would like to move them over to bhyve.
Its easy enough to convert them to raw files and copy them over to TrueNas but when you create a virtual machine the wizard ask for a zvol.

Is there any way i can use file base virtual hdd instead of a zvol?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
No, but it’s easy enough to dd the contents of the raw files to their respective zvols. Note each zvol lives in /dev/zvol/path/to/zvol/in/your/pool.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, but you can use dd to write the contents of the file to the zvol.
 

Jasonachmed

Dabbler
Joined
Feb 24, 2021
Messages
10
Thats unfortunate, dd will probably work but takes time to run and having a file you can copy and move around has been useful in lots of situations for example vm templates and quickly mounting laptop drive images. I guess zvol can do some of the same things though and clone could probably help with templates.

How does byhve manage clones? Does it create a differential zvol or duplicate the whole zvol? if i want to convert a cloned vm to a raw file so i can copy it somewhere else how does this work?

If i run the below will clonebackup.img be a copy of the full vm or only of the changes made to the template?
Code:
dd if=/dev/zvol/name/testClone of=/clonebackup.img
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
bhyve itself has no clone capability. It's just the hypervisor. zvols, on the other hand, can be cloned, replicated, promoted from snapshot, or any other ZFS operation you could conceive of on a dataset.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Adding to @Samuel Tai - these operations include differential snapshots and differential replication.
 
Top