Guest can not automount directories or see any on Host

Discussions related to using VirtualBox on Linux hosts.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest can not automount directories or see any on Host

Post by scottgus1 »

Jonners59 wrote:the large number of queries on many websites and forums for this subject (one quoted some time ago he'd found 300 so far - as below)
This is because tremendously lots of people ask without web-searching first. That's why lmgtfy is a thing. :lol:
Jonners59 wrote:Not sure that was needed
I'm not sure exactly what you are referring to in the quote referenced by this, but if it's my instructions on how to get rid of VERR_PDM_MEDIA_LOCKED, then it is necessary to know how to do, since adding a superfluity of CD drives will run into a wall somewhere, whereas one only needs one CD drive if the error can be handled.
Jonners59 wrote:I have 3. Is that too many?
No, not necessarily. I have seen physical CD duplicator computers that have 9 CD drives in them. But adding yet another CD drive isn't the optimal solution for VERR_PDM_MEDIA_LOCKED. Releasing the mounted CD from the VM OS is.
Jonners59 wrote:1 x DVD
1 x the OS
1 x Guest Additions....
For the vast majority of operating systems, it is not necessary to have the OS installer CD loaded after the OS is installed. And Guest Additions should not remain mounted after the GAs are successfully installed and the OS has been rebooted. Many snapshot-happy users have found this to their cost when the VM has trouble loading a snapshot or getting registered on another host because of GAs being loaded through several snapshots.

It appears that the uploaded files are actually all a Word document called Nvidia Card.docx. Please try the upload again. Neither log file nor .vbox file need to be converted to anything else than regular text files. Though the log file needs to be saved, it should be saved as text, not a Word docx. And the .vbox file can be zipped as is without being edited or saved as anything else.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

scottgus1 wrote:
Jonners59 wrote:the large number of queries on many websites and forums for this subject (one quoted some time ago he'd found 300 so far - as below)
This is because tremendously lots of people ask without web-searching first. That's why lmgtfy is a thing. :lol:
I don’t agree. People Google search and find the Oracle website with these instructions and they don’t properly understand them, so they follow hundreds of other sites and blogs, most failed to resolve because they can not understand what is being said. A tribute to Oracle’s VB is that it is actually a very simple SW to use. The issue is understanding what everything does and how to use it. Even the download page is a mess of confusion, especially when it comes to understanding and finding the correct Guest Additions. They should be side by side to ensure the correct one and downloaded at the same time if it is needed. If people didn’t Google or other then they wouldn’t have found VB and they wouldn’t have raised and searched blogs. And the point of any Help forum is to do exactly that, “help”.
scottgus1 wrote:
Jonners59 wrote:Not sure that was needed
I'm not sure exactly what you are referring to in the quote referenced by this, but if it's my instructions on how to get rid of VERR_PDM_MEDIA_LOCKED, then it is necessary to know how to do, since adding a superfluity of CD drives will run into a wall somewhere, whereas one only needs one CD drive if the error can be handled.
It was because I had sorted the “VERR_PDM_MEDIA_LOCKED” in the previous reply and noted there was no difference in what it was doing before; namely that "Shared Folders" and the "bidirectional" functions still didn't work. BUT your later statement on why is a useful note.
scottgus1 wrote:
Jonners59 wrote:I have 3. Is that too many?
No, not necessarily. I have seen physical CD duplicator computers that have 9 CD drives in them. But adding yet another CD drive isn't the optimal solution for VERR_PDM_MEDIA_LOCKED. Releasing the mounted CD from the VM OS is.
Thank you. No, had no intention of adding any more CD drives. Noted about unmounting – removing the OS and GA drives. Useful to know and noted. I assume the issues one gets, especially with SNAPSHOTS is one of UUIDs being different in a new environment/restore.

Before and as I was following all the instructions I couldn’t recall ever doing all these steps when I installed GA the various times in the past – years ago. It’s not often I need to go into the application and do anything. I then realised that in the past all I did was download the GA and then in the Guest window menu, under “Devices” → “Insert Guest Additions CD”.
scottgus1 wrote:
Jonners59 wrote:1 x DVD
1 x the OS
1 x Guest Additions....
For the vast majority of operating systems, it is not necessary to have the OS installer CD loaded after the OS is installed. And Guest Additions should not remain mounted after the GAs are successfully installed and the OS has been rebooted. Many snapshot-happy users have found this to their cost when the VM has trouble loading a snapshot or getting registered on another host because of GAs being loaded through several snapshots.
Noted and answered above. I shall unmount/remove them.

Note I removed both, on some test (copies of old VMs) and they fail to run. I reattached the OS CD and they boot fine. I have the OS “unticked” in the launched Guest Window menu → “Devices” → “CD”.
scottgus1 wrote:It appears that the uploaded files are actually all a Word document called Nvidia Card.docx. Please try the upload again.
There was only one log file as requested, and yes, it seems to have picked up the name of another file in the parent folder I had downloaded it to. I hadn’t noticed its name change. I opened it in TXT and it was the log file and then just saved it in *.txt and reuploaded it.
scottgus1 wrote: Neither log file nor .vbox file need to be converted to anything else than regular text files. Though the log file needs to be saved, it should be saved as text, not a Word docx. And the .vbox file can be zipped as is without being edited or saved as anything else.
As above, reloaded the log file as txt. No need to zip it as it was very small. The *.vbox file I re-uploaded but it was the same as the previous so not really necessary, but done just the same. I simply zipped it though it was small.

Thanks very much. Appreciated

=======================================================================================

Update:
To try and resolve the "Shared Folders" issue I tried

Code: Select all

sudo adduser "username" vboxsf
as I had read that not being part of the usergroup will cause Shared Folders not to mount/work It did NOT work for me.

I am also getting a warning to appear when I boot the Guest: It states "VBoxClient: Failed to get display change request; re=VERR_ACCESS_DENIED". I have yet to find anything on this and am about to take #1 son back to uni.... will pick up later.

This one is not resolved:
viewtopic.php?f=3&t=79026

Something to look at when I return. Otherwise little or nothing else. All very old.
https://forums.whonix.org/t/issue-with- ... st/11929/2
" try installing virtualbox-ose-dkms"

Code: Select all

 sudo apt-get install virtualbox-ose-dkms
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest can not automount directories or see any on Host

Post by scottgus1 »

Jonners59 wrote:I don’t agree.
That's fine. I too have found places where instructions and the manual were hard to understand.
Jonners59 wrote: Even the download page is a mess of confusion, especially when it comes to understanding and finding the correct Guest Additions.
This is because users of official Virtualbox don't have to find the Guest Additions. They're bundled with the download of the official Virtualbox installer, so they don't need to be downloaded separately. The reason why you may have had to try to find the GAs ISO is because of this:
Jonners59 wrote:I am running Virtual Box Version 6.1.26_Ubuntu
You're running a forked version of Virtualbox, which we don't support on this forum, and which may require a separate download of forked GAs. You'd need to get the forked GAs from the fork's repository, not from http://www.virtualbox.org.
Jonners59 wrote:It was because I had sorted the “VERR_PDM_MEDIA_LOCKED” in the previous reply
No you didn't. You worked around the problem by adding another CD drive, not by solving the original problem by getting the VM OS to release the CD. If your installed OS does require the OS installer CD to still be present you would need another CD drive to load other ISOs. But adding CD drives to get around VERR_PDM_MEDIA_LOCKED is not the solution. It's a work-around, and may cause trouble later on.
Jonners59 wrote:I couldn’t recall ever doing all these steps when I installed GA the various times in the past
You hadn't got stopped with VERR_PDM_MEDIA_LOCKED before, apparently. The solution is to release the OS's hold on the mounted CD so it can be ejected from the VM's OS, or shut down the VM so the OS is not longer holding the CD.
Jonners59 wrote:reloaded the log file as txt. No need to zip it as it was very small. The *.vbox file I re-uploaded but it was the same as the previous so not really necessary, but done just the same. I simply zipped it though it was small.
Note to other readers, Jonners59 edited the earlier post to have the log and .vbox file uploaded.

Regrettably, the log is incomplete. This part was not followed:
scottgus1 wrote:Run until you see the problem happen, then shut down the VM from within the VM's OS.
The portion of log has some interesting issues showing up:
00:00:16.892735 VMMDev: Guest Log: 10:26:16.384848 main Error: Failed to become guest control master: VERR_VERSION_MISMATCH
00:00:16.893257 VMMDev: Guest Log: 10:26:16.385376 main Error: Service 'control' failed to initialize: VERR_VERSION_MISMATCH
My guess is that the Guest Additions are not installed correctly inside the VM OS. This can happen if the VM OS has "helpfully" pre-installed the GAs from their fork, then these preinstalled GAs are not completely uninstalled before new GAs are installed.

Or it could be the really old Guest Additions. 5.2.0 GAs is really long in the tooth from a 6.1.26 host Virtualbox standpoint.

Failed Guest Additions would not allow shared folders or display to work properly.

I would recommend these steps:

Take a complete host disk image to ensure restorability

Uninstall both the Ubuntu fork Virtualbox and the GAs in the VM. Use the typical Linux methods to ensure that Virtualbox and GAs are completely gone. Official non-forked Virtualbox does not use dkms, so no need to install that.

Run the prerequisites in both the host and the VM. https://www.virtualbox.org/manual/ch02. ... nux-prereq The same prerequisites apply for both Virtualbox on the host and GAs in the VM.

Install correct Virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads. Guest Additions will come bundled with the installer. Use the Devices menu, Insert Guest Additions CD Image command to load the GAs ISO in the VM, then run the GAs installer in the VM's CD drive.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

Morning scottgus1
Thanks for the feedback and next steps. Comments below:
scottgus1 wrote:
Jonners59 wrote: Even the download page is a mess of confusion, especially when it comes to understanding and finding the correct Guest Additions.
This is because users of official Virtualbox don't have to find the Guest Additions. They're bundled with the download of the official Virtualbox installer, so they don't need to be downloaded separately. The reason why you may have had to try to find the GAs ISO is because of this:
I am referring to some time ago when I tried to download and install a more up to date version from the one supplied with the distro. I have since popped back in from time to time and the site hasn’t changed at all other then newer versions added. This and all the ones I have used have all been part of the Ubuntu/xfce distro, so standard installs. However, they are a few years behind latest release. If I am not mistaken the current one, mine is 2019, so nearly 3 years out, hence why some years ago I tried a newer version.
scottgus1 wrote:
Jonners59 wrote:I am running Virtual Box Version 6.1.26_Ubuntu
You're running a forked version of Virtualbox, which we don't support on this forum, and which may require a separate download of forked GAs. You'd need to get the forked GAs from the fork's repository, not from http://www.virtualbox.org.
See above

scottgus1 wrote:
Jonners59 wrote:It was because I had sorted the “VERR_PDM_MEDIA_LOCKED” in the previous reply
No you didn't. You worked around the problem by adding another CD drive, not by solving the original problem by getting the VM OS to release the CD. If your installed OS does require the OS installer CD to still be present you would need another CD drive to load other ISOs. But adding CD drives to get around VERR_PDM_MEDIA_LOCKED is not the solution. It's a work-around, and may cause trouble later on.
I tried lots of things. Deleting drives, adding drives, selecting, unselecting, changing the ios, etc. The main point was that by this time I had resolved the error message, it had gone, so the log file request, which came after didn’t show that error.

scottgus1 wrote:
Jonners59 wrote:I couldn’t recall ever doing all these steps when I installed GA the various times in the past
You hadn't got stopped with VERR_PDM_MEDIA_LOCKED before, apparently. The solution is to release the OS's hold on the mounted CD so it can be ejected from the VM's OS, or shut down the VM so the OS is not longer holding the CD.
Noted, but as per above, did try that, ejecting them. The solution for me was to delete them all with the machine shutdown, and then re-install them. Which is a start again same version/method.
scottgus1 wrote:
Jonners59 wrote:reloaded the log file as txt. No need to zip it as it was very small. The *.vbox file I re-uploaded but it was the same as the previous so not really necessary, but done just the same. I simply zipped it though it was small.
Note to other readers, Jonners59 edited the earlier post to have the log and .vbox file uploaded.
? The .vbox was already uploaded and the log file all I did was re upload, but as txt, not docx They are the same files

scottgus1 wrote:Regrettably, the log is incomplete. This part was not followed:
scottgus1 wrote:Run until you see the problem happen, then shut down the VM from within the VM's OS.
It was followed, but there was no error message because it had already been resolved before the request for a log file.
scottgus1 wrote: The portion of log has some interesting issues showing up:
00:00:16.892735 VMMDev: Guest Log: 10:26:16.384848 main Error: Failed to become guest control master: VERR_VERSION_MISMATCH
00:00:16.893257 VMMDev: Guest Log: 10:26:16.385376 main Error: Service 'control' failed to initialize: VERR_VERSION_MISMATCH
Oohhh. OK…..
scottgus1 wrote:My guess is that the Guest Additions are not installed correctly inside the VM OS. This can happen if the VM OS has "helpfully" pre-installed the GAs from their fork, then these preinstalled GAs are not completely uninstalled before new GAs are installed.
No, it has to be added. The distro does not have the VB included, but available in the software store, and the GA as a seperate option in the store – if you know to add it then you can search the store and install. Easier in Synaptic as that will list all the apps and extensions etc.
scottgus1 wrote:Or it could be the really old Guest Additions. 5.2.0 GAs is really long in the tooth from a 6.1.26 host Virtualbox standpoint.
Could be, see my comments above. This is the current version in the SW store in the distro and I think is 2019.
scottgus1 wrote:Failed Guest Additions would not allow shared folders or display to work properly.
Thank you…. Makes a lot of sense. Where I have been thinking on this too.
scottgus1 wrote:I would recommend these steps:

Take a complete host disk image to ensure restorability

Uninstall both the Ubuntu fork Virtualbox and the GAs in the VM. Use the typical Linux methods to ensure that Virtualbox and GAs are completely gone. Official non-forked Virtualbox does not use dkms, so no need to install that.

Run the prerequisites in both the host and the VM. https://www.virtualbox.org/manual/ch02. ... nux-prereq The same prerequisites apply for both Virtualbox on the host and GAs in the VM.

Install correct Virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads. Guest Additions will come bundled with the installer. Use the Devices menu, Insert Guest Additions CD Image command to load the GAs ISO in the VM, then run the GAs installer in the VM's CD drive.
OK, will give it a go and revert Thank you.
Last edited by Jonners59 on 5. Jan 2022, 17:53, edited 1 time in total.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

Update:
I have tried all the links and I am having a painful slow progress. Finding the links are not working, Firefox does not like the Oracle site stating certificates are out of date and the site is not safe. Makes everything that much more painfully slow.

So having managed to get in, this is what it says:
Debian-based Linux distributions

Add the following line to your /etc/apt/sources.list. According to your distribution, replace '<mydist>' with 'eoan', 'bionic', 'xenial', 'buster', 'stretch', or 'jessie' (older versions of VirtualBox supported different distributions):

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib

The Oracle public key for apt-secure can be downloaded

here for Debian 8 ("Jessie") / Ubuntu 16.04 ("Xenial") and later
here for older distributions.

You can add these keys with

sudo apt-key add oracle_vbox_2016.asc
sudo apt-key add oracle_vbox.asc

or combine downloading and registering:

wget -q https://www.virtualbox.org/download/ora ... x_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

The key fingerprint for oracle_vbox_2016.asc is

B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>

The key fingerprint for oracle_vbox.asc is

7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>

(As of VirtualBox 3.2, the signing key was changed. The old Sun public key for apt-secure can be downloaded here.)

To install VirtualBox, do

sudo apt-get update
sudo apt-get install virtualbox-6.1

Replace virtualbox-6.1 by virtualbox-6.0 or virtualbox-5.2 to install the latest VirtualBox 6.0 or 5.2 build.

What to do when experiencing The following signatures were invalid: BADSIG ... when refreshing the packages from the repository?

# sudo -s -H
# apt-get clean
# rm /var/lib/apt/lists/*
# rm /var/lib/apt/lists/partial/*
# apt-get clean
# apt-get update
Taking step 1:

Code: Select all

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib
This does not work for the latest versions of Linux, the last, working version is eoan which was October 2019. I tried the more recent versions;
• 2.32 Ubuntu 20.04 LTS (Focal Fossa) Focal
• 2.33 Ubuntu 20.10 (Groovy Gorilla) Groovy
• 2.34 Ubuntu 21.04 (Hirsute Hippo) Hirsute
• 2.35 Ubuntu 21.10 (Impish Indri) Impish - the current
• 2.36 Ubuntu 22.04 LTS (Jammy Jellyfish) Jammy - currently Beta, due April.
and they all fail.
So added

Code: Select all

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian eoan contrib
by doing

Code: Select all

sudo gedit /etc/apt/sources.list
sudo apt-get update
Then the next stage but got a warning. It's using the older method of trusted sites. Should now be using trusted.gpg.d:

Code: Select all

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
[sudo] password for administration: 
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
Ran

Code: Select all

sudo apt-get update
that was good and clean
Then ran

Code: Select all

sudo apt-get install 
That seemed to go well.
Opened VirtualBox and looked at the version that was the previous. It then popped up a window asking if I'd like to upgrade. I accepted, added my password. It then asked if I'd like to upgrade Extensions. Accepted. VB is now 6.1.30. Excellent.
Tried to start the Guest and it failed:
The virtual machine 'Debian' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
RTR3InitEx failed with rc=-1912 (rc=-1912)

The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

'/sbin/vboxconfig'

may correct this. Make sure that you are not mixing builds of VirtualBox from different sources.

where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.
Followed the instructions

Code: Select all

sudo /sbin/vboxconfig
Output

Code: Select all

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
Same again

Now time to search up why. My suspicion is that it does not work with the latest kernel. dunno. Needs more searching
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest can not automount directories or see any on Host

Post by scottgus1 »

It appears that "www.virtualbox.org" isn't up at the moment. I'm sure that will get fixed soon. This site:

https://download.virtualbox.org/virtualbox/

seems to still be up.

https://download.virtualbox.org/virtualbox/6.1.30/ has all the 6.1.30 downloads, including Linux downloads.
Jonners59 wrote:Debian-based Linux distributions

Add the following line to your /etc/apt/sources.list....
This stuff is all about tweaking the "Apt Get" repository for Virtualbox to point to virtualbox.org, not the Linux repository. Downloading the installer file from virtualbox.org will allow installing Virtualbox without requiring adjusting the repository settings on the Linux host.
Jonners59 wrote:The virtual machine 'Debian' has terminated unexpectedly during startup with exit code 1 (0x1).
I've got a recollection that this is caused by still having portions of Linux fork Virtualbox still installed in the host OS. Which seems to fit with this:
Jonners59 wrote:The VirtualBox kernel modules do not match this version of VirtualBox.
How to fix this is beyond me. Try some web-searches on the error message with the site restrictor "site:forums.virtualbox.org" added to see what the Virtualbox forum gurus have said.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest can not automount directories or see any on Host

Post by fth0 »

scottgus1 wrote:This stuff is all about tweaking the "Apt Get" repository for Virtualbox to point to virtualbox.org, not the Linux repository.
Not quite right. The commands add the Oracle repositories in addition to the Ubuntu repositories, so that "both" repositories are used by the apt commands. The Oracle VirtualBox package is named virtualbox-6.1, so that the name does not conflict with the Ubuntu VirtualBox package names. But it's up to the user to install only packages from one repository, and if they fail to do so, the mixture is not going to work.

To fix the current situation, I'd suggest to uninstall all VirtualBox packages from both repositories, to reboot the host, to make sure that the Ubuntu kernel header packages matching the currently running Linux kernel are installed, to make sure that the programs to compile kernel modules are installed (e.g. via the buildessential package), and when installing the Oracle VirtualBox version afterwards, to look for potential error messages.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

scottgus1 wrote:It appears that "www.virtualbox.org" isn't up at the moment. I'm sure that will get fixed soon. This site:

https://download.virtualbox.org/virtualbox/

seems to still be up.

https://download.virtualbox.org/virtualbox/6.1.30/ has all the 6.1.30 downloads, including Linux downloads.
Jonners59 wrote:Debian-based Linux distributions

Add the following line to your /etc/apt/sources.list....
This stuff is all about tweaking the "Apt Get" repository for Virtualbox to point to virtualbox.org, not the Linux repository. Downloading the installer file from virtualbox.org will allow installing Virtualbox without requiring adjusting the repository settings on the Linux host.
Jonners59 wrote:The virtual machine 'Debian' has terminated unexpectedly during startup with exit code 1 (0x1).
I've got a recollection that this is caused by still having portions of Linux fork Virtualbox still installed in the host OS. Which seems to fit with this:
Jonners59 wrote:The VirtualBox kernel modules do not match this version of VirtualBox.
How to fix this is beyond me. Try some web-searches on the error message with the site restrictor "site:forums.virtualbox.org" added to see what the Virtualbox forum gurus have said.
Thank you...
scottgus1 wrote: https://download.virtualbox.org/virtualbox/6.1.30/ has all the 6.1.30 downloads, including Linux downloads.
Note that these are all old, the newest being Eoan which is 3 years old and soon to be out of support.
Last edited by Jonners59 on 6. Jan 2022, 13:32, edited 1 time in total.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

fth0 wrote: To fix the current situation, I'd suggest to uninstall all VirtualBox packages from both repositories, to reboot the host, to make sure that the Ubuntu kernel header packages matching the currently running Linux kernel are installed, to make sure that the programs to compile kernel modules are installed (e.g. via the buildessential package), and when installing the Oracle VirtualBox version afterwards, to look for potential error messages.
Thanks, fth0
Makes sense.
So a sudo apt-get uninstall.....

====================================================
OK, update. Bit of a shaky start and delayed as the new car broke down.

I used Synaptic, searched VirtualBox and highlighted all installed for complete removal. And removed.
Then in the Two apps stores, searched and removed, though by this time none were showing as installed.
Then in a terminal I:

Code: Select all

sudo apt-get remove --purge virtualbox 

Code: Select all

sudo apt-get remove --purge virtualbox*
That cleared out the last remnants

Code: Select all

sudo apt-get autoclean

Code: Select all

sudo apt-get autoremove
then reboot

Then I installed the 1.6.30 deb downloaded from the website - not the distro version.
I then started the VM Guest and loaded fine
I then tried to Install Guest Additions and had errors... Will pick up tomorrow.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

OK, so today I shutdown the Guest and then added a new Optical disc and pointed it at the Guest Additions (without a version number) which I am assuming came with the Virtualbox.deb file, based on pervious comments.
IUpon booting the Guest I selected "Insert Guest Additions CD image" from the "Devices" menu on the Guest Window. it asked me if I wanted to install the image. I chose YES and added my password. It installed and gave the following warning in the terminal.
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.30 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
4.19.0-18-amd64. Please install them and execute
/sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
Press Return to close this window...

Code: Select all

uname -r
4.19.0-18-amd64
Not sure what to do now, bar reboot. This is the latest version of VirtualBox and the latest version of the kernel.

After reboot:
Shared Folders is still not working. Bidirectional drag and drop and clipboard also not working
getting this message:
VBoxClient: Failed to register resizing support, rc=VERR_INVALID_FUNCTION
Warning message
Warning message
Screenshot from 2022-01-07 13-07-08.png (15.27 KiB) Viewed 9300 times
Log attached.
Debian-2022-01-07-12-25-51.txt.zip
VB log zipped
(24.2 KiB) Downloaded 1 time
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest can not automount directories or see any on Host

Post by fth0 »

Just like VirtualBox on the host, the VirtualBox Guest Additions in the guest also build some kernel modules during their installation, and the messages in the terminal explicitly tell you to install the Linux kernel headers matching the running Linux kernel.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

fth0 wrote:Just like VirtualBox on the host, the VirtualBox Guest Additions in the guest also build some kernel modules during their installation, and the messages in the terminal explicitly tell you to install the Linux kernel headers matching the running Linux kernel.
Thanks for getting back, but I have already done that - that was the ref above, but also in the Host too. After the last attempt I uninstalled the downloaded latest version of VB and reinstalled the one that comes in the latest Distro, which is about 3 years older.

neither work
Guest
Kernel Headers
Kernel Headers
Screenshot from 2022-01-07 14-11-25.png (35.76 KiB) Viewed 9293 times
Host:
Host Kernel Headers
Host Kernel Headers
kernel headers.png (16.15 KiB) Viewed 9293 times
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I then searched gcc in synaptic on both Host and guest. Already installed.
Then tried searching "make perl" and looked for similar and installed packages.
Retried the GA install and NO errors.

After a reboot of the Guest, the directories are showing - YIPEEEEE!

Now the HOWEVER.
The directories can not be accessed - do not have permission and the bidirectional stuff still does not work.

A major step closer. None of this is in the instructions.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest can not automount directories or see any on Host

Post by scottgus1 »

Jonners59 wrote:Thanks for getting back, but I have already done that - that was the ref above, but also in the Host too. After the last attempt I uninstalled the downloaded latest version of VB and reinstalled the one that comes in the latest Distro, which is about 3 years older.
If you had really already done that then the GAs would have installed. I have actually "done that" and got the GAs to install successfully. The error message does not lie.

And you probably just gave up too soon and went back to a version that had the correct kernel headers already present.
Jonners59 wrote:None of this is in the instructions.
https://www.virtualbox.org/manual/ch04. ... ions-linux
"4.2.2.1. Installing the Linux Guest Additions"
Before installing the Guest Additions, you prepare your guest system for building external kernel modules. This works as described in Section 2.3.2, “The Oracle VM VirtualBox Kernel Modules”, except that this step must be performed in your Linux guest instead of on a Linux host system.
https://www.virtualbox.org/manual/ch02. ... nux-prereq
"2.3.2. The Oracle VM VirtualBox Kernel Modules"
Since distributing driver modules separately from the kernel is not something which Linux supports well, the Oracle VM VirtualBox install process creates the modules on the system where they will be used. This means that you may need to install some software packages from the distribution which are needed for the build process. Required packages may include the following:
GNU compiler (GCC)
GNU Make (make)
Kernel header files
...
Start by finding the version name of your kernel, using the command uname -r in a terminal.
...
With Debian and Ubuntu-based distributions, you must install the correct version of the linux-headers, usually whichever of linux-headers-generic, linux-headers-amd64, linux-headers-i686 or linux-headers-i686-pae best matches the kernel version name. Also, the linux-kbuild package if it exists.
...
Jonners59 wrote:None of this is was found in the instructions.
FTFY :wink:

However:
Jonners59 wrote:When these were written by regular users/developers they naturally assume everyone is conversant and all is very clear
The manual could sometimes be clearer, yes.

Note that Virtualbox does not provide full OS tutelage support for how to properly enter Linux commands. So it does not show the command line for your particular Linux's headers install command, which would be googlable: "debian linux how to install kernel headers".
Jonners59 wrote:The directories can not be accessed - do not have permission
Try checking this:
https://www.virtualbox.org/manual/ch04. ... redfolders
For Linux and Oracle Solaris guests, access is restricted to members of the group vboxsf and the root user.
Check to see if your VM user is part of the vboxsf group.
Jonners59 wrote:and the bidirectional stuff still does not work.
Start the VM from full power off, not save-state. Try the various Guest-Additions-supported bidirectional services, then shut down the VM from within the VM OS.

Please right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.

Also, please confirm if either the host OS or the VM OS is running a Wayland desktop.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Guest can not automount directories or see any on Host

Post by Jonners59 »

Good evening Scottgus1,
Thank you for getting back to me.
scottgus1 wrote:
Jonners59 wrote:Thanks for getting back, but I have already done that - that was the ref above, but also in the Host too. After the last attempt I uninstalled the downloaded latest version of VB and reinstalled the one that comes in the latest Distro, which is about 3 years older.
If you had really already done that then the GAs would have been installed. I have actually "done that" and got the GAs to install successfully. The error message does not lie.

And you probably just gave up too soon and went back to a version that had the correct kernel headers already present.
No, I did do that. Not even sure why I need to be contradicted. I know what I did.
scottgus1 wrote:
Jonners59 wrote:None of this is in the instructions.
https://www.virtualbox.org/manual/ch04. ... ions-linux
"4.2.2.1. Installing the Linux Guest Additions"
Before installing the Guest Additions, you prepare your guest system for building external kernel modules. This works as described in Section 2.3.2, “The Oracle VM VirtualBox Kernel Modules”, except that this step must be performed in your Linux guest instead of on a Linux host system.
https://www.virtualbox.org/manual/ch02. ... nux-prereq
"2.3.2. The Oracle VM VirtualBox Kernel Modules"
Since distributing driver modules separately from the kernel is not something which Linux supports well, the Oracle VM VirtualBox install process creates the modules on the system where they will be used. This means that you may need to install some software packages from the distribution which are needed for the build process. Required packages may include the following:
GNU compiler (GCC)
GNU Make (make)
Kernel header files
...
Start by finding the version name of your kernel, using the command uname -r in a terminal.
...
With Debian and Ubuntu-based distributions, you must install the correct version of the linux-headers, usually whichever of linux-headers-generic, linux-headers-amd64, linux-headers-i686 or linux-headers-i686-pae best matches the kernel version name. Also, the linux-kbuild package if it exists.
...
There is no reference to perl or some of the other items. I just searched the contents of each and selected what sounded like what was missing.

scottgus1 wrote:Try checking this:
https://www.virtualbox.org/manual/ch04. ... redfolders
For Linux and Oracle Solaris guests, access is restricted to members of the group vboxsf and the root user.
Check to see if your VM user is part of the vboxsf group.
Yes, already tried that, as above, it made no difference. Something I may try though is to add vboxsf to my host profile, if I can. That would mean that VB has the same user rights and access and so should be able to see the directories. A thought.
scottgus1 wrote:
Jonners59 wrote:and the bidirectional stuff still does not work.
Start the VM from full power off, not save-state. Try the various Guest-Additions-supported bidirectional services, then shut down the VM from within the VM OS.

Please right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.

Also, please confirm if either the host OS or the VM OS is running a Wayland desktop.
OK, shall try that. I always do a proper power down. It is very quick on the guest so almost as fast as any other method.

Don’t know about the Wayland. I’ll check that when I do the log. Please note. That the attached log file will almost certainly be the same as I took it after the updates and installs and after rebooting. So will probably contain the same information, but I’ll do another one.

Thank you... :-)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Guest can not automount directories or see any on Host

Post by scottgus1 »

Jonners59 wrote:After the last attempt I uninstalled the downloaded latest version of VB and reinstalled the one that comes in the latest Distro
If you have gone back to the Ubuntu fork, then you will have to ask Ubuntu for help, as this forum does not support forked Virtualbox.
Locked