Building Microsoft System Center Cloud – SCVMM 2012 R2 – Networking – Set VM Network on the virtual machine


Add VM Network to the VM

  • VM – Properties – Hardware Configuration – Network Adapters – <One of the network adapters>
    • Not using network virtualization (Hyper-V isolation)…
      • Connectivity
        • (o) Connected to a VM Network
          • Select VM Network.
          • Select Logical Switch.
          • Select Port Classification.
    • Using network virtualization (Hyper-V isolation)…
      • Connectivity
        • (o) Connected to a VM Network
          • Select VM Network.
          • Select VM Subnet.
          • Select Logical Switch.
          • Select Port Classification.

Set VM Network and Logical Switch using PowerShell

Not using network virtualization (Hyper-V isolation)…

$scVmmServerItem = Get-SCVMMServer -ComputerName 'contscvmm0c0ms0'

$scVmItem = Get-VM -VMMServer $scVmmServerItem -Name 'NameOfVMtoModify'

$scVmNicItem = Get-SCVirtualNetworkAdapter -VM $scVmItem

$scVmNetworkItem = Get-SCVMNetwork -VMMServer $scVmmServerItem -Name 'VN-Infrastructure'

$scPortClassificationItem = Get-SCPortClassification -VMMServer $scVmmServerItem -Name 'VMs - Medium Bandwidth'

$scLogicalSwitchItem = Get-SCLogicalSwitch -Name 'LS-Infrastructure'

$output = Set-SCVirtualNetworkAdapter `
    -VirtualNetworkAdapter $scVmNicItem `
    -VMNetwork $scVmNetworkItem `
    -VLanEnabled $false `
    -VirtualNetwork $scLogicalSwitchItem.Name `
    -MACAddress '00:00:00:00:00:00' `
    -MACAddressType Static `
    -IPv4AddressType Dynamic `
    -IPv6AddressType Dynamic `
    -PortClassification $PortClassification

Set IP addresses from the IP Pool to the existing VMs

  • That is not possible even when the VM is in the existing cloud. This behavior is by design.
  • The requirement is to deploy VM Template (not just Hardware Profile) in order to be able to get static IP address from the IP Pool.

Leave a Reply

Your email address will not be published. Required fields are marked *

Active Directory Advanced function AlwaysOn Availability Groups AlwaysOn Failover Cluster Instances Building Cloud Cloud Cluster Cmdlet Database Deployment Design DFS Domain Controller DSC Fabric Failover Clustering File Server Group Policy Hardware Profile Host Hyper-V Installation Library Library Asset Library Server Network Operations Manager Orchestrator PowerShell PowerShell User Group PowerShell Workflow Security Service Manager SQL Server Storage System Center Template Time Time Synchronization Tips Virtual Machine Virtual Machine Manager VM Network VM Template Windows Server 2012 R2