3 Simple Ways to Transfer Files from a VM to a Host

Virtualization has been one of the primary choices for IT departments when it comes to reducing cost and time-to-market. Moreover, virtualization has been playing a crucial role in setting up testing environments.

Most ICT companies nowadays use a testing environment that resembles their production environment. In a testing environment, companies can sort out new configuration settings, deploy new applications, and validate proposed changes before they are adopted in the production environment.

VMware is one of the leading virtualization technology companies. VMware solutions cover workstations, servers, and network virtualization. VMware Workstation is a type-2 hypervisor. Type-2 hypervisors run virtual machines (VMs) over a host OS, which makes type-2 hypervisors handy for setting up testing environments. One of the essential operations that one needs on a daily basis is transferring files from VM to host.

In this post, a testing environment is built to test NAKIVO Backup & Replication by installing this backup and disaster recovery solution on a Windows VM. NAKIVO Backup & Replication configurations can be tested and verified in the testing environment before exporting the configuration file and applying it to the production environment. The following three simple ways to transfer files from a VM to a host are covered:

  1. A USB flash drive
  2. Shared Clipboard
  3. Sharing folder

Exporting the NAKIVO Backup & Replication Configuration File

For the sake of simplicity, a small testing environment is built using the following components:

Simple testing environment based on VMware Workstation Pro

  1. VMware Workstation Pro. There are two editions of VMware Workstation: VMware Workstation Player and VMware Workstation Pro. VMware Workstation Player is the free, non-commercial version, while VMware Workstation Pro is the full-featured hypervisor. Learn more about VMware Workstation editions in this post.
  2. Any Windows OS that is supported for NAKIVO Backup & Replication deployment. Here, I use Windows 10 Pro.
  3. Any Windows OS to represent a workload to be backed up by NAKIVO Backup & Replication. Here I also use Windows 10 Pro OS. Learn more about NAKIVO Backup & Replication supported platforms in this article.
  4. NAKIVO Backup & Replication free trial Windows installer.

To build the testing environment, do the following:

  1. Download and install VMware Workstation Pro evaluation from the VMware site.
  2. Deploy VM1:
    1. Click File > New Virtual Machine. The New Virtual Machine Wizard appears.
    2. Select Typical (recommended). Click Next.
    3. In the Guest Operating System Installation, browse the Windows 10 Pro ISO file and click Next.
    4. Choose Microsoft Windows as the Guest operating system.
    5. Choose Windows 10 x64 from the Version drop-down menu. Click Next.
    6. Type VM1 in the Virtual machine name field. Click Next.
    7. Keep the default value in Specify Disk Capacity.
    8. Click Customize Hardware.
    9. In Memory, set the value to 4096 MB.
      specify the VM memory to 4096 MB
    10. In Network connection, select Host-only. Click Close > Finish.
      Select Host-only Network connection
  3. Repeat Step 2 for VM2.
  4. Right-click each VM. Select Power > Start Up Guest.
  5. To deploy NAKIVO Backup & Replication on VM1, follow the instructions in this post. It takes minutes to install the full solution using the wizard. In this environment, I use the default wizard settings. The default Installation type is the Full Solution.
  6. Open the NAKIVO Backup & Replication web interface with the URL https://machine_IP:4443. When you open the web interface for the first time, you are prompted to create a user account.
  7. Fill out the admin user credentials fields.prompted form to create a user account
  8. On the initial configuration wizard Inventory page, click Add New.initial configuration wizard inventory page
  9. Select Physical and click Next.select physical in the inventory item platform
  10. Fill out the Options form with the VM2 credentials and IP address.Add Inventory Item Options form
  11. The Dashboard opens. Proceed to create a backup job.Create a backup job
  12. Export the system configurations:
    1. Click Settings > General > System Settings > Configuration > Export System Configuration. Export System Configuration window appears.
    2. Click Export. A warning message that all running jobs will be stopped appears.
    3. Click Proceed.
    4. Click Download once the export operation completes.  The configuration file is in the form of a .zip file.

Move the system configuration file from the isolated testing environment to the host. One of the three methods shown next in this post can be used.

Method 1: Transferring a VM File to the Host via a USB Flash Drive

VMware VMs are configured with a USB controller by default. Ensure that a USB controller is present on VM1 and do the following:

A USB controller is present on the VM settings

  1. Make the VMware VM1 window the active window.
  2. Connect the USB stick. VM1 will detect it automatically.
  3. Copy your files to the stick.
  4. Safely eject the USB stick.
  5. Make the VM1 window inactive.
  6. Connect the USB stick. This time, the host will detect it automatically.
  7. Move the files to the host from the USB stick.

This option might seem too basic and requires extra hardware. However, it is the most suitable method for large files. The NAKIVO Backup & Replication configuration file includes inventory, transporter, and jobs settings. They can grow to hundreds of megabytes in large environments.

Method 2: Transferring a VM File to the Host via a Shared Clipboard

This option might not be suitable for large files. However, it is handy to copy text and small files with a simple drag-and-drop or copy and paste. To enable a shared clipboard between a VM and the host, you need to do the following:

  1. Install VMware tools on VM1 by following the instructions in this post.
  2. In VMware Workstation Pro, right-click VM1 and select VM > Settings > Options > Guest Isolation.
  3. Select both the Enable drag and drop and Enable copy paste checkboxes.Select Enable drag and drop and Enable copy and paste checkboxes
  4. Now you can copy the NAKIVO Backup & Replication configuration file from VM1 to the host with a simple drag-and-drop.

Method 3: Transfer a VM file to the host via a VMware sharing folder

Using method 3, a folder is dedicated on the host machine for sharing files with a VM. Do the following to set up a shared folder:

  1. Right-click VM1. Select Settings > Options > Shared Folders > Always enabled.Enable folder sharing for a VM
  2. Click Add in the Folders section. The Add Shared Folder Wizard opens.
  3. Click Next. Specify the Host Path of the shared folder and the share folder Name.
  4. Click Next. Select Enable this share checkbox. Click Finish.
  5. Click OK in the Virtual Machine Settings.
  6. Open File Explorer on VM1. Open Network on the left pane. Open VMware Shared Folders. Move the NAKIVO Backup & Replication configuration file to the VM1 shared folder. The configuration file appears now in the shared folder on the host machine.

After you move the NAKIVO Backup & Replication configuration file to the operation environment using one of the three methods, import the system configuration following the instructions in this article.

Consider NAKIVO Backup & Replication as a leading data protection solution for protecting virtual environments with the support for VMware vSphere using forever-incremental, mage-based and application-aware methods. The solution supports virtual, physical, cloud and SaaS environments with enterprise-grade features.

1 Year of Free Data Protection: NAKIVO Backup & Replication

1 Year of Free Data Protection: NAKIVO Backup & Replication

Deploy in 2 minutes and protect virtual, cloud, physical and SaaS data. Backup, replication, instant recovery options.

People also read