[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

What to do when the VirtualBox shared folder cannot be mounted

Hello.
I'm Mandai, in charge of Wild on the development team.

VirtualBox's shared folders are very convenient and I find them very useful.
However, one day I suddenly couldn't mount it, and I didn't know what to do at that time, so I ended up exchanging files in various other ways.

Recently, I finally found out the cause of this problem, so I would like to write down a method to deal with it.

When developing game APIs, the production environment is often Linux, so I use a Windows machine, but I still get by with a pattern of having a similar environment on hand with a VM.

Regarding the environment around the VM, I use VirtualBox, and the VM OS image is generally CentOS.

 

Reinstall tools from Level 1 Guest Additions CD

This is the first thing that comes to mind.

This is a slightly old article, but VirtualBox Shared Folder Memorandum | dark_green's diary | SLAD , this often occurs when updating the kernel module using yum etc.
Since it's a VM, can I handle it more roughly?

When you select "Insert CD Image" from "Device" in the VirtualBox menu, the installation tool will start automatically.
If the CD is already mounted on your desktop, just double-click the CD icon.

I don't think it's a good idea to introduce it and say this, but if it can be cured, I don't have to worry about it.

 

Level 2 Resetting the shared folder

There were cases in the past when this method became visible.

This can be configured from the VM settings in VirtualBox Manager.
Or, if you are viewing the VM UI, there is a folder icon in the bottom right corner, so click on it.

If the directories on both the host and guest sides are set correctly, it may be mounted.

 

Level 3 Replace the symbolic link of mount.vboxsf

Finally, the workaround that was recovered this time is to change the link destination of the mount.vboxsf symbolic link.

What happened was that the entity of mount.vboxsf, which is the mount command to create a shared folder, was actually different.

which mount.vboxsf /sbin/mount.vboxsf ls -al | grep vboxsf mount.vboxsf -> /usr/lib64/VBoxGuestAdditions/mount.vboxsf

This does not mean that the file does not exist, but the file exists in the path /usr/lib64/VBoxGuestAdditions/mount.vboxsf.

So, what to do about this?

# cd /sbin sudo ln -sf /usr/lib/VBoxGuestAdditions/mount.vboxsf mount.vboxsf

Just change the direction of the symbolic link to mount.vboxsf under VBoxGuestAdditions, which is also under /usr/lib.

If it is set to automount, restart the VM and use the df command to see that it is properly mounted.

Since the OS is a 64-bit version of CentOS, /usr/lib64 would seem to be fine, but apparently it is not.
I think this may be due to a problem with the Guest Additions CD installer, but what do you think, Oracle-san?

This also seems to have happened after updating the kernel module.

After all, updating the VM kernel seems to have various risks.

That's it.

If you found this article helpful , please give it a like!
3
Loading...
3 votes, average: 1.00 / 13
27,086
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author

Yoichi Bandai

My main job is developing web APIs for social games, but I'm also fortunate to be able to do a lot of other work, including marketing.
Furthermore, my portrait rights in Beyond are treated as CC0 by him.