How to Transfer Files Between Virtual Machines and PCs on VMware and VirtualBox in 3 Ways

Xiaobai Software  2022-06-05 15: 59  read 126 views

A virtual machine allows you to run a different operating system in an isolated environment.Since virtual machines are inherently isolated, you cannot directly access files on the host.

Copying text or files from the host to the guest, or vice versa, is often a major sticking point for virtual machine users.Although it looks complicated, the actual process of moving files from the virtual machine to the host and back is simple.

Let's look at usingVirtualBoxOrVMwareDifferent methods of transferring files between a virtual machine's guest operating system and the host.

 

How to transfer files from virtual machine to host

A virtual machine is a software environment that simulates the hardware required to install an operating system (OS).Generally speaking, this lets you install an OS on top of an existing OS, just like you would install an application.

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

1. Drag and drop (also known as copy and paste)

2. USB drive

3. Shared folders

Each of these methods is well suited for a specific type of data and intended use.For example, copy and paste is best for sharing text and small files, such as copying code from a browser on the host into a terminal session of the guest operating system.

Below, we'll look at how the Oracle VirtualBoxVMware These three methods are used to share data on virtual machines running on Workstation Player.

1. Drag and drop and share the clipboard

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

Shared Clipboard in VirtualBox

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

 

1. Select your virtual machine, right-click and select Settings.

2. In the pop-up window, click General, and then click the Advanced tab.

3. You should now see the Shared Clipboard and Drag and Drop drop-down options.

You can choose from host to client, client to host, and both.There is also a default option, Disabled, which prevents you from trying to copy files to VirtualBox.

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

How to Copy and Paste Data in VMware

Similar to what VirtualBox does, you can also set up a shared clipboard or enable drag and drop in VMware.But you may need to install the VMware toolkit first, which brings extra functionality.

1. With VMware running, navigate to VM > Install VMware Tools.If you haven't downloaded VMware Tools, instructions will be given to do so.

2. Enable copy and paste in VM > Settings > Options.

3. Select Customer Quarantine.

4. Here, enable copy and paste and enable drag and drop.

5. Confirm with "OK".

Sharing data between the guest and host operating systems in this way is best for smaller files.You can also share text strings, URLs, things like that.But to avoid large files, you have other options.

2. Copy the files from the virtual machine to the USB drive of the local machine

Using a USB stick to transfer data between two physical machines is a time-honored tradition.Although not the best option, a USB stick can transfer files between the host and the virtual machine.Let's see how to share data between the virtual machine and the host using a USB stick.

Transfer files from the host computer to VirtualBox using a USB stick

To be able to access USB devices from within VirtualBox, you need to enable USB access.For this you need to downloadVirtualBox Expansion Pack.

 

 

Once you have downloaded the expansion pack:

1. Plug in the USB device you want to use.

2. Start VirtualBox, click File > Preferences, then Extensions, click +.

3. Browse to the downloaded extension, click Open, and then install when prompted.

4. Follow the prompts to complete the process.Then you can check that USB is enabled in "Settings" > "USB".

5. Right-click the virtual machine you plan to use and select Settings > USB.

6. Click "+" and browse for USB devices, which will be available when you start the virtual machine.Additional drives can be added in the same way.

Then you can use the USB device in VirtualBox for file transfer.

How to transfer files to VMware with a USB stick

In VMware, a USB device is detected when it is connected and the virtual machine is the active window.However, in this case it will not be detected by the host.To do this, remove the drive, minimize the virtual machine, and reconnect.

It's simple, but it can get confusing if you forget which OS the USB stick is connected to.

This option is best if you want to use VMware to copy large files from the virtual machine to the host.Of course, you will be limited by the capacity of the USB device, so keep that in mind.Regardless of the virtual machine software you use, it is recommended to safely eject USB devices on both the host and guest virtual machines.

3. Create a shared folder to transfer files from the host to the virtual machine

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

While all physically on the same computer, this adds a higher capacity to your virtual machine data sharing.

How to transfer files from VirtualBox to host using shared folders

You should have downloaded VirtualBox Guest Additions.This should be installed via Device > Install Client Plugin, where you should browse for the appropriate EXE file.Follow the steps, select the default options, and you're done.

 

Start VirtualBox, then:

1. Open Device > Shared Folders > Shared Folder Settings.

2. Tap +, then in Folder Path, tap the arrow and select Other.

3. Browse to the folder you want to share, and then click Select Folder.

4. In "Add Share", give the share a name that you can use on both operating systems.

5. Check "Automount" and "Permanent", then OK.In the guest operating system, you'll find the share set up in the usual place for a network share.For example, in Windows 10, this will be under Network Locations in Windows Explorer.

Share a network drive in VMware

The process of creating a shared folder on VMware is simple:

1. In VMware Workstation, select your virtual machine and click Player > Manage > Virtual Machine Settings.

2. Tap Options > Shared Folders.Then you can select 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. You can then enter the host path of the directory you want to share and give your folder a name.

5. Once you click Next, you can decide the access permissions for the folder (read-only or enable this share, the latter allows the host and virtual machines full access to the shared folder).

6. Click "Finish" to create your shared folder.

Linux users can view the shared folders under the /mnt/hgfs directory.

While this is the most complicated setup option, you'll be able to share larger files without any hassle.These files may include installers, disk image files, and high-definition videos.

Transfer files between virtual machine and host

Whether you're using VirtualBox or VMware, sharing data between your physical computer and virtual machines is surprisingly easy.

If you are not copying files from the host to the guest OS, there is a reason to copy data from the virtual machine.This is usually when you want to destroy a virtual machine and want to backup your data.

Learning how to share data between virtual machines and the host operating system will help improve your virtual machine usage efficiency.

Address of this article:https://www.kkgcn.com/4536.html
Copyright Notice:The article only represents the author's point of view, the copyright belongs to the original author, welcome to share this article, please keep the source for reprinting!

Comment


expression