Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1400583 - [RFE] VM Networks incorrectly discovered in SCVMM provider
Summary: [RFE] VM Networks incorrectly discovered in SCVMM provider
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Adam Grare
QA Contact: Dave Johnson
Whiteboard: scvmm:inventory
Depends On:
Blocks: 1511151
TreeView+ depends on / blocked
Reported: 2016-12-01 14:33 UTC by ncatling
Modified: 2018-06-21 21:12 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1511151 (view as bug list)
Last Closed: 2018-06-21 21:12:25 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:

Attachments (Terms of Use)
service dialog export (deleted)
2017-08-29 20:12 UTC, Daniel Berger
no flags Details
automate domain export (deleted)
2017-08-29 20:13 UTC, Daniel Berger
no flags Details
scvmm automate domain (deleted)
2017-08-29 20:18 UTC, Tina Fitzgerald
no flags Details

Description ncatling 2016-12-01 14:33:06 UTC
Description of problem:

SCVMM provider discovery process captures 'Logical Networks', where as 'VM Networks' with associated VLAN are required for VM provisioning.

The 'Logical Networks' and not the 'VM Networks', are displayed in the provisioning dialogues.

Post provisioning, it is possible to run this PowerShell snippet to properly configure the VM's network.

  $VirtualNetworkAdapter = Get-SCVirtualNetworkAdapter -Name '#{}' -ID (Get-SCVirtualMachine -Name '#{}' | Get-SCVirtualNetworkAdapter).id
  $VMNetwork = Get-SCVMNetwork -VMMServer localhost -Name '#{vm_network}'
  $VMSubnet = Get-SCVMSubnet -VMMServer localhost -Name '#{vm_subnet}'
  Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $VirtualNetworkAdapter -VMNetwork $VMNetwork -VMSubnet $VMSubnet -VirtualNetwork 'My Logical Switch' -MACAddress #{mac_address} | Out-Null

Version-Release number of selected component (if applicable):

SCVMM 2012 R2 and 2016

How reproducible:

Steps to Reproduce:
1. Add provider
2. Lifecycle > Provision, select template
3. View network tab for discovered networks

Actual results:

Expected results:

Additional info:

Comment 5 Jeff Teehan 2017-01-19 16:25:32 UTC
When I compared provisioning directly from SCVMM template, versus provisioning from CFME, is see the exact same list for Virtual Networks.  But when I select a host or cluster from SCVMM and choose Show Networking, the same values are under logical networks.  So SCVMM seems to be using the same values interchangeably.  I'm going to need a bit more time to research why this happens.

Comment 6 Jeff Teehan 2017-01-19 19:12:31 UTC
Yep, it's showing the logical switch name all right.  I renamed my entire network to make sure the names were unique and identifiable.  Otherwise, the default is the give the logical and virtual values the same name, which is the likely source of confusion.  It's definitely not something that stands out.

In, this line:

  $vmnet = Get-SCVirtualNetworkAdapter -VM $_ | Select-Object VMNetwork

returns the logical network name

Changing that to

  $vmnet = Get-SCVirtualNetworkAdapter -VM $_ | Select-Object VirtualNetwork

Returns the virtual network name.

Replace $_ with SCVMM2016 on our SCVMM environment to see the difference.

That should get you started.

Comment 7 Daniel Berger 2017-01-24 14:17:29 UTC
Jeff, thanks for that. However, we'll also have to make some backend parsing changes because the XML it generates is different.

Comment 9 Daniel Berger 2017-02-27 16:05:53 UTC
I've been looking into it, and hope to have a solution ready this week.

Comment 10 Daniel Berger 2017-02-27 19:39:32 UTC
Upon further review with Jeff Teehan, we aren't sure that this is a bug. I will let Jeff comment.

Comment 11 Jeff Teehan 2017-02-27 20:09:58 UTC
I don't see a way to fix this without breaking the entire installed base.  The problem is, you don't have to have an SCVMM VM Network to use SCVMM.  It defaults to creating the Logical Networks by picking up the Virtual Switches based on the hosts networking as they are added.  If we only list the SCVMM VM Networks, and the customer hasn't configured SCVMM that way, what would we do then?

To date, we've just relied on the Logical Network, which is the primary building block use to model physical network infrastructure and connectivity.  And using this model, we've (I) have deployed 1000s of VMs without issue.

The bottom line from my point of view is that we can't just change the value (it would take one minute to do it) and swap one set of problems for another.  A hybrid solution would have to be architected to take into account all of the combinations.


Add a customization tab like vSphere has and push the above powershell script.

Anyway, that's what I'm seeing from my console.

Comment 12 Jeff Teehan 2017-02-27 20:53:10 UTC
I should also point out that if you go to SCVMM, right click on a template, select Create Virtual Machine.  Under select network, the only choice is for a VM Network and you see the exact same list as the one we display.

Comment 20 Daniel Berger 2017-08-01 20:07:40 UTC
Does "Get-SCVMNetwork | select name" return the list of networks that you expect to see?

Comment 30 Daniel Berger 2017-08-29 20:12:29 UTC
Created attachment 1319778 [details]
service dialog export

Comment 31 Daniel Berger 2017-08-29 20:13:16 UTC
Created attachment 1319779 [details]
automate domain export

Comment 32 Daniel Berger 2017-08-29 20:17:48 UTC
Our solution for 4.5 is to provide service dialogs via automate that the users can apply for post-provisioning. Once imported, a series of dynamic drop-down menus will be selectable for logical network, vm network and vm subnet. These are all backed by powershell, as is the actual post-provisioning process, which the customer can tweak if desired.

I've attached the necessary files, and Tina F. will provide additional instructions.

Comment 33 Tina Fitzgerald 2017-08-29 20:18:07 UTC
Created attachment 1319780 [details]
scvmm automate domain

Comment 34 Tina Fitzgerald 2017-08-29 20:47:24 UTC
We created a new Automate domain that contains all of the Automate changes necessary to properly apply network changes in VM post provisioning.

For Testing purposes:
1. Import the attached scvmm Automate domain(comment 33). (Make sure domain is enabled is the highest enabled domain)
2. Import Service dialog(comment 30)
3. Create a Service Catalog item, specifying the dialog imported in step 2.
4. Order Service and validate network settings.

Applying the changes to the customer environment will require integrating our changes into their existing Service dialogs/Automate model.

Will discuss in more detail once testing is complete.

Note You need to log in before you can comment on or make changes to this bug.