Skip to content

PowerShell script to copy a Hyper-V virtual machine to external storage

License

Notifications You must be signed in to change notification settings

paulghill/Hyper-V-VM-ToExternalStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Hyper-V-VM-ToExternalStorage

PowerShell script to copy a Hyper-V virtual machine to external storage

This script is designed to aid in moving a Hyper-V virtual machine to an external drive. It will provide you with a selection of virtual machines that are running in Hyper-v. After your selection, it will shutdown the virtual machine if it is running and copy the virtual machine files to a temporary directory. After this is completed, it will remove the virtual machine from Hyper-V, and copy the virtual machine files back to the original location (just files, not virtual drives).

The second part is scanning the computer for usable storage to copy the virtual machine to. It will look for all usb drives that have capacity greater than the current contents of the virtual machine that is to be moved. If the drive is not NTFS format, it will prompt to format the drive to NFTS to ensure large files can be copied to the device.

This script is designed for a series of tutorials I am planning for home users in building virtual machine routers. It is used to demonstrate that a VM can be moved to external storage and ran from it, providing the virtual machine does not have heavy IO demand for the drive.

About

PowerShell script to copy a Hyper-V virtual machine to external storage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published