How does Hyper-V copy files to virtual hard disks and attach them to virtual machines?
For large files, copying through remote desktop is troublesome. Although simple, the speed is too limited and is not recommended.
In my work, I create a new virtual hard disk (VHD) for copying large files, copy the large files to the virtual hard disk, and attach them to the virtual machine.
This saves time and improves reusability. A virtual hard disk can be used by multiple virtual machines (Note: Only one virtual machine can use this file at a time ).
Create virtual hard disk
- Go to your operating system (such as Windows Server 2008 R2) and open disk management, as shown in:
- Click disk management, create VHD, and select the storage location and Virtual Disk size:
At this time, you can see that a new disk is added to the disk management interface. Note that the disk has not been initialized yet.
- Next, create a simple volume
- After running the wizard, open it and copy the large file. You can see that I have created a 10 Gb hard disk.
- Finally, detach the virtual hard disk
Attach virtual hard disk to Virtual Machine
- Select virtual machine, select Settings, attach the new virtual hard disk under the hard drive, and apply the VM.
- Finally, log on to the virtual machine and check whether the virtual hard disk is attached successfully.
This article permanently updates the link address: