Php-vbox: registering a lost virtual machine after update - looking for best practice

NethServer Version: 7.9
Module: phpvirtualbox

I am using zfs for storing data. Though it generally works fine and I love it, it raises some questions in conjunction to other modules, mostly following major system updates.

After kernel upgrades and reinstalling zfs-kmod, my virtual machine is no longer registered. I assume it gets lost when rebooting with the zfs-pools not yet attached.

How can I re-register it in the right way? On cli or better in phpvb-web-client? What user? And what needs to be done?

I encounter error messages, either “file not found” or unavailable hard disk (which refers to a virtual drive).

Thank you!

@stephdl
Do you have an idea?

1 Like

Not expert with zfs but first can you write/read on your zfs share. Vb seems to say it can’t

Yes, I can read and write on the zfs dataset. I think, when Vboxmanage says, it can’t read, it is either looking for a non-existing file or its user has not sufficient rights.

Example for looking for wrong file: It sometimes searches in /home/vboxweb/.config/VirtualBox/, while the VMs are stored in vboxweb/VirtualBox VMs/username_nameofVM/
When I manage to get the path right, then it doesn’t find the vdi (which is in same location).

The way I use zfs here: I mount a dedicated zfs dataset (a virtual volume) to /home/vboxweb. This replaces all content of vboxweb with the content of the dataset.

After restart, the vbox services first find different settings in /home/vboxweb. After mounting the dataset, the settings would be right, but they are not detected by the vbox services.

I tried restarting services, but without success so far. But I don’t know, if I do it right. So I would like to do this first: restarting all related services properly. How do I achieve this?
Will I need to restore the status of vboxweb prior to upgrade / has it been changed since then?

These are the services we restart

It should be named by vbox* something, look after them with systemctl

Sorry no laptop, only a mobile

Ok, now I can see the vm in phpvb web client, but it is inaccessible.

What I did:
systemctl stop vbox*
zfs rollback pool/vboxweb@2021-07-13
systemctl start vboxautostart-service.service
systemctl start vboxballoonctrl-service.service
systemctl start vboxdrv.service
systemctl start vboxweb-service.service

I get this message:

VirtualBox - Error: A differencing image of snapshot {935ab172-428d-4f03-8f30-23c0af8ba8c0} could not be found. Could not find an open hard disk with UUID {401837a9-02ff-4874-9e09-4786fa9ea202}
Result Code: : (0xFFFFFFFF80004005)
Component: : SnapshotMachine