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:
- A USB flash drive
- Shared Clipboard
- Sharing folder
Exporting the NAKIVO Backup & Replication Configuration File
For the sake of simplicity, a small testing environment is built using the following components:
- 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.
- Any Windows OS that is supported for NAKIVO Backup & Replication deployment. Here, I use Windows 10 Pro.
- 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.
- NAKIVO Backup & Replication free trial Windows installer.
To build the testing environment, do the following:
- Download and install VMware Workstation Pro evaluation from the VMware site.
- Deploy VM1:
- Click File > New Virtual Machine. The New Virtual Machine Wizard appears.
- Select Typical (recommended). Click Next.
- In the Guest Operating System Installation, browse the Windows 10 Pro ISO file and click Next.
- Choose Microsoft Windows as the Guest operating system.
- Choose Windows 10 x64 from the Version drop-down menu. Click Next.
- Type VM1 in the Virtual machine name field. Click Next.
- Keep the default value in Specify Disk Capacity.
- Click Customize Hardware.
- In Memory, set the value to 4096 MB.
- In Network connection, select Host-only. Click Close > Finish.
- Repeat Step 2 for VM2.
- Right-click each VM. Select Power > Start Up Guest.
- 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.
- 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.
- Fill out the admin user credentials fields.
- On the initial configuration wizard Inventory page, click Add New.
- Select Physical and click Next.
- Fill out the Options form with the VM2 credentials and IP address.
- The Dashboard opens. Proceed to create a backup job.
- Export the system configurations:
- Click Settings > General > System Settings > Configuration > Export System Configuration. Export System Configuration window appears.
- Click Export. A warning message that all running jobs will be stopped appears.
- Click Proceed.
- 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:
- Make the VMware VM1 window the active window.
- Connect the USB stick. VM1 will detect it automatically.
- Copy your files to the stick.
- Safely eject the USB stick.
- Make the VM1 window inactive.
- Connect the USB stick. This time, the host will detect it automatically.
- 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:
- Install VMware tools on VM1 by following the instructions in this post.
- In VMware Workstation Pro, right-click VM1 and select VM > Settings > Options > Guest Isolation.
- Select both the Enable drag and drop and Enable copy paste checkboxes.
- 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:
- Right-click VM1. Select Settings > Options > Shared Folders > Always enabled.
- Click Add in the Folders section. The Add Shared Folder Wizard opens.
- Click Next. Specify the Host Path of the shared folder and the share folder Name.
- Click Next. Select Enable this share checkbox. Click Finish.
- Click OK in the Virtual Machine Settings.
- 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.