Tips & Tricks

How to Copy Files From a Host PC to a VMware or VirtualBox Virtual Machine: 3 Methods

Files can be transferred between a host and a VMware or VirtualBox virtual machine using three methods: drag and drop, USB devices, or shared folders. Drag and drop and shared clipboard are suitable for small files, while USB is effective for large data.

Truyen tai file giua may ao va PC tren VMware VirtualBox

A virtual machine (VM) lets you run a different operating system in an isolated environment. Because of that isolation, you can't directly access files on the host machine from inside the VM. When you use a VMware or VirtualBox virtual machine, copying files back and forth with the physical computer therefore takes a bit of setup.

Moving files between a VM and the host is a common stumbling block for VMware users. It may seem complicated, but transferring files between a VM and the host is much simpler than you might think. The process doesn't require many steps.

How to copy files from a virtual machine to the host

A virtual machine is a software environment that emulates the hardware needed to install an operating system (OS). In other words, it lets you install a new operating system on top of your existing one, much like running an app.

There are several ways to share data between the host and the guest operating system running in the VM, including:

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

Each method suits a particular type of data and use case. For example, copy and paste is the best way to share text and small files, such as copying code from a browser on the host into a terminal in the guest operating system.

Many users don't know how to move files from VirtualBox to the host, or even if they do, they may hesitate to use the feature over security concerns or configuration complexity. Still, there are several ways to copy files in VMware and VirtualBox virtual machines, specifically in Oracle VirtualBox and VMware Workstation Pro.

1. Drag and drop and shared clipboard

The simplest way to copy files between the host and a VMware virtual machine is to use the shared clipboard and drag-and-drop features. They give you a common clipboard, so you can easily copy and paste text, images, and files between the two systems.

This method works best for small files. You can also share text strings, URLs, and similar content. For large files, however, you should use other methods.

How to transfer files from VirtualBox to the host with the shared clipboard option

To set up the shared clipboard and drag and drop in Oracle VirtualBox, follow these simple steps:

Two VirtualBox settings windows, the Advanced tab with the Shared Clipboard and Drag and Drop options

  1. Select the virtual machine you want to configure, right-click it, and choose "Settings".
  2. In the pop-up window, select "General" and switch to the "Advanced" tab.
  3. Here you'll see two drop-down options: "Shared Clipboard" and "Drag'n'Drop".
  4. You can choose to share from host to guest ("Host to Guest"), from guest to host ("Guest to Host"), or in both directions ("Bidirectional"). The "Disabled" option turns off file sharing entirely.

To enable two-way file sharing, choose "Bidirectional" in both drop-down boxes.

How to copy files into VMware Workstation Pro with drag and drop

Like VirtualBox, VMware lets you set up a shared clipboard and turn on drag and drop between the host and a VMware virtual machine. To do this, you may need to install the VMware Tools package, which adds extra functionality to VMware virtual machines.

VMware Virtual Machine Settings window with Enable drag and drop and Enable copy and paste turned on

To install VMware Tools and enable the shared clipboard and drag and drop:

  1. Install VMware Tools: With VMware Workstation Pro running, go to the menu VM > Install VMware Tools. Installation instructions will appear if you haven't downloaded VMware Tools yet.
  2. Enable the shared clipboard and drag and drop:
    • Go to the menu VM > Settings > Options.
    • Select the Guest Isolation tab.
    • Here, check the options Enable copy and paste and Enable drag and drop.
    • Confirm by clicking OK.

Once you've completed these steps, you can easily share the clipboard and drag and drop content between the host and the VMware virtual machine.

2. Copying files into a virtual machine with USB

Using a USB device (such as a portable drive or an SSD) to move data between two physical computers is a traditional method that has been around for a long time. Although it isn't an ideal solution, USB can still be used to transfer files between the host and a virtual machine.

Thanks to its compact size, USB is an effective way to move large files from a physical device into a virtual machine.

How to transfer files to VirtualBox from a USB drive

To use a USB device in VirtualBox, you need to enable USB access. This requires installing the VirtualBox Extension Pack.

The File, Tools, Extension Pack Manager menu in VirtualBox

After downloading the extension pack:

  1. Plug in the USB device you want to use.
  2. Launch VirtualBox.
  3. Go to File > Tools > Extension Pack Manager.
  4. Browse to the downloaded Extension Pack file, click "Open", and confirm the installation when prompted.
  5. Follow the instructions to complete the installation.
  6. Check that USB is enabled under Settings > USB.
  7. Right-click the virtual machine you want to use and choose Settings > USB.
  8. Click the plus sign (+) and browse for the USB device.
  9. Repeat step 8 to add more USB devices.

When you're done, you can use the USB device to copy files into the virtual machine.

How to transfer files to VMware Workstation Pro from a USB drive

VMware Removable Devices menu used to connect a USB drive to the Ubuntu virtual machine

To enable USB and copy files into a VMware virtual machine in VMware Workstation Pro, you can use this simple procedure:

  1. Find the running virtual machine: Locate the virtual machine in the VM library on the left side of the screen.
  2. Connect the USB device: Right-click the virtual machine, then choose "Removable Devices" > "[USB device name]" > "Connect (Disconnect from host)".
  3. Verify the connection: The USB device will be connected to the virtual machine.
  4. Disconnect: To disconnect the USB device from the virtual machine and reconnect it to the host, follow the same procedure.
Share: Facebook X / Twitter Email Pinterest LinkedIn
Question and answer (0 comments)

Your name and comment are shown publicly; your email is not. See Privacy Policy.

Table of contents
  1. How to copy files from a virtual machine to the host
  2. 1. Drag and drop and shared clipboard
  3. How to transfer files from VirtualBox to the host with the shared clipboard option
  4. How to copy files into VMware Workstation Pro with drag and drop
  5. 2. Copying files into a virtual machine with USB
  6. How to transfer files to VirtualBox from a USB drive
  7. How to transfer files to VMware Workstation Pro from a USB drive