bodyagency
(bodyagency network labs)
January 14, 2023, 12:48pm
1
Helllouuuu.
I am trying to set up a FreeBSD/TrueNAS VM with LXD.
When I am doing this on my local Storage Pool (System Disk, btrfs) located on my system’s boot device, it works fine.
I am trying to set it up on my additional Storage Pool (ZFS Mirror, managed by LXD) and I am running into an error upon machines startup:
Error: Failed getting disk path: exec: "zvol_id": executable file not found in $PATH
Commands used to set it up:
lxc init nas \
--vm \
--empty \
--profile=default \
--project=run \
--storage=zpool1 \
-c limits.cpu=4 \
-c limits.memory=32GiB \
-c security.secureboot=false
echo '-cpu host' | lxc config set nas --project=run raw.qemu -
lxc config device add nas --project=run iso disk \
source=/opt/iso/TrueNAS-13.0-U3.1.iso \
boot.priority=10
What does this message mean? What can I do to get the VM running on the zfs pool? And why I do not have problems on the system’s boot HD device?
All my LXD Containers are running very well on the zfs pool.
Thanks for your help and suggestions.
Magnus.
tomp
(Thomas Parrott)
January 16, 2023, 8:17am
2
Do you have a command called zvol_id
on your system? Apparently its not in /lib/udev/zvol_id
nor is it in your PATH.
tomp
(Thomas Parrott)
January 16, 2023, 8:18am
3
Apparently udev is also not working on your system.
What is your host OS/version?
As you are getting an error here:
// GetVolumeDiskPath returns the location of a root disk block device.
func (d *zfs) GetVolumeDiskPath(vol Volume) (string, error) {
// Shortcut for udev.
if shared.PathExists(filepath.Join("/dev/zvol", d.dataset(vol, false))) {
return filepath.Join("/dev/zvol", d.dataset(vol, false)), nil
}
// Locate zvol_id.
zvolid := "/lib/udev/zvol_id"
if !shared.PathExists(zvolid) {
var err error
zvolid, err = exec.LookPath("zvol_id")
if err != nil {
return "", err
}
}
bodyagency
(bodyagency network labs)
January 16, 2023, 9:32am
4
Hi Thomas,
host OS is Alpine 3.17. And you’re right, I did not manually install udev (I try to keep my system lean). But the directoy is there. This is all it’s content:
core:/lib/udev/rules.d# ls -a
. .. 64-btrfs-dm.rules 64-btrfs-zoned.rules 80-kvm.rules 99-fuse.rules
For containers on the zfs pool and for VM on the local btrfs pool it does not cause any issues. They are going smooooooth.
tomp
(Thomas Parrott)
January 16, 2023, 9:36am
5
I suppose it depends on whether there is another way of programatically locating the device path for a ZFS block volume.