Bhyve - access to local storage

mpfusion

Contributor
Joined
Jan 6, 2014
Messages
198
Hi,

I need to create a VM with access to a directory on the server that is currently shared via NFS. I can shutdown all clients or disable NFS if that poses a problem. In the GUI I can only select a ZVOL, but the data is not stored in a ZVOL. So this leaves only NFS as far as I can see, but I cannot use NFS. Is there another possibility to access a directory from the TrueNAS server within a (Debian) bhyve VM (that is *not* NFS)? Like 9P?

This is not supposed to be a good and reliable solution. I need access to the data, run a program on the Debian VM and then I can delete the VM again.

TrueNAS-13.0-U5
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Why can't you run the program (what is it?) in a jail on FreeBSD? Jails have full access to local files, VMs don't. NFS or SMB are the only options.
 

mpfusion

Contributor
Joined
Jan 6, 2014
Messages
198
Why can't you run the program (what is it?) in a jail on FreeBSD?
The program is usrmerge. I'm not sure if it exists on FreeBSD and if it's Debian specific.

TrueNAS serves a directory of root directories to Debian machines that mount the root file system via NFS. But usrmerge doesn't support NFS and just quits. So the idea was to run a Debian VM with bhyve. Mount the root FS in the VM. Chroot and run usrmerge. Rinse and repeat for each host.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I'd check first if usrmerge is not in fact a bash script or written in some other scripting language.
 

mpfusion

Contributor
Joined
Jan 6, 2014
Messages
198
I'd check first if usrmerge is not in fact a bash script or written in some other scripting language.
It looks like perl:
#!/usr/bin/perl # vim: shiftwidth=4 tabstop=4 # # Copyright 2014-2022 by Marco d'Itri <md@Linux.IT> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. use warnings; use strict; use autodie; use v5.16; use File::Find::Rule; use Cwd qw(abs_path); use Errno; my $Debug = 0; my $Program_RC = 0; my $Is_Hurd = is_hurd();
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Copy an instance of the data in question into a jail, try the script inside a jail in which ju installed perl, nothing can happen to your NAS ...
 
Top