Understanding Hyper-V over SMB 3.0 Through Specific Test Cases Jose Barreto Principal Program Manager Microsoft Corporation
Understanding Hyper-V over SMB 3.0 Through Specific Test Cases Abstract In Windows Server 2012, the new Hyper-V over SMB scenario was introduced, supporting the storage of live VMs on a file share using the SMB 3.0 protocol. In this session, we ll take look closer at this scenario by describing specific test cases you can try yourself with either Windows Server 2012 File Servers or third party implementations of SMB 3.0. These include: Configuring the File Server (Nonclustered, Classic Cluster or Scale-Out Cluster) and the Hyper-V hosts (Nonclustered or clustered). Failing one of multiple NICs while VM is running. Live Migrating and Storage Migrating VMs on an SMB share (in a cluster or Nonclustered). Saving, resuming and snapshotting a VM on an SMB share. Creating a Hyper-V Replica of a VM on an SMB share. Performing planned and unplanned failover of both the File Server cluster nodes and the Hyper-V cluster nodes or File server cluster nodes. Backing up VM using VSS for SMB File Shares. Learning Objectives Describe the main scenarios for configuration of file server clusters and Hyper-V clusters using SMB file shares. Understand the different types of Hyper-V Live Migration and Storage Migration related to SMB file shares. Outline the different types of planned and unplanned failover cases for Hyper-V over SMB and how to provide continuously available SMB storage. 2
Agenda 1) Scenario Overview Hyper-V over SMB Components of the test setup 2) Server Configuration Nonclustered File Server Classic File Server Cluster Scale-Out File Server Cluster Nonclustered Hyper-V Hyper-V Cluster 3) Resource Configuration SMB File Share SMB File Share (Scale-Out Cluster) VM on an SMB Share 4) Hyper-V Operations Save and Resume Hyper-V Snapshot Hyper-V Replica Host-based Backup 5) Storage Migration and Live Migration 6) Networking Storage migration from DAS to SMB Storage migration from SMB to SMB Planned Live migration within a cluster Unplanned Live migration within a cluster Live Migration between nonclustered hosts Live+Storage migration from DAS to SMB Live+Storage migration from SMB to SMB Performance with 1 NIC Performance with 2 NICs Performance with 1 RDMA NIC Performance with 2 RDMA NICs Surviving the loss of 1 of 2 NICs 7) Transparent Failover Planned move (Classic File Server Cluster) Planned move (Scale-Out File Server Cluster) Unplanned move 3
Hyper-V over SMB File Storage for Virtualization What is it? Store Hyper-V files in shares over the SMB 3.0 protocol (include VM configuration, VHD files, snapshots) Works with both standalone and clustered servers (file storage used as cluster shared storage) SQL Server SQL Server SQL Server Highlights Increases flexibility Eases provisioning, management and migration Leverages converged network Reduces CapEx and OpEx IIS VDI Desktop Hyper-V IIS VDI Desktop Hyper-V IIS VDI Desktop Hyper-V Supporting Features SMB Transparent Failover Continuous availability SMB Scale-Out Active/Active file server clusters SMB Direct (SMB over RDMA) - Low latency, low CPU use SMB Multichannel Network throughput and failover SMB Encryption Security VSS for SMB File Shares Backup and restore SMB PowerShell Manageability File Server Shared Storage File Server
Components of the test setup Dom is the name of the Active Directory Domain Dom\HVAdmin is the user that will manage Hyper-V hosts and VMs DC1 DC, DNS 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) FS1 and FS2 are File Servers or File Server cluster nodes RDMA1 FSC, File Server Cluster FS1 File Server FS2 File Server FST FSO NIC 1 FSC is the name of the File Server Cluster (the File Server 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 scaleout application data (Scale-out File Server) RDMA2 HV1 Hyper-V Host HV2 Hyper-V Host HVC, Hyper-V Cluster NIC 2
Components of the test setup 6
2) Server Configuration Nonclustered File Server Classic File Server Cluster Scale-Out File Server Cluster Nonclustered Hyper-V Hyper-V Cluster 7
Configure a Nonclustered File Server Install Windows Server 2012 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 8
Configure a Classic File Server Cluster Install Windows Server 2012 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 9
Configure a Scale-Out File Server Cluster Install Windows Server 2012 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 10
Configure a nonclustered Hyper-V host Install Windows Server 2012 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 11
Configure a Hyper-V Cluster with a File Share Witness Configure two Hyper-V hosts as previously described Add the Failover Clustering role and tools on all Hyper-V hosts Install-WindowsFeature Hyper-V, Hyper-V-PowerShell, Hyper-V-Tools On Hyper-V node, Create Hyper-V Failover Cluster New-Cluster Name FST2-HVC -Node FST2-HV1, FST2-HV2 On File Server, Create Folder and File Share for File Share Witness MD C:\ClusterStorage\Volume1\Witness New-SmbShare -Name Witness -Path C:\ClusterStorage\Volume1\Witness -FullAccess FST2.Test\Administrator, FST2.Test\FST2-HVC$ (Get-SmbShare Witness).PresetPathAcl Set-Acl On Hyper-V node, Configure FST2-HVC Cluster with a File Share Witness Set-ClusterQuorum -NodeAndFileShareMajority \\FST2-SO\Witness 12
3) Resource Configuration SMB File Share SMB File Share (Scale-Out Cluster) VM on an SMB Share 13
Configuring an SMB file share for Hyper-V (Nonclustered or Classic Cluster) Create a folder for storing VM data MD X:\VMS 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$ Set the required file system permissions using the share permissions (Get-SmbShare Name VMS).PresetPathAcl Set-Acl 14
Configuring an SMB file share for Hyper-V (Scale-Out File Server Cluster) Create a folder for storing VM data MD C:\ClusterStorage\Volume1\VMS 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$ Set the required file system permissions using the share permissions (Get-SmbShare Name VMS).PresetPathAcl Set-Acl 15
Creating a new VM on an SMB Share Create a VHDX file on an SMB file share New-VHD -Path \\FST\VMS\VM1.VHDX -Fixed -SizeBytes 20GB Create a VM using the file share New-VM -Path \\FST\VMS -Name VM1 -VHDPath \\FST\VMS\VM1.VHDX -SwitchName External -Memory 1GB 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 Set-VMDvdDrive VM1 -Path \\FST\Library\WS2012.ISO Install any guest OS 16
4) Hyper-V Operations Save and Resume Hyper-V Snapshot Hyper-V Replica Host-based Backup 17
Save and Resume a VM on an SMB share Confirm there is a VM running using an SMB file share Save the VM Save-VM VM1 Confirm the VM is saved Get-VM Resume the VM Start-VM VM1 Confirm the VM is restored 18
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-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-VMSnapShot VM1 19
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 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 20
Host-based backup of a VM using VSS for SMB File Shares Confirm there is a VM running using an SMB file share 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 21
5) Storage Migration and Live Migration Storage migration from DAS to SMB Storage migration from SMB to SMB Planned Live migration within a cluster Unplanned Live migration within a cluster Live Migration between nonclustered hosts Live+Storage migration from DAS to SMB Live+Storage migration from SMB to SMB 22
Storage Migration of VM from DAS to an SMB share Confirm there is a VM running using local storage 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 23
Storage Migration of VM from one SMB share to another Confirm there is a VM running using one file share 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 24
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-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 25
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-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 26
Planned Live Migration between unclustered Hyper-V hosts using an SMB share Confirm there is a VM running (on HV1) 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 27
Live Migration of VM on DAS with Storage Migration to an SMB share Confirm there is a VM running using local storage in HV1 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 28
Live Migration of VM on an SMB share with Storage Migration to another SMB share Confirm there is a VM running on HV1 using one file share in FST 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 29
6) Networking Performance with 1 NIC Performance with 2 NICs Performance with 1 RDMA NIC Performance with 2 RDMA NICs Surviving the loss of 1 of 2 NICs 30
VM storage throughput using different NIC configurations Confirm there is a VM running using an SMB file share, using a single NIC, dual NIC, single RDMA NIC or dual RDMA NICs. 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 (SMB Client Shares counters) 31
Surviving the failure of 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-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-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 32
7) Transparent Failover Planned move (Classic File Server Cluster) Planned move (Scale-Out File Server Cluster) Unplanned move 33
Planned move of File Share between clusters while VM is running (Classic File Server cluster) Confirm there is a VM running using an SMB file share (on the Hyper-V host) 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) 34
Move of Hyper-V host to another 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) 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) 35
Unplanned failover of File Server node while VM is running Confirm there is a VM running using an SMB file share (on the Hyper-V host) 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) 36
Review 1) Scenario Overview Hyper-V over SMB Components of the test setup 2) Server Configuration Nonclustered File Server Classic File Server Cluster Scale-Out File Server Cluster Nonclustered Hyper-V Hyper-V Cluster 3) Resource Configuration SMB File Share SMB File Share (Scale-Out Cluster) VM on an SMB Share 4) Hyper-V Operations Save and Resume Hyper-V Snapshot Hyper-V Replica Host-based Backup 5) Storage Migration and Live Migration 6) Networking Storage migration from DAS to SMB Storage migration from SMB to SMB Planned Live migration within a cluster Unplanned Live migration within a cluster Live Migration between nonclustered hosts Live+Storage migration from DAS to SMB Live+Storage migration from SMB to SMB Performance with 1 NIC Performance with 2 NICs Performance with 1 RDMA NIC Performance with 2 RDMA NICs Surviving the loss of 1 of 2 NICs 7) Transparent Failover Planned move (Classic File Server Cluster) Planned move (Scale-Out File Server Cluster) Unplanned move 37
Resources My blog: http://smb3.info Blog post on Hyper-V over SMB test setup: http://blogs.technet.com/b/josebda/archive/2012/08/24/test-hyper-v-oversmb-configuration-with-windows-server-2012-step-by-step-installation.aspx Blog post on Hyper-V over SMB tests: http://blogs.technet.com/b/josebda/archive/2012/03/06/windows-serverquot-8-quot-beta-test-cases-for-hyper-v-over-smb.aspx Blog post on SMB3 resource reference: http://blogs.technet.com/b/josebda/archive/2012/08/26/updated-links-onwindows-server-2012-file-server-and-smb-3-0.aspx 38
Thanks! 39