The virtual machines are not affected by the host's patch process, only the shut down portion. Take option 1. There have been some cases when VMs don't shut down or don't start up properly, but do not attempt to solve that problem unless you discover that you have it.
Installing updates on Standalone HyperV hosts while VMs are running
I am planning on migrating from my current ESXi environment to HyperV. I have two standalone servers (Hyperv1 and Hyperv2) with no shared storage, all vms are on the local servers. Hyperv1 has a primary AD/DHCP/DNS VM and Hyperv2 has a secondary AD/DHCP/DNS VM so that these services are still up if either of these servers goes down for maintenance. I don't host any servers that need to be up after hours, so every day I could have them down if needed after 4pm to 6am daily.
I need to know if I can install updates on Hyperv1 host while the vms are running and only save/suspend/shutdown the vms when the Hyperv1 host needs to restart to complete updates, or do I need to shutdown all vms daily before Hyperv1 is scheduled to install updates, even if those updates don't require Hyperv1 to restart after they are done. I need to know if the process of installing updates on the host can cause the hosted vms to lose network connection or cause issues with them, or if Windows will only update things needed for running HyperV vms during the host reboot process.
The way I see it, I have two options below, which I would much prefer to use Option 1, but need to know if it would cause issues.
Option 1 Basically, can I set Hyperv1 to automatically check for and install updates and reboot when needed after hours, and set the VMS to automatically save/suspend on host shutdown and automatically boot on host startup.
Option 2 Set Hyperv1 to check for and download updates daily and only install updates at say 10pm and script the vms to shutdown before the scheduled install time, even if there are no updates to install on the host, and even if the installed updates on the host don't require a restart after being installed.
Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
2 additional answers
Sort by: Most helpful
-
Anonymous
2024-03-12T09:26:20.8533333+00:00 Hi Cheezle,
Thanks for your reply. It is recommended to set up an update (WSUS server) in the VMM fabric and configure update baselines. If you prefer to restart the computers manually after remediation completes, select Do not restart the servers after remediation. By default, the computer restarts if any updates require it. If you choose not to restart and updates need it, the computer status will be Pending Machine Reboot after the remediation. The updates won't be activated until you restart. With this status, VMM won't scan the machines for compliance during refreshes.
Reference: Update Hyper-V hosts and clusters | Microsoft Learn
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.
-
Alex Bykovskyi 2,241 Reputation points
2024-03-13T14:51:21.8033333+00:00 Hey,
As mentioned, yes you can install updates without any issue. You should select "Do not restart the servers after remediation" to reboot Hyper-V server manually.
Since you have 2 Hyper-V hosts, you can consider creating Failover Cluster, which will allow you to avoid downtime for your VMs. StarWind VSAN can be used as a shared storage. VSAN creates replicated storage on top of local, which can be used to create Failover Cluster. https://www.starwindsoftware.com/starwind-virtual-san
You can also configure cluster-aware updating to automate the process.
https://learn.microsoft.com/en-us/windows-server/failover-clustering/cluster-aware-updatingCheers,
Alex Bykovskyi
StarWind Software
Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.