How can I access files on my Linux VM?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
DadOfRCA
Posts: 10
Joined: 22. Feb 2021, 12:51

How can I access files on my Linux VM?

Post by DadOfRCA »

Hi,

I'm running VirtualBox on Linux Mint. The VM that I have set up for Nextcloud is running Ubuntu 20.04.2 LTS (Focal Fossa). I'm stuck on how I can access files locally from Linux Mint to the VM?

Any suggestions would be appreciated.

Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How can I access files on my Linux VM?

Post by scottgus1 »

The VM is essentially another PC. So you'd fix this the same way as you'd do it if you had two PCs side-by-side.

Typical solutions for this are a network and shared folders. Virtualbox's Bridged or Host-Only will work for the network, see Virtualbox Networks: In Pictures, and either OS can share its folders for the other to see over the Virtualbox network using that OS's usual methods.

There is a shortcut method, using Virtualbox's Shared Folders, if Guest Additions are installed in the VM. These Virtualbox Shared Folders are designed for manual-drag-n-drop copy of files between the VM and a specific folder chosen on the host OS, through the VM's Shared Folder's settings in Virtualbox. This shortcut does not require a network, but many of the things one can do with a real shared folder, like setting permissions, editing, and databasing, have issues in a Virtualbox Shared Folder.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How can I access files on my Linux VM?

Post by mpack »

Are you asking how to access the innards of a VM filesystem?

Generally you try not to. If a file needs to be accessible to the host then you can locate it on the host, in a host shared folder which the VM can access.

There are tools you can use (not VirtualBox itself0 to decode the guest OS filesystem in a VDI or VHD, but that's a very kludgy solution IMO.
Post Reply