Copy Files to a Hyper-V VM by Mounting its Virtual Disk File on Your Host Computer

Virtualization is the process of creating virtual versions of computers that run within software on a physical host computer. This allows you to run multiple virtual machines (VMs) with their own operating system and applications on the host computer. And if your host has enough hardware resources, you can run these VMs at the same time.

Copy Files to a Hyper-V VM by Mounting its Virtual Disk File on Your Host Computer

Watch video: Copy Files to a Hyper-V VM by Mounting its Virtual Disk File on Your Host Computer.

Hyper-V is Microsoft’s virtualization platform that comes with their server operating systems as well as the professional version of their Windows desktop operating systems. You can configure Hyper-V on Windows Home editions by following the steps from this video.

When using virtual machines, you will most likely have the need to share files and folders between the VM and the host computer running Hyper-V. You can accomplish this by configuring shared folders and transferring files over the network assuming you have everything configured correctly. Or you can connect to your VM using a Remote Desktop session and attach the host computer to your virtual machine drives that way. Of course, the virtual machine needs to be powered on to use these methods.

One easy way to connect to the drive of a virtual machine is to mount it on your host computer. This makes the virtual drive act as if it were an actual hard drive attached to your computer. Then you will be able to access all the files stored on that virtual machine and copy or manage them as needed.

Mounting a Virtual Disk File to Your Host Computer

The first thing you need to do before you can mount your virtual disk (.vhdx) file to your host computer is find the location of the virtual disk file itself. If you do not know exactly where this disk file is stored, you can simply go to the settings for the virtual machine you want to mount the disk from and then choose the Hard Drive section.

This will show you the path to the virtual disk file as well as its name. Then you can either copy the path from here and paste it into File Explorer (without the disk file name), or just browse to the location manually.

Hyper-V VM Settings

Once you find the virtual disk file, you can select it and then click on the Mount button in the toolbar or right click the file and choose the Mount option. You will need to have the virtual machine powered off before mounting the drive, otherwise you will receive an error.

Copy Files to a Hyper-V VM by Mounting its Virtual Disk File on Your Host Computer

Windows will mount the vhdx file on your computer and assign it a drive letter. You can then click on this new drive letter and view all the files and folders contained within the virtual hard disk. You can then do things such as copy, deleted and move files as well as create new files and folders on the virtual hard disk. Then when you power up the VM, these changes will be reflected on the virtual machine.

Mounted vhdx File

When you are finished with the virtual hard disk, you will need to unmount it before powering on the virtual machine. You can do this by selecting the drive letter assigned to the virtual disk and then clicking on the Eject button in the toolbar within File Explorer or you can right click on the drive letter and choose Eject.

Copy Files to a Hyper-V VM by Mounting its Virtual Disk File on Your Host Computer

As you can see, managing files and folders on a Hyper-V VM virtual disk is an easy process once you learn how to mount the virtual disk file on your host computer.

For additional training resources, check out our online training courses.

Related Posts

© 2024 Online Computer Tips
Website by Anvil Zephyr