Thursday, December 24, 2015

Playing with Windows NVGRE Gateway and System Center VMM

Sample NV Gateway Config:
Management Network - VLAN 101 (native VLAN)
Back-End Network - VLAN 102
Front-End Network - VLAN 814

Issue 1:
After NV Gateway provisioning and front-end/back-end networks connectivity configuration attempt following error detected:

Error (21426)
Execution of Microsoft.SystemCenter.NetworkService::InstallDeviceConnection on the configuration provider 4ee559f1-f479-480c-9458-d14b8b1c1779 failed. Detailed exception: Microsoft.VirtualManager.Utils.CarmineException: Unable to set up Remote Access server to support multi-tenancy mode. (VMM cannot complete the host operation on the hyper-vhost1.dev.contoso.com server because of the error: The operation failed. Failed while applying switch port settings 'Ethernet Switch Port Isolation Settings' on switch '': One or more arguments are invalid (0x80070057). Resolve the host issue and then try the operation again.). Fix the issue in Remote Access server and retry the operation.

Recommended Action
Check the documentation for the configuration provider or contact the publisher support.


Solution:
Need to uncheck "Enable VLAN" 102 for Back-End Network in NVGW VM properties before NV Gateway connectivity configuration. Wizard will setup it for you.



Issue:
After manual attempt to attach Tenant network to "Tenant-1-VM1" following error detected:

Error (15020)
The virtual network adapter Tenant-1-VM1 [MAC: XXXXXXXXXXXX] doesn't have a CA (customer address) assigned from the VMSubnet related IP Pool. 

Recommended Action 
Please assign a CA address from the VMSubnet Address Pool to the virtual network adapter and try again.


Solution:
Make sure you are using "Dynamic IP" VM setting (this problem can occur if you set the IP Address to "Static IP" inside the VM Template as well)


To allocate static IP address from the pool manually, run the following PowerShell commands:

$VM = Get-SCVirtualMachine -Name 'Tenant-1-VM1'
$staticIPPool = Get-SCStaticIPAddressPool -Name '192.168.1.0'
$IP = '192.168.1.10'
Grant-SCIPAddress -GrantToObjectType 'VirtualNetworkAdapter' -GrantToObjectID $VM.VirtualNetworkAdapters[0].ID -StaticIPAddressPool $staticIPPool –IPAddress $IP

Once this IP has been granted from the pool, it can be assigned to the corresponding vNIC using the following command:

Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $VM.VirtualNetworkAdapters[0] -IPv4AddressType static –IPv4Addresses $IP

Issue 3:
After adding Hyper-V cluster (ex. created earlier in DMZ zone) to SCVMM following error and warning detected:

Error (25122)
The specified address ((AllocatedIPAddressData#2d583) { id = 11c8b775-dff5-4e16-a57b-6d5d411e14ac, LastUpdatedTimestamp = 2/27/2016 10:56:57 PM }) is already allocated by the pool (<IPPoolname>). This address should be assigned to only a single entity. 

Recommended Action
Resolve to which entity this address is allocated.

Warning (13926) 
Host cluster <FQDN of Cluster> was not fully refreshed because not all of the nodes could be contacted. Highly available storage and virtual switch information reported for this cluster might be inaccurate.

Recommended Action
Ensure that all the nodes are online and do not have Not Responding status in Virtual Machine Manager. Then refresh the host cluster again.

$ID = "11c8b775-dff5-4e16-a57b-6d5d411e14ac"
$IPPoolName = "IPPoolName"
If (-not (Get-Module virtualmachinemanager)) {
Import-Module virtualmachinemanager }
$IP = Get-SCIPAddress | Where-Object {$_.ID -eq $ID}
$IPPool = Get-SCStaticIPAddressPool -Name $IPPoolName
# Looking up DNS Name based on IP Address
$VMHostClusterName = [System.Net.Dns]::GetHostbyAddress($IP.Name)
$VMHostCluster = Get-SCVMHostCluster -Name $VMHostClusterName.HostName
# Giving the IP Address back to the IP Pool
Get-SCIPAddress -IPAddress $IP | Revoke-SCIPAddress
# Allocating the IP Address to the VM Host Cluster
Grant-SCIPAddress -GrantToObjectType HostCluster -GrantToObjectID $VMHostCluster.ID -IPAddress $IP.Name -StaticIPAddressPool $IPPool -Description $VMHostCluster.Name