Tag Archive: Hyper-V

Jul 31 2017

PowerShell Function: Copy-VMFolder

Hyper-V in Windows Server 2016 and Windows 10 came with some very cool features that makes interacting with VMs easier than ever. The ability to copy files into a VM directly from host is such a blessing. The Hyper-V Module now includes the cmdlet copy-VMFile which can copy any “File” from the host to a …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2017/07/powershell-function-copy-vmfolder/

Jul 20 2017

Hyper-V Dynamic Port Distribution and f5 Load Balancer

Recently I got involved in a mysterious case. Hyper-V VMs face intermittent issues when communicating with f5 hardware load balancer. Let me first describe the network architecture and symptoms, VMs, load balancer, and load balanced services are in the same VLAN and subnet. The case we are working on is SMTP, so we can test …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2017/07/hyper-v-dynamic-port-distribution-and-f5-load-balancer/

Jun 29 2017

Migrate from NIC Teaming to SET in Windows Server 2016 and VMM

So you just upgraded your Hyper-V hosts to Windows Server 2016 and read about the new Switch Embedded Teaming (SET) switches and how they make life all roses and butterflies. In this post, we will discuss how to migrate from the traditional teaming in previous versions of Windows Server to the amazing SET virtual switch …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2017/06/migrate-from-nic-teaming-to-set-in-windows-server-2016-and-vmm/

Jun 29 2017

Ping all VMs in a Hyper-V Cluster

In a perfect world, everyone trusts that their VMs are working properly if Hyper-V or VMM are reporting that it is in a running state. However, sometimes we need to double check things using the most basic tool, PING! In this post, we will walk through a few PowerShell snippets that do the following, Finds …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2017/06/ping-all-vms-in-a-hyper-v-cluster/

Jun 07 2017

VMM is unable to refresh Hyper-V hosts

Error (2916) VMM is unable to complete the request. The connection to the agent 'srvhv5.example.com' was lost. WinRM: URL: [http://srvhv5.example.com:5985], Verb: [ENUMERATE], Resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/standardcimv2/MSFT_NetAdapter], Filter: [] Unknown error (0x80338126)

I recently had to endure a painful issue with VMM and Hyper-V while working on a VMWare to Hyper-V migration project. First let me tell you about the architecture, 2 Hyper-V clusters made of Lenovo blade servers. Each cluster in its own enclosure. 1 VMM cluster with 2 nodes as VMs. One node on each …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2017/06/vmm-is-unable-to-refresh-hyper-v-hosts/

Nov 13 2015

Using Set-VMNetworkAdapterVlan with clustered VMs

I recently needed to assign VLANs to a group of virtual machines on a Hyper-V cluster, tried to use the Set-VMNetworkAdapterVlan¬† cmdlet directly only to find that it needs the current host of each VM to work, so here’s a small script to get it done. The script select only VMs where no VLAN is …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2015/11/using-set-vmnetworkadaptervlan-with-clustered-vms/

Oct 06 2013

Seriously, how to shrink a VHD!

I have been working lately on a case of over blown dynamic virtual hard disks (VHDs) eating up the space available on a cluster shared volume (CSV). The VHDs where expanded much more than the actual size of the data. So much that one VHD was resting on 136.7 GB of space while the data …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2013/10/seriously-how-to-shrink-a-vhd/