Windows Server 2012 Beta - Test cases for Hyper-V over SMB (includes PowerShell examples)

Windows Server 2012 Beta - Test cases for Hyper-V over SMB (includes PowerShell examples)

  • Comments 5
  • Likes

This blog posts lists a few of the common test cases for the new "Hyper-V over SMB" scenario in Windows Server 2012 Beta.

If you are not familiar with this new scenario in Windows Server 2012 Beta, please read the following TechNet articles before proceeding:

All commands shown in this blog post should be run using Windows PowerShell. In these instructions specific server names and user accounts are used consistently:

  • Dom is the name of the Active Directory Domain
  • Dom\HVAdmin is the user that will manage Hyper-V hosts and VMs
  • FS1 and FS2 are File Servers or File Server cluster nodes
  • HV1 and HV2 are Hyper-V hosts or Hyper-V cluster nodes
  • HVC is the name of the Hyper-V cluster itself (the Hyper-V cluster name object) 
  • FST is a File Server cluster for general use (also known as File Server cluster)
  • FSO is a File Server cluster for scale-out application data (also known as scale-out File Server cluster)

Configure a Standalone File Server

  • Install Windows Server 2012 Beta.
  • Add the File and Storage Services role.
    • Install-WindowsFeature File-Services, FS-FileServer
  • Configure the network interfaces. If using SMB Multichannel, make sure two NICs of the same type and speed are configured.
    • Get-NetAdapter
    • Get-SmbServerNetworkInterface

Configure a Failover Cluster with a File Server

  • Install Windows Server 2012 beta on two servers.
  • Add the File and Storage Services role and the Failover Clustering feature to both of them.
    • Install-WindowsFeature File-Services, FS-FileServer, Failover-Clustering
    • Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature
  • Configure the network interfaces. If using SMB Multichannel, make sure two NICs of the same type and speed are configured on different subnets.
    • Get-NetAdapter
    • Get-SmbServerNetworkInterface
  • Form a Windows Failover Cluster using the two servers.
    • New-Cluster –Name FSC -Node FS1, FS2
  • Create a File Server Cluster to host the continuously available SMB 2.2 file share.
    • Add-ClusterFileServerRole -Name FST -Storage “Cluster Disk 1” –StaticAddress 192.168.101.22/24, 192.168.102.22/24

Configure a Failover Cluster with a Scale-Out File Server

  • Install Windows Server 2012 beta on two servers.
  • Add the File and Storage Services role and the Failover Clustering feature to both of them.
    • Install-WindowsFeature File-Services, FS-FileServer, Failover-Clustering
    • Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature
  • Configure the network interfaces. If using SMB Multichannel, make sure two NICs of the same type and speed are configured on different subnets.
    • Get-NetAdapter
    • Get-SmbServerNetworkInterface
  • Form a Windows Failover Cluster using the two servers.
    • New-Cluster –Name FSC -Node FS1, FS2
  • Create a Scale-Out File Server Cluster to host the continuously available SMB 2.2 file share.
    • Add-ClusterSharedVolume “Cluster Disk 2”
    • Add-ClusterScaleOutFileServerRole -Name FSO

Configure a server to run Hyper-V

  • Install Windows Server 2012 beta.
  • Add the Hyper-V role and tools.
    • Install-WindowsFeature Hyper-V, Hyper-V-PowerShell, Hyper-V-Tools
  • Configure the network interfaces. If using SMB Multichannel, make sure two NICs of the same type and speed are configured that are not connected to a VMSwitch.
    • Get-NetAdapter
    • Get-SmbClientNetworkInterface

Configuring a file share for Hyper-V over SMB (standalone server or a File Server cluster)

  • Create a folder for storing VM data
    • MD X:\VMS
  • Set the required file system permissions and remove inheritance
    • ICACLS.EXE X:\VMS --% /Grant Dom\HVAdmin:(CI)(OI)F
    • ICACLS.EXE X:\VMS --% /Grant Dom\HV1$:(CI)(OI)F
    • ICACLS.EXE X:\VMS --% /Grant Dom\HV2$:(CI)(OI)F
    • ICACLS.EXE X:\VMS --% /Grant Dom\HVC$:(CI)(OI)F
    • ICACLS.EXE X:\VMS /Inheritance:R
  • Create an SMB file share with the required permissions
    • New-SmbShare -Name VMS -Path X:\VMS –FullAccess Dom\HVAdmin, Dom\HV1$, Dom\HV2$, Dom\HVC$

Note: If the syntax using "--%" looks strange to you, review my post on using PowerShell to run command line tools.

Configuring a file share for Hyper-V over SMB (Scale-Out File Server cluster)

  • Create a folder for storing VM data
    • MD C:\ClusterStorage\Volume1\VMS
  • Set the required file system permissions and remove inheritance
    • ICACLS.EXE C:\ClusterStorage\Volume1\VMS --% /Grant Dom\HVAdmin:(CI)(OI)F
    • ICACLS.EXE C:\ClusterStorage\Volume1\VMS --% /Grant Dom\HV1$:(CI)(OI)F
    • ICACLS.EXE C:\ClusterStorage\Volume1\VMS --% /Grant Dom\HV2$:(CI)(OI)F
    • ICACLS.EXE C:\ClusterStorage\Volume1\VMS --% /Grant Dom\HVC$:(CI)(OI)F
    • ICACLS.EXE C:\ClusterStorage\Volume1\VMS /Inheritance:R
  • Create an SMB file share with the required permissions
    • New-SmbShare -Name VMS -Path C:\ClusterStorage\Volume1\VMS -FullAccess Dom\HVAdmin, Dom\HV1$, Dom\HV2$, Dom\HVC$

Creating a new VM on an SMB Share

  • Create a VHDX file on an SMB file share
  • Create a VM using the file share
  • Start the VM
    • Start-VM VM1
  • Verify that the connection is established with the right version of the protocol (dialect)
    • Get-SmbConnection
  • Verify that SMB Multichannel is properly using multiple paths
    • Get-SmbMultichannelConnection
  • Attach an ISO file with the Windows Server 2012 image
  • Install Windows Server 2012 as the guest OS.

Failing one of multiple NICs while VM is running

  • With a VM running, confirm that multiple paths are being used
    • Get-VM VM1 | Format-Table Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-SmbConnection
    • Get-SmbMultichannelConnection
  • Start a long-running file copy workload inside guest OS
  • Disable one of the network adapters being used by the connection
    • Disable-NetAdapter –InterfaceAlias Network1
  • After 30 seconds, verify that only the surviving network paths are being used, the VM is running and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State
    • Get-SmbMultichannelConnection
  • Re-enable the network adapter
    • Enable-NetAdapter –InterfaceAlias Network1
  • After 30 seconds, verify that all the network paths are again being used, the VM is running and the workload is not interrupted
    • Get-VM VM1 | FT Name, State
    • Get-SmbMultichannelConnection

Live Storage Migration of VM from DAS to an SMB share

  • Confirm there is a VM running using local storage
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Start a long-running file copy workload inside guest OS
  • Live Storage Migrate the VM to an SMB file share
    • Move-VMStorage –VMName VM1 –DestinationStoragePath \\FST\VMS
  • Confirm there is a VM running using an SMB file share and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path

Live Storage Migration of VM from one SMB share to another

  • Confirm there is a VM running using one file share
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Start a long-running file copy workload inside guest OS
  • Live Storage Migrate the VM to another file share
    • Move-VMStorage –VMName VM1 –DestinationStoragePath \\FSO\VMS
  • Confirm there is a VM running using the other file share and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path

Planned Live Migration within a Hyper-V cluster using an SMB share

  • Confirm there is a VM running in a cluster node using an SMB file share
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-ClusterGroup VM1 | FT Name, OwnerNode, State
  • Start a long-running file copy workload inside guest OS
  • Live Migrate the VM to another node
    • Move-ClusterVirtualMachineRole -Name VM1 -Node HV2 –VmMigrationType Live
  • Confirm there is a VM moved to another cluster node and the workload is not interrupted
    • Get-ClusterGroup VM1 | FT Name, OwnerNode, State

Unplanned failover of Hyper-V cluster using an SMB share

  • Confirm there is a VM running in a cluster node using an SMB file share
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-ClusterGroup VM1 | FT Name, OwnerNode, State
  • Pull the power plug on the Hyper-V cluster node running the VM
  • Confirm that the VM moved to another cluster node
    • Get-ClusterGroup VM1 | FT Name, OwnerNode, State

Planned Live Migration between standalone hosts using an SMB share

  • Confirm there is a VM running (on HV1)
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Start a long-running file copy workload inside guest OS
  • Live Migrate the VM to HV2
    • Move-VM –Name VM1 –DestinationHost HV2
  • Confirm that the VM moved (on HV2) and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State

Live Migration of VM on DAS with Live Storage Migration to an SMB share

  • Confirm there is a VM running using local storage in HV1
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Start a long-running file copy workload inside guest OS
  • Live Virtual Machine Migrate the VM to HV2 and the storage to an SMB file share
    • Move-VM –Name VM1 -DestinationHost HV2 –DestinationStoragePath \\FST\VMS
  • Confirm there is a VM running in HV2 using the file share and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path

Live Migration of VM on an SMB share with Live Storage Migration to another SMB share

  • Confirm there is a VM running on HV1 using one file share in FST
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Start a long-running file copy workload inside guest OS
  • Live Virtual Machine Migrate the VM to HV2 with VM's storage migrated to another file share
    • Move-VM –Name VM1 -DestinationHost HV2 –DestinationStoragePath \\FSO\VMS
  • Confirm there is a VM running in HV2 using the other file share and the workload is not interrupted
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path

Save and Resume a VM on an SMB share

  • Confirm there is a VM running using an SMB file share
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Save the VM
    • Save-VM VM1
  • Confirm the VM is saved
    • Get-VM
  • Resume the VM
    • Start-VM VM1
  • Confirm the VM is restored
    • Get-VM VM1 | FT Name, Path, State

Create a Hyper-V Snapshot for a VM on an SMB share

  • Confirm there is a VM running using an SMB file share with no snapshots
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-VMSnapshot VM1
  • Create a VM snapshot
    • CheckPoint-VM VM1
  • Confirm the VM is snapshotted
    • Get-VMSnapshot VM1
  • Remove the VM snapshot
    • Remove-VMSnapshot VM1
  • Confirm the VM has no snapshots
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-VMSnapShot VM1

Create a Hyper-V Replica of a VM on an SMB share

  • Make sure HV1 and HV2 are two unclustered Hyper-V hosts
  • Configure HV2 as the replica Server
    • Set-VMReplicationServer –ReplicationEnabled $true –ReplicationAllowedFromAnyServer $true –DefaultStorageLocation \\FSO\VMS –AuthType Integrated –IntegratedAuthenticationPort 80
    • New-NetFirewallRule -Name AllowPort1 -DisplayName AllowPort1 -Direction Inbound -Action Allow -Protocol TCP -LocalPort 80
  • Confirm there is a VM running on HV1 using \\FST\VMS
    • Get-VM VM1 | FT Name, Path, ReplicationState
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Create a Hyper-V Replica of the VM on HV2
    • Set-VMReplication VM1 –ReplicaServerName HV2 –ReplicaServerPort 80 –AuthenticationType Integrated
    • Start-VMInitialReplication VM1
  • Confirm the VM is replicating
    • Get-VM VM1 | FT Name, Path, ReplicationState
    • Get-VMReplication VM1

VM storage throughput using single NIC

  • Confirm there is a VM running using an SMB file share, using a single NIC
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-SmbMultichannelConnection
  • Create load on the server for 10 minutes
  • Confirm the throughput of the storage
  • Use Performance Monitor inside the Guest OS (Physical Disk counters)
  • Use Performance Monitor on the Host OS (SMB2 Client Shares counters)

VM storage throughput using dual NICs

  • Confirm there is a VM running using an SMB file share, using dual NICs
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-SmbMultichannelConnection
  • Create load on the server for 10 minutes
  • Confirm the throughput of the storage
  • Use Performance Monitor inside the Guest OS (Physical Disk counters)
  • Use Performance Monitor on the Host OS (SMB2 Client Shares counters)

VM storage throughput using SMB Direct and a single RDMA NIC

  • Confirm there is a VM running using an SMB file share, using a single NIC that is RDMA-capable
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-SmbMultichannelConnection
  • Create load on the server for 10 minutes
  • Confirm the throughput of the storage
  • Use Performance Monitor inside the Guest OS (Physical Disk counters)
  • Use Performance Monitor on the Host OS (SMB2 Client Shares counters)

VM storage throughput using SMB Direct and dual RDMA NICs

  • Confirm there is a VM running using an SMB file share, using dual NICs that are RDMA-capable
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
    • Get-SmbMultichannelConnection
  • Create load on the server for 10 minutes
  • Confirm the throughput of the storage
  • Use Performance Monitor inside the Guest OS (Physical Disk counters)
  • Use Performance Monitor on the Host OS (SMB2 Client Shares counters)

Planned move of File Share between cluster while VM is running (File Server cluster)

  • Confirm there is a VM running using an SMB file share (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Move the file share between nodes (on the File Server cluster)
    • Get-ClusterGroup FST | FT Name, OwnerNode, State
    • Move-ClusterGroup FST
    • Get-ClusterGroup FST | FT Name, OwnerNode, State
  • Confirm there is a VM continues to run uninterrupted (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State

Move of Hyper-V host to a different File Server cluster node while VM is running (Scale-Out File Server cluster)

  • Confirm there is a VM running using an SMB file share (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Move the file share between nodes (on the File Server cluster)
    • Get-SmbSession
    • Get-SmbWitnessClient | FT ClientName, FileServerNodeName, State
    • Move-SmbWitnessClient -ClientName HV1 -DestinationNode FS2
    • Get-SmbWitnessClient | FT ClientName, FileServerNodeName, State
  • Confirm there is a VM continues to run uninterrupted (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path

Unplanned failover of File Server node while VM is running (all File Server types)

  • Confirm there is a VM running using an SMB file share (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Pull the power plug on the File Server cluster node currently in use
  • Confirm there is a VM continues to run uninterrupted (on the Hyper-V host)
    • Get-VM VM1 | FT Name, Path, State

Host-based backup of a VM using VSS for SMB File Shares

  • Confirm there is a VM running using an SMB file share
    • Get-VM VM1 | FT Name, Path, State
    • Get-VMHardDiskDrive VM1 | FT VMName, Path
  • Confirm with VSS that the provider for SMB file shares and the writer for Hyper-V are available
    • VSSADMIN.EXE List Providers
    • VSSADMIN.EXE List Writers
  • Create a VSS backup from the Hyper-V host using a VSS Requester
    • DISKSHADOW.EXE
      • Set Context Persistent
      • Begin Backup
      • Add Volume \\FST\VMS
      • Create
      • End Backup
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • For additional details on creating continuously available storage solutions in Windows Server “8” Beta please see the following whitepaper.

    go.microsoft.com/fwlink

  • Thanks for putting this up.  This was very helpfull.

  • 1) Introduction

    We have covered the basics of SMB Direct and some of the use cases in previous

  • Storage migration is a new feature in Windows 8 Server that allows moving the files for a virtual machine

  • 1. Overview

    1.1. Introduction

    Windows Server 2012 provides Windows PowerShell cmdlets and WMI