3 Ways to Transfer Files Between a Virtual Machine and PC on VMware and VirtualBox (2024)

Quick Links

  • How to Copy Files From a VM to a Local Machine

  • Copy Files to the Virtual Machine Using a USB Drive

  • Create a Shared Folder to Transfer Files to the Virtual Machine

Key Takeaways

  • Virtual machines allow you to run a different operating system in isolation, but you can't directly access files on your host PC. However, transferring files between them is straightforward.
  • You can transfer files from a VM to a local machine using methods such as drag-and-drop, USB drives, and shared folders. Each method has its advantages and is suited for different types of data.
  • Whether using VirtualBox or VMware, you can easily transfer files between your host PC and virtual machine. It's important to learn how to do this to effectively use virtual machines and back up your data.

Virtual machines (VM) allow you to run a different operating system in an isolated environment. Since virtual machines, by nature, are isolated, you cannot directly access files on your host PC.

Copying files from a VM to a local machine from the host PC, or vice versa, is often a major sticking point for virtual machine users. While it might seem complicated, if you want to move files from the VM to the host again, you don't need to jump through different hoops, as the process is relatively straightforward.

How to Copy Files From a VM to a Local Machine

A virtual machine is a software environment that emulates the hardware required to install an operating system (OS). Generally, this lets you install an operating system on an existing OS, much like an app.

The options for sharing data between a host PC and guest operating system running in a virtual machine are what you might expect:

  • Drag and drop (also known as copy and paste)
  • USB drive
  • Shared Folder

Each method is ideally suited for a specific type of data and expected use. For example, copying and pasting is best for sharing text and small files, such as copying code from a browser on your host PC into a terminal session in the guest OS.

Many users don't know how to transfer files from VirtualBox to host; even if they do, some don't exercise the option because they feel it's unsafe or a hassle to get configured. However, there are three methods to transfer files on virtual machines running on Oracle VirtualBox and VMware Workstation Pro.

The simplest option to transfer files between your host PC and a virtual machine is to set up a shared clipboard and drag and drop. This will allow you to use a common clipboard, meaning you will be free to copy/paste text/images and files between the virtual machine and your host PC.

This method of sharing data between the guest and host operating systems is best suited for smaller files. You might also share text strings, URLs, and similar things. Steer clear of large files, though you have other options.

If you're using Oracle VirtualBox, then you can set up a Shared Clipboard and Drag'n'Drop in just a few quick steps:

  1. Select your virtual machine, right-click, and select Settings.
  2. In the window that pops up, click on General and then click on the Advanced tab.
  3. You should now see the Shared Clipboard and Drag'n'Drop dropdown options.
  4. You can choose from Host to Guest, Guest to Host, and Bidirectional. There's also the default option, Disabled, which prevents your attempts to copy files to VirtualBox.

Select Bidirectional in both drop-down boxes to enable two-way file sharing.

How to Copy Files to VMware Workstation Pro Using Drag and Drop

Similar to the VirtualBox functionality, you can also set up a shared clipboard or enable drag-and-drop in VMware. You might need to install the VMware Tools package, which brings additional features.

3 Ways to Transfer Files Between a Virtual Machine and PC on VMware and VirtualBox (1)
  1. With VMware Workstation Pro running, navigate to VM > Install VMware Tools. Instructions will be available during installation if you haven't already downloaded VMware Tools.
  2. Enable copy and paste in VM > Settings> Options.
  3. Select Guest Isolation.
  4. Here, Enable copy and paste and Enable drag and drop.

Confirm with OK.

2. Copy Files to the Virtual Machine Using a USB Drive

Using a USB drive (like an external HDD or SSD, or even a USB thumb drive) to transfer data between two physical machines is a time-honored tradition. Although not ideal, a USB stick can transfer files between the host PC and the virtual machine.

Given the potential size of a USB drive, it's a useful way to transfer larger files from a device to your virtual machine.

How to Transfer Files to VirtualBox From a USB Drive

You'll need to enable USB access to USB devices from within VirtualBox. For this, you need to download the VirtualBox Extension Pack.

Once the extension pack downloads:

  1. Insert the USB device you wish to use.
  2. Launch VirtualBox. Head to File> Tools > Extension Pack Manager
  3. Browse to the downloaded Extension Pack, click Open, then when prompted, Install.
  4. Follow the prompts to complete the process. You can then check to confirm USB is enabled in Settings > USB.
  5. Right-click the VM you plan to use and select Settings > USB.
  6. Click +, then browse for the USB device, which will be available when you launch the VM. Additional drives can be added in the same way.

You can then use the USB device to copy files to VirtualBox.

How to Transfer Files to VMware Workstation Pro From a USB Drive

3 Ways to Transfer Files Between a Virtual Machine and PC on VMware and VirtualBox (2)

It's a simpler process to enable a USB drive on VMWare Workstation Pro.

  1. Locate your active virtual machine in the virtual machine library, found on the left of screen.
  2. Right-click the virtual machine, then head to Removable Devices > [USB Device Name] > Connect (Disconnect from host)

The USB drive will now be available in your virtual machine. Follow the same process to disconnect the USB stick from your virtual machine and reconnect to the host device.

Your third option for copying files from the host to the guest PC is to set up a network share. This means designating a portion of your PC's hard disk drive as accessible over the local network. With this setup, the VM can connect to the network and access the drive.

Although physically on the same computer, this increases your virtual machine data-sharing capacity.

You should have already downloaded VirtualBox Guest Additions. This should be installed via Devices > Install Guest Additions, where you should browse for the appropriate file. Follow the steps to the end, choosing the default options, then Finish.

  1. Launch VirtualBox, then right-click the virtual machine and open Settings.
  2. Head to Shared Folders, then select the green + icon.
  3. Select Folder Path > Other, then browse the folder you want to share with the virtual machine.
  4. Now, select Auto-mount, and press OK.

Leave the Read-only option unchecked unless you're only pulling files from the folder.

If you can't transfer files between VirtualBox and the host PC, you can consider a few notable virtual machine options that are close alternatives to Oracle's VirtualBox.

The process of creating a shared folder on VMware Workstation Pro is straightforward:

  1. Within VMware Workstation Pro, select your virtual machine, then Edit virtual machine settings.
  2. Click on Options > Shared Folders. You can then choose a sharing option under Folder Sharing.
  3. Click Add to set up your shared folder and follow the on-screen instructions in the Add Shared Folder Wizard.
  4. In the Host path field, type or browse to the directory you want to share and name your folder.
  5. Once you click Next, you decide on the folder access (Read-only or Enable this share, the latter allows both host and the virtual machine complete access to the shared folder).
  6. Click on Finish to create your shared folder.

Linux users can view the shared folder under the /mnt/hgfs directory. While this is the most complicated option to set up, you can share larger files effortlessly. These might include installers, disk image files, and hi-res videos.

Whether using VirtualBox or VMware, sharing data between your physical PC and a virtual machine is surprisingly simple, and there are several ways to get the job done

  • Technology Explained
  • Virtual Machine
  • VirtualBox

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

Manage Your List



Follow with Notifications



Readers like you help support MakeUseOf. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

3 Ways to Transfer Files Between a Virtual Machine and PC on VMware and VirtualBox (2024)


Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 5895

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.