For those coming from the VMware world of doing things and wanting to get their feet wet with Hyper-V, one of the nagging little things that you might run into when first trying to deploy a VM with Hyper-V is – how do you copy ISO file to Windows Server 2016 Hyper-V? Let’s take a look with a standalone Windows Server 2016 Hyper-V host how to copy our ISO to the server for using in VM deployment.
Copy ISO file to Windows Server 2016 Hyper-V
Even with remote monitoring enabled in Hyper-V there is often many firewall rules that need to be enabled to do certain things connecting back to the Hyper-V server. When you install the Hyper-V 2016 server which is free, it is basically Server Core with the Hyper-V role already installed. Also, when you install Windows Server 2016 Server without the GUI, this is also Server Core. So, we need to enable the firewall rules from the commandline to be able to copy over a file to the Hyper-V host. The command below adds the exception in the advanced firewall rules for the Hyper-V host.
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
Below is the process I used to create a simple folder on an attached storage volume, then enabled the firewall rule.
Now, we can use a management workstation to copy an ISO file over to the D:ISOs folder we just created by simply mapping a drive to the D$ admin share.
If you want to then disable the firewall rule, the process is the same – change the yes to no on the enable rule.
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=No
When we create our Hyper-V VM guest, we can select the ISO image from the Hyper-V host local folder we created and uploaded the ISO image file to.
The process to Copy ISO file to Windows Server 2016 Hyper-V server is a little more involved than in VMware ESXi server when you are copying the ISO to a standalone Hyper-V host. However, with the firewall exception and a management workstation, this task is easily accomplished.