How to create a shared folder in VirtualBox

Sharing folders between VirtualBox hosts and friends is not practically as exhausting as you suppose, and the outcomes of the duty could make your digital machines way more versatile. Jack Wallen reveals you the way.

virtualboxhero.jpg

Picture: Oracle

VirtualBox is a superb software for creating, working, and managing digital machines. It is free, it is versatile, and it is highly effective. If you happen to use this software in your information heart, you would possibly discover the necessity to create a shared folder between a bunch and a visitor. In truth, this can be a stable strategy to share a folder with a number of friends or use it as a strategy to develop the obtainable storage in your digital machines.

Irrespective of how you utilize these shared folders, you need to know how you can create them first. Let me present you the way to take action in VirtualBox 6.1.

SEE: Kubernetes: A cheat sheet (free PDF) (TechRepublic)

What you will want

To make this work, you will want a working occasion of VirtualBox 6.1 and a visitor VM already created. I will be demonstrating with a Fedora visitor and a Pop!_OS host, however the course of must be the identical, regardless of which mixture you utilize. Additionally, you will have to be sure to’ve already put in the Visitor Additions for the visitor VM. To try this, comply with these steps:

  1. Boot the visitor digital machine.
  2. Log in to the visitor and click on Units | Insert Visitor Additions CD Picture.
  3. When prompted, click on Run.
  4. Kind your person password and click on Authenticate.
  5. Enable the set up to finish.
  6. When prompted, hit the Enter key in your keyboard.
  7. Reboot the visitor, so the modifications will take impact.

The right way to outline the shared folder within the visitor

Earlier than we do something with the visitor, we have to both select a folder on the host or create one. Let’s create a folder in /dwelling/USER/ named SHARED (The place USER is similar person who runs VirtualBox). Open a terminal window and problem the command:

mkdir ~/SHARED

With this folder created (or chosen), return to your VM and choose Settings. From the Settings window, choose Shared Folders. Within the ensuing popup (Determine A), click on the Folder Path drop-down and choose Different.

Determine A

vbshareda.jpg

Creating your shared folder in VirtualBox 6.1.

It will open your host’s file supervisor. Navigate to the newly-created (or chosen) folder and choose it. Subsequent, sort a reputation for the brand new share and click on the test field for Auto-mount. Click on OK to save lots of the modifications and OK to dismiss the Settings window.

Create the mount level with the command:

mkdir ~/share

You possibly can identify the mount level no matter you want. In my case, I named it pop_share (because it’s being shared with Pop!_OS). Mount the share with the command:

sudo mount -t vboxsf SHARE ~/share

Once more, change the names SHARE and share to no matter you have named these folders.

Now you can open your file supervisor to see that the contents of the SHARE folder on the host now present up on the share mount level on the visitor. 

The right way to make this everlasting

Sadly, clicking Make Everlasting within the VirtualBox settings for the share does not truly work. To make this share everlasting, you need to add an entry to the fstab file. Open that file on the visitor with:

sudo nano /and many others/fstab

On the backside of that file, add the next line:

SHARED  /dwelling/USER/share  vboxsf  uid=1000,gid=1000 0 0

Ensure the change out SHARED for the identify of the shared folder on the host, USER together with your username on the visitor, and share with the mount level on the visitor.

Save and shut the file. Now, once you reboot the visitor, the share might be routinely mounted.

And that is all there’s to making a shared folder between a VirtualBox host and visitor. This is able to assist make your information heart digital machines extra versatile and usable.

Additionally see

Recent Articles

spot_img

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox