TIPS & TRICKS

Transferring files between a virtual machine and a PC on VMware / VirtualBox

Truyen Tai File Giua May Ao Va Pc Tren Vmware Virtualbox

A Virtual Machine (VM) allows users to run a different operating system in an isolated environment. Due to the isolated nature of a VM, users cannot directly access files on the host machine.

Copying files from a virtual machine to the host or vice versa is often a challenge for VM users. Although it may seem complicated, moving files from a VM to the host is much simpler than imagined. The process does not require many complex steps.

How to copy files from a virtual machine to the host

A virtual machine is a software environment that simulates the hardware necessary to install an operating system (OS). In other words, it allows you to install a new operating system on an existing operating system, much like an application.

There are many ways to share data between the host and the guest operating system running in the virtual machine, including:

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

Each method is suitable for a specific type of data and purpose. 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 to a terminal in the guest operating system.

Many users do not know how to transfer files from VirtualBox to the host, or even if they do, they might be hesitant to use it due to security concerns or configuration complexity. However, there are several methods to transfer files on virtual machines running on Oracle VirtualBox and VMware Workstation Pro.

1. Drag and Drop and Clipboard Sharing

To transfer files between the host and the virtual machine in the simplest way, you can use the clipboard sharing and drag-and-drop features. This feature allows you to use a shared clipboard, making it easy to copy/paste text, images, and files between the two devices.

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

How to transfer files from Virtualbox to the host using the shared clipboard option

To set up the clipboard sharing and drag-and-drop features in Oracle VirtualBox, you can follow these simple steps:

Truyen Tai File Giua May Ao Va Pc Tren Vmware Virtualbox Features 01

  1. Select the virtual machine you want to configure, right-click, and select “Settings”.
  2. In the pop-up window, select “General” and go to the “Advanced” tab.
  3. Here, you will see two dropdown options: “Shared Clipboard” and “Drag’n’Drop”.
  4. You can choose the sharing mode from host to guest (“Host to Guest”), from guest to host (“Guest to Host”), or bidirectional (“Bidirectional”). Additionally, the “Disabled” option will completely disable the file sharing function.

To enable bidirectional file sharing, select “Bidirectional” in both dropdown boxes.

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

Similar to VirtualBox, VMware also allows you to set up clipboard sharing and enable drag-and-drop between the host and the virtual machine. To do this, you may need to install VMware Tools, which provides additional functions for the virtual machine.

Truyen Tai File Giua May Ao Va Pc Tren Vmware Virtualbox Features 02

To install VMware Tools and activate clipboard and drag-and-drop sharing:

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

After completing the above steps, you will be able to easily share the clipboard and drag and drop content between the host and the virtual machine.

2. Copy files to the virtual machine using a USB

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

Given the compact size of a USB, this is an effective method for transferring large files from a physical device to a virtual machine.

How to transfer files to VirtualBox from a USB

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

Truyen Tai File Giua May Ao Va Pc Tren Vmware Virtualbox Features 03

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 process.
  6. Check if the USB is enabled in Settings > USB.
  7. Right-click on the virtual machine you want to use and select Settings > USB.
  8. Click the plus (+) icon and browse for the USB device.
  9. Repeat step 8 to add additional USB devices.

Once completed, you can use the USB device to copy files into the virtual machine.

How to transfer files to VMware Workstation Pro from a USB

Truyen Tai File Giua May Ao Va Pc Tren Vmware Virtualbox Features 04

To activate a USB on VMware Workstation Pro, you can use the following simple process:

  1. Locate the running virtual machine: Find the virtual machine in the library on the left side of the screen.
  2. Connect USB: Right-click on the virtual machine, then select “Removable Devices” > “[USB Device Name]” > “Connect (Disconnect from host)”.
  3. Check connection: The USB will be connected to the virtual machine.
  4. Disconnect: To disconnect the USB from the virtual machine and reconnect it to the host device, you can follow the same process.
Share: 𝕏 P in
Question and answer (0 comments)

Table of contents
  1. Top