How to transfer files between virtual machines and PCs on VMware and VirtualBox

Copying files from virtual machine to local machine from host PC or vice versa is often the main problem for virtual machine users.

Virtual machines (VMs) allow running another operating system in an isolated environment. Because virtual machines are isolated by nature, you cannot directly access files on your host PC.

Although this may seem complicated, if you want to move files back from the VM to the server, you don't need to go through many different steps because the process is relatively simple.

How to copy files from virtual machine to local machine

A virtual machine is a software environment that simulates the hardware needed to install an operating system (OS). In general, this allows you to install a new operating system on top of an existing operating system, just like an application.

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

  1. Drag and drop (also known as copy and paste)
  2. USB
  3. Shared folder

Each method is ideally suited for a specific data type and intended use. For example, copy and paste is the best way to share text and small files, such as copying code from the browser on the host PC to the terminal session in the guest operating system.

Many users don't know how to transfer files from VirtualBox to the server; Even if they do, some people don't take this option because they feel it's unsafe or a hassle to configure. However, there are several methods to transfer files on virtual machines running on Oracle VirtualBox and VMware Workstation Pro.

1. Drag and drop and share Clipboard

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

This method of sharing data between the guest operating system and the host is best suited for smaller files. You can also share text strings, URLs, and the like. Stay away from large files, although you have other options.

How to transfer files from Virtualbox to server using shared clipboard option

If you're using Oracle VirtualBox, you can set up a shared clipboard and drag and drop in just a few quick steps:

How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 1How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 1 How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 2How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 2

  1. Select the virtual machine, right-click and select Settings .
  2. In the pop-up window, click General and then select the Advanced tab .
  3. You will now see the Shared Clipboard and Drag'n'Drop drop-down options .
  4. You can choose from Host to Guest, Guest to Host and Bidirectional . There is also a default option, Disabled , that prevents attempts to copy files to VirtualBox.

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

How to copy files to VMware Workstation Pro by dragging and dropping

Similar to VirtualBox functionality, you can also set up shared clipboards or enable drag and drop in VMware. You may need to install the VMware Tools package, which provides additional features.

How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 3How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 3

  1. With VMware Workstation Pro running, navigate to VM > Install VMware Tools . Instructions will be available during the installation process if you have not downloaded VMware Tools.
  2. Enable copy and paste in VM > Settings > Options .
  3. Select Guest Isolation .
  4. Here, select Enable copy and paste and Enable drag and drop .
  5. Confirm with OK .

2. Copy files to the virtual machine using USB

Using USB (like an external hard drive or SSD) to transfer data between two physical machines is a long-standing tradition. Although not ideal, USB can transfer files between the host PC and the virtual machine.

Given the compact size of USB, this is a useful way to transfer larger files from device to virtual machine.

How to transfer files to VirtualBox from USB

You will need to enable USB access to USB devices from within VirtualBox. To do this, you need to download the VirtualBox Extension Pack.

After downloading the extension pack:

How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 4How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 4 How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 5How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 5 How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 6How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 6

  1. Plug in the USB device you want to use.
  2. Launch VirtualBox. Go to File > Tools > Extension Pack Manager.
  3. Browse to the downloaded Extension Pack, click Open , then when prompted, click Install .
  4. Follow the prompts to complete the process. You can then check to confirm USB is enabled in Settings > USB .
  5. Right-click on the VM you intend to use and select Settings > USB .
  6. Click + , then browse for USB devices that will be available when launching 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 USB

How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 7How to transfer files between virtual machines and PCs on VMware and VirtualBox Picture 7

Here is a simpler process to enable USB on VMWare Workstation Pro.

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

The USB will now be available in the virtual machine. Follow the same procedure to disconnect the USB from the virtual machine and reconnect it to the host device.

4 ★ | 1 Vote