Created attachment 245999 [details] for Makefile of the port Hi! Proposed change introduces new port option VBOXIMG that enables building and installing "vboximg-mount" utility. It is not enabled by default as it needs fusesfs-libs as another dependency.
Created attachment 246000 [details] for pkg-plist
Created attachment 246001 [details] extra patch to files/ directory
Created attachment 246002 [details] single ready-to-commit patch
Created attachment 246003 [details] single ready-to-commit patch Correct VBOXIMG_DESC
Did you test vboximg-mount and it work fine? On which versions of the FreeBSD did you tested?
(In reply to Vladimir Druzenko from comment #5) Yes, it was tested with 13.2-STABLE/amd64 and it works just fine. Also, another FreeBSD user of @freebsd_ru Telegramm chat room has tested it successfully.
Building in progress…
Build fine in poudriere 13.2, 12.4 and on live 13.2. But can you describe steps to use it with VMs on non-root users?
(In reply to Vladimir Druzenko from comment #8) The utility is not for running VMs. It is to gain access to images like VDI etc. And I tested it using root only. I do not know if it is meant to be used by non-root.
(In reply to Eugene Grosbein from comment #9) > The utility is not for running VMs. It is to gain access to images like VDI etc. Yes, I know. My english is poor - probably my question isn't clear… If my VM configured for non-root user, VM is stopped, how to mount it with root user? I got list of partitions, but I can't mount any: # vboximg-mount --image /path/to/system.vdi --list Virtual disk image: Base: /path/to/system.vdi UUID: 66d60720-0a8a-40a1-8d52-8281340b4877 Partition Boot Start Sectors Size Offset Type system.vdi(0) 40 984 492.0K 20480 FreeBSD system.vdi(1) 1024 2097152 1.0G 524288 FreeBSD system.vdi(2) 2098176 4194304 2.0G 1074266112 FreeBSD system.vdi(3) 6292480 2097152 1.0G 3221749760 FreeBSD system.vdi(4) 8389632 25164760 11.9G 4295491584 FreeBSD # mkdir m # vboximg-mount -i /path/to/system.vdi m # ls -la m total 2150141 drwxr-xr-x 2 root wheel 0 1 янв. 1970 . drwxr-xr-x 10 root wheel 35 10 нояб. 14:05 .. lr--r--r-- 1 root wheel 0 7 нояб. 05:29 system.vdi -> /path/to/system.vdi -rw-r--r-- 1 4294967295 4294967295 17179869184 10 нояб. 14:05 vhdd -rw-rw-rw- 1 root wheel 503808 1 янв. 1970 vol0 -rw-rw-rw- 1 root wheel 1073741824 1 янв. 1970 vol1 -rw-rw-rw- 1 root wheel 2147483648 1 янв. 1970 vol2 -rw-rw-rw- 1 root wheel 1073741824 1 янв. 1970 vol3 -rw-rw-rw- 1 root wheel 12884357120 1 янв. 1970 vol4 # mount m/vol1 /mnt/ mount: m/vol1: Block device required But while I write this message I run commands: # mdconfig m/vol1 md0 # mount /dev/md0 /mnt And it work for me - I can "ls /mnt" and see files!
Eugene, waiting maintainer timeout and you can commit it self - 3 days left. :-)
(In reply to Vladimir Druzenko from comment #10) Ether add "vboximg-mount -g" option, or use mdconfig as you have done already.
Maintainer timeout - you can commit this patch self. If you want you can add me as "Tested by:".
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6c5da516ce5b8ec11e70c5b433e7164c14453d0a commit 6c5da516ce5b8ec11e70c5b433e7164c14453d0a Author: Eugene Grosbein <eugen@FreeBSD.org> AuthorDate: 2023-11-16 11:05:14 +0000 Commit: Eugene Grosbein <eugen@FreeBSD.org> CommitDate: 2023-11-16 11:05:42 +0000 emulators/virtualbox-ose: add option to build vboximg-mount Introduce new port option VBOXIMG that enables building and installing "vboximg-mount" utility. It is not enabled by default as it needs fusesfs-libs as another dependency. The utility gives access to insides of VM images like .vdi files etc. Use "vboximg-mount -g" to get access to files on internal file systems not supported by native FreeBSD mount command. Refer to utility's internal online help for syntax details and to original documentation: https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vboximg-mount.html PR: 274817 Tested by: vvd Approved by: vbox (maintainer timeout over 2 weeks) emulators/virtualbox-ose/Makefile | 18 ++++++++++++++++-- .../files/extrapatch-vboximg-Config.kmk (new) | 11 +++++++++++ emulators/virtualbox-ose/pkg-plist | 2 ++ 3 files changed, 29 insertions(+), 2 deletions(-)