Cannot delete logical network (SCVMM 2012 R2)

Hello Everyone

I just upgraded our vmm environment to VMM 2012 R2.  I am finally getting my mind wrapped around virtual networking in R2 and created some test Logical networks.  Now i want to remove the test networks and assign the new production logical network.  Well now i cannot delete the old logical network because of dependencies.  I have traced them back to no avail.

Here is the setup.

2012 R2 host 

Created logical network

Created definitions for physical networks

Created associated IP pool

Created uplink port profile 

Associated with host.

Now i want to remove the logical network and assign a new one.  Of course when i try to delete it says there are dependent resources particularly the port profile that is assigned to physical nic.  When i go to hardware tab on host it is greyed out and says that i cannot make changes here.  I go to the port profile and try to delete or remove association.  Nothing seems to work.

Any help would be much appreciated.

Thanks

December 4th, 2013 1:36am

Have you deployed logical switches to your hosts? the logical switches should contain both uplink profiles and virtual port profiles that has indeed dependencies to the logical networks. You can right click your logical network and view every dependent resource in order to find out what do delete.

-kn

Free Windows Admin Tool Kit Click here and download it now
December 9th, 2013 10:03am

Have you tried working backwards of what you did above to try and remove all likely dependencies? I've solved many an issue like that. also, when checking the dependencies of the VM Network, (VM Networks > Right-click > View Dependent Resources) does it only show the Port Profile being a dependent?

December 10th, 2013 11:44am

Hi

the guys infront of me, told thats it is imported to remove al dependencies first and thats right. The hard thing is to remove the IP pool if some of the adresses are in use. The only way i fond was a small powershell scripts to remove the reservd adresses.

$ip = get-SCIPAddress

$ip | Revoke-SCIPAddress

regards Thorsten

  

  • Proposed as answer by Enrico Stephan Thursday, May 22, 2014 12:02 PM
Free Windows Admin Tool Kit Click here and download it now
December 11th, 2013 8:06am

Hi

the guys infront of me, told thats it is imported to remove al dependencies first and thats right. The hard thing is to remove the IP pool if some of the adresses are in use. The only way i fond was a small powershell scripts to remove the reservd adresses.

$ip = get-SCIPAddress

$ip | Revoke-SCIPAddress

regards Thorsten

  

  • Proposed as answer by Enrico Stephan Thursday, May 22, 2014 12:02 PM
December 11th, 2013 8:06am

Make sure none of the following are referencing the logical network:

VM template, VM instance, service template or service instance (would reference a VM network that uses the logical network)

VM network

Logical Switch - could contain an uplink port profile containing the logical network

uplink port profile - you can remove logical networks from an uplink port profile even if the uplink port profile is in use by a host.

VM host physical network adapters - check the physical adapter under Host properties->Hardware->"Adapter"->Logical networks.  If you see it checked there, but the panel is disabled then its likely a port profile assigned to the nic.

A port profile can be left assigned to a nic after a failed attempt at creating a logical switch.  Use the following powershell cmdlet to check...

Get-SCVMHostNetworkAdapter | ft -property Name,ConnectionName,VMHost,UplinkPortProfileSet

If you see anything unexpected in the uplinkportprofileset column then you found your culprit.  You can remove it by passing the adapter into this cmdlet:

$pnics = Get-SCVMHostNetworkAdapter | ft -property Name,ConnectionName,VMHost,UplinkPortProfileSet

$pnics[<index of adapter>] | set-scvmhostnetworkadapter -RemoveUplinkPortProfileSet

Greg

Free Windows Admin Tool Kit Click here and download it now
December 19th, 2013 9:00am

Hi

the guys infront of me, told thats it is imported to remove al dependencies first and thats right. The hard thing is to remove the IP pool if some of the adresses are in use. The only way i fond was a small powershell scripts to remove the reservd adresses.

$ip = get-SCIPAddress

$ip | Revoke-SCIPAddress

regards Thorsten

  

I had the same Problem.
The Problem was a Kind of a triangle. every ressource depends on each other an nothing could be deleted.

Logical Network -> Network Site with IP Address Pool which should be used but it wasn't.

Thorsten got it for me. ;)

$ip = get-SCIPAddress

$ip | Revoke-SCIPAddress

May 22nd, 2014 12:05pm

After solving the issue as described above I have another Logical Network which gives me headaches.

I have a logical network with two Network sites but they're both greyed out and I can't remove them.
The only depenent resource i could found, is a Host Group. I don't have a Switch or port or anything else.
If I'm looking at this host group I can see the Logical Network.

How can I get rid of this annoying Logical Network or release the depended resources forcefully?

It happend after I played around and deleted different stuff.

I'm just a starter and make mistakes but it's pretty annoying if you can't start from scratch after all. :(

Addition:

After I tried this script without "whatif":

http://www.miru.ch/how-to-delete-obsolete-logical-networks-in-scvmm-within-seconds/

I got a message:

The external network entity (Storage Network for iSCSI_1) imported from a virtual switch extension manager cannot be deleted.


I had a virtual Switch I already deleted. So I have no glue what does it means to me or the VMM. ;)
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2014 7:25pm

After solving the issue as described above I have another Logical Network which gives me headaches.

I have a logical network with two Network sites but they're both greyed out and I can't remove them.
The only depenent resource i could found, is a Host Group. I don't have a Switch or port or anything else.
If I'm looking at this host group I can see the Logical Network.

How can I get rid of this annoying Logical Network or release the depended resources forcefully?

It happend after I played around and deleted different stuff.

I'm just a starter and make mistakes but it's pretty annoying if you can't start from scratch after all. :(

Addition:

After I tried this script without "whatif":

http://www.miru.ch/how-to-delete-obsolete-logical-networks-in-scvmm-within-seconds/

I got a message:

The external network entity (Storage Network for iSCSI_1) imported from a virtual switch extension manager cannot be deleted.


I had a virtual Switch I already deleted. So I have no glue what does it means to me or the VMM. ;)
May 26th, 2014 7:25pm

Make sure none of the following are referencing the logical network:

VM template, VM instance, service template or service instance (would reference a VM network that uses the logical network)

VM network

Logical Switch - could contain an uplink port profile containing the logical network

uplink port profile - you can remove logical networks from an uplink port profile even if the uplink port profile is in use by a host.

VM host physical network adapters - check the physical adapter under Host properties->Hardware->"Adapter"->Logical networks.  If you see it checked there, but the panel is disabled then its likely a port profile assigned to the nic.

A port profile can be left assigned to a nic after a failed attempt at creating a logical switch.  Use the following powershell cmdlet to check...

Get-SCVMHostNetworkAdapter | ft -property Name,ConnectionName,VMHost,UplinkPortProfileSet

If you see anything unexpected in the uplinkportprofileset column then you found your culprit.  You can remove it by passing the adapter into this cmdlet:

$pnics = Get-SCVMHostNetworkAdapter | ft -property Name,ConnectionName,VMHost,UplinkPortProfileSet

$pnics[<index of adapter>] | set-scvmhostnetworkadapter -RemoveUplinkPortProfileSet

Greg

Free Windows Admin Tool Kit Click here and download it now
June 17th, 2014 9:48pm

Hi Tony,

Looks like there's an error in this line of what I posted:

$pnics = Get-SCVMHostNetworkAdapter | ft -property Name,ConnectionName,VMHost,UplinkPortProfileSet

That line will assign the output of ft to the $pnics variable, when we really want the output from get-scvmhostnetworkadapter in $pnics. 

Below is a corrected example.  In this example I look at the table to find the adapter and find the index that I pass into the remove set-scvmhostnetworkadapter.  In this case if want to clear the 5th item I enter a "4"  for the index.(counting starts at 0)...

PS C:\Users\vmmadmin> $pnics = get-scvmhostnetworkadapter

PS C:\Users\vmmadmin> $pnics | ft Name,ConnectionName,VMHost,UplinkPortProfileSet

Name                          ConnectionName                VMHost                        UplinkPortProfileSet

----                          --------------                ------                        --------------------

Broadcom NetXtreme 57xx Gi... Ethernet 5                    hv-02.contoso.com             Rack 01 - Static Teaming_f...

Intel(R) PRO/1000 GT Deskt... Ethernet 4                    hv-01.contoso.com

Microsoft Network Adapter ... Datacenter Switch             hv-01.contoso.com

Broadcom NetXtreme 57xx Gi... Ethernet                      hv-01.contoso.com

Intel(R) Gigabit CT Deskto... Ethernet 4                    hv-02.contoso.com             Rack 01 - Static Teaming_f...

Intel(R) PRO/1000 PT Dual ... Ethernet 3                    hv-01.contoso.com
Intel(R) PRO/1000 PT Dual ... Ethernet 2                    hv-01.contoso.com

PS C:\Users\vmmadmin> $pnics[4] | Set-SCVMHostNetworkAdapter -RemoveUplinkPortProfileSet

Name                           : Intel(R) Gigabit CT Desktop Adapter

IPAddresses                    : {}

DHCPEnabled                    : True

IPSubnets                      : {}

DefaultIPGateways              : {}

MacAddress                     : 00:19:B9:0C:F9:CE

PhysicalAddress                : 00:19:B9:0C:F9:CE

NetworkLocation                :

VirtualNetwork                 :

NetworkSwitchPort              :

UplinkPortProfileSet           :

VLanTags                       : {}

UsableVLanTags                 : {}

VLanMode                       :

TrunkDesiredVLanMode                :

TrunkVLanEnabled                    :

TrueConnectionState                :

MediaDisconnectedConnectionName                 : Ethernet 4

Description                    :

PrimaryDNSSuffix               :

MaxBandwidth                   : 0

VMHost                         : hv-02.contoso.com

LogicalNetworkMap              : {}

UsableVlanMode                 : Trunk

ModelAccessibleSubnetVLans     : {}

LogicalNetworks                : {}

SubnetVLans                    : {}

UnassignedVLans                : {}

AvailableForPlacement          : True

IsAvailableForHA               : True

UsedForManagement              : False

LogicalNetworkCompliance       : NonCompliant

LogicalNetworkComplianceErrors : {HostNetworkAdapterNoLogicalNetwork (13706)}

BDFLocationInformation         : PCI bus 11, device 0, function 0

NetworkVirtualizationEnabled   : True

ServerConnection               : Microsoft.SystemCenter.VirtualMachineManager.Remoting.Server

ConnectionID                             : 5282343f-df98-4f6d-a1d9-65588469c3e4

IsViewOnly                     : False

ObjectType                     : VMHostNetworkAdapter

MarkedForDeletion              : False

IsFullyCached                  : True

Sorry about the confusion.  I hope this helps!


Greg

June 17th, 2014 10:18pm

Thanks for the rapid reply Greg.

That indeed did the trick :)

Case closed.

Free Windows Admin Tool Kit Click here and download it now
June 17th, 2014 10:51pm

Dears,

I have same issue and when I run this command I get following

Cannot index into a null array.
At line:1 char:1
+ $pnic[10] | Set-SCVMHostNetworkAdapter -RemoveUplinkPortProfileSet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Thanks

Vasim Ahmed

March 29th, 2015 5:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics