Can't select NSX-T networks for VM

Hello!

Is there any information about which stable release of ManageIQ is planned to include the feature:
VMware - lists, select NSX-T opaque networks and assign the selected opaque network to the VM

there is a resolved RFE on this issue:
Bug 1751351 - [RFE] Collect OpaqueNetworks from VMware as Lans and OpaqueSwitches as HostVirtualSwitches
(https://bugzilla.redhat.com/show_bug.cgi?id=1751351)

this doesn’t work in ivanchuk-4
Are there any expectations for the release date of a stable ManageIQ release with this feature?

Best regards

@agrare Do you know?

Hey @vmedvedev you should be seeing the OpaqueNetworks in ivanchuk-4, there was one enhancement to the NSX-t integration that is only in jansa-1-alpha1 right now https://bugzilla.redhat.com/show_bug.cgi?id=1816278

Can you elaborate on what isn’t working currently and possibly try with master?

1 Like

I’m trying to assign NSX-T opaque network when deploying a VM
run VM provision - Compute > Infrastructure > Virtual Machines > VMs

for manageiq-vsphere-ivanchuk-20200509-574e5e2274 and CloudForms 5.0 the same result:
in the VM provision dialog, I can select network(screenshot1)

, but after provision network in disconnected state in vSphere(screenshot2) . If I try to set “Connected” checkbox manually vmware returns an error (screenshot3) . If I select same network manually from the list in vmware GUI, everything works magically.
Looks like during vm provision correct network name is passed to vmware. But vmware doesn’t map it to a real object. Maybe some id is missing?

vmware versions:
nsx-t 2.4.2.0.0.14269501
vsphere 6.7.0

logs:
jansa-1-alpha1 and master-20200509:
Cant get information from VMware Infrastructure Provider, i’m check evm.log:

[----] I, [2020-05-15T22:24:08.030269 #7230:7159a8] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::RefreshWorker::Runner#start_inventory_collector) Started inventory collector
[----] I, [2020-05-15T22:24:08.030516 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Monitor updates thread started
[----] I, [2020-05-15T22:24:08.031596 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#connect) EMS: [rb-vcsa-r1-1], id: [2] Connecting to administrator@vsphere.local@rb-vcsa-r1-1.lab1.local…
[----] I, [2020-05-15T22:24:08.082629 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#connect) EMS: [rb-vcsa-r1-1], id: [2] Connected
[----] I, [2020-05-15T22:24:08.097077 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Refreshing initial inventory
[----] I, [2020-05-15T22:24:08.369726 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#process_update_set) EMS: [rb-vcsa-r1-1], id: [2] Processing 37 updates…
[----] I, [2020-05-15T22:24:08.382792 #7230:5e3d8c0] INFO – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#process_update_set) EMS: [rb-vcsa-r1-1], id: [2] Processing 37 updates…Complete
[----] E, [2020-05-15T22:24:08.391684 #7230:5e3d8c0] ERROR – : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Refresh failed
[----] E, [2020-05-15T22:24:08.391790 #7230:5e3d8c0] ERROR – : [RuntimeError]: Missing parser for OpaqueNetwork Method:[block (2 levels) in class:LogProxy]
[----] E, [2020-05-15T22:24:08.391831 #7230:5e3d8c0] ERROR – : /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/parser.rb:23:in parse' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:193:in block in parse_updates’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:189:in each' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:189:in parse_updates’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:87:in full_refresh' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:63:in vim_collector’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:53:in block in vim_collector_thread' [----] I, [2020-05-15T22:24:11.543815 #6506:a7f9b8] INFO -- : MIQ(MiqServer#heartbeat) Heartbeat [2020-05-15 19:24:11 UTC]... [----] I, [2020-05-15T22:24:11.551635 #6506:a7f9b8] INFO -- : MIQ(MiqServer#heartbeat) Heartbeat [2020-05-15 19:24:11 UTC]...Complete [----] W, [2020-05-15T22:24:18.083732 #7230:7159a8] WARN -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::RefreshWorker::Runner#ensure_inventory_collector) Inventory collector thread not running, restarting... [----] I, [2020-05-15T22:24:18.083935 #7230:7159a8] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Saver#start_thread) Save inventory thread started [----] I, [2020-05-15T22:24:18.084065 #7230:7159a8] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::RefreshWorker::Runner#start_inventory_collector) Started inventory collector [----] I, [2020-05-15T22:24:18.084246 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Monitor updates thread started [----] I, [2020-05-15T22:24:18.084598 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#connect) EMS: [rb-vcsa-r1-1], id: [2] Connecting to administrator@vsphere.local@rb-vcsa-r1-1.lab1.local... [----] I, [2020-05-15T22:24:18.129351 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#connect) EMS: [rb-vcsa-r1-1], id: [2] Connected [----] I, [2020-05-15T22:24:18.139792 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Refreshing initial inventory [----] I, [2020-05-15T22:24:18.454923 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#process_update_set) EMS: [rb-vcsa-r1-1], id: [2] Processing 37 updates... [----] I, [2020-05-15T22:24:18.468584 #7230:7b86134] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#process_update_set) EMS: [rb-vcsa-r1-1], id: [2] Processing 37 updates...Complete [----] E, [2020-05-15T22:24:18.478933 #7230:7b86134] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [rb-vcsa-r1-1], id: [2] Refresh failed [----] E, [2020-05-15T22:24:18.479047 #7230:7b86134] ERROR -- : [RuntimeError]: Missing parser for OpaqueNetwork Method:[block (2 levels) in <class:LogProxy>] [----] E, [2020-05-15T22:24:18.479095 #7230:7b86134] ERROR -- : /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/parser.rb:23:in parse’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:193:in block in parse_updates' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:189:in each’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:189:in parse_updates' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:87:in full_refresh’
/usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:63:in vim_collector' /usr/local/lib/ruby/gems/2.6.0/bundler/gems/manageiq-providers-vmware-3297c729f9cb/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:53:in block in vim_collector_thread’

Thanks for the error, that’s a bug in the parser alias. I’ve opened up an issue https://github.com/ManageIQ/manageiq-providers-vmware/issues/577 to track this and a PR to fix it https://github.com/ManageIQ/manageiq-providers-vmware/issues/577

If you want to try to apply that fix manually it should solve your refresh error on jansa/master.

@vmedvedev can you post the API spec of the NIC after it is provisioned by MIQ and then after you manually set it using the VMware GUI? It looks like something isn’t being set properly by our provisioning code.

You can get this by:

  1. In a rails console find the MOR of the new VM:
vc = ManageIQ::Providers::Vmware::InfraManager.find_by(:name => "your vcenter name")
vm = vc.vms.find_by(:name => "name of your newly provisioned vm")
vm.ems_ref

This should look like vm-123. Take this value and go to the following URL in your browser:
https://YOUR_VCENTER_HOSTNAME/mob/?moid=YOUR_VM_MOR&doPath=config%2ehardware

You’ll see a table like this (click the (more…) link)

Go to the first device of type VirtualVmxnet3 (probably device 4000 if you only have 1 nic) and click on the “backing” link. Please post a screenshot of the backing after we provisioned the VM and then again after you use the vsphere web console to fix it up. This should give us an idea of what we need to set differently.

Thanks!

Actually I suspect you need this PR if you’re trying this on ivanchuk https://github.com/ManageIQ/manageiq-providers-vmware/pull/458

I marked the PR for backport to ivanchuk or you can test it on jansa once you apply that refresh fix.

Hello!
I also work for this problem with @vmedvedev. Here are the API specs

Yeah that’s definitely the issue then, we’re setting it to a standard VM Network instead of an OpaqueNetwork.

That is what https://github.com/ManageIQ/manageiq-providers-vmware/pull/458 implements

I’ve applied this fix https://github.com/ManageIQ/manageiq-providers-vmware/issues/577 to jansa-1-alpha1 (just replace parser.rb) - inventory now works, thanks!

But VM provision fails with error “No arg map for VirtualEthernetCardOpaqueNetworkBackingInfo”

logs:
[----] I, [2020-05-18T22:57:51.718988 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Invoking [builtin] method [/ManageIQ/System/Process/parse_automation_request] with inputs [{}]
[----] I, [2020-05-18T22:57:51.719265 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Request:<vm_provision> Target Component:
[----] I, [2020-05-18T22:57:51.719310 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Target Class: Target Instance:
[----] I, [2020-05-18T22:57:51.719541 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Following Relationship [miqaedb:/infrastructure/VM/Lifecycle/Provisioning#create]
[----] I, [2020-05-18T22:57:51.736207 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Updated namespace [miqaedb:/infrastructure/VM/Lifecycle/Provisioning#create ManageIQ/infrastructure/VM]
[----] I, [2020-05-18T22:57:51.754099 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Following Relationship [miqaedb:/Infrastructure/VM/Provisioning/Profile/EvmGroup-super_administrator#get_state_machine]
[----] I, [2020-05-18T22:57:51.800523 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/Profile/EvmGroup-super_administrator#get_state_machine ManageIQ/Infrastructure/VM/Provisioning]
[----] I, [2020-05-18T22:57:51.827830 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Followed Relationship [miqaedb:/Infrastructure/VM/Provisioning/Profile/EvmGroup-super_administrator#get_state_machine]
[----] I, [2020-05-18T22:57:51.828676 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Following Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/template#create]
[----] I, [2020-05-18T22:57:52.061461 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/template#create ManageIQ/Infrastructure/VM/Provisioning/StateMachines]
[----] I, [2020-05-18T22:57:52.122712 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Processing State=[CheckProvisioned]
[----] I, [2020-05-18T22:57:52.122866 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Following Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create]
[----] I, [2020-05-18T22:57:52.194256 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create ManageIQ/Infrastructure/VM/Provisioning/StateMachines]
[----] I, [2020-05-18T22:57:52.269503 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Updated namespace [Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned ManageIQ/Infrastructure/VM/Provisioning/StateMachines]
[----] I, [2020-05-18T22:57:52.274222 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Invoking [inline] method [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned] with inputs [{}]
[----] I, [2020-05-18T22:57:52.275018 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned]> Starting
[----] I, [2020-05-18T22:57:52.608678 #32155:7950874] INFO – : Q-task_id([r1_miq_provision_1]) ProvisionCheck returned for state and status
[----] E, [2020-05-18T22:57:52.611124 #32155:7950874] ERROR – : Q-task_id([r1_miq_provision_1]) ProvisionCheck error <[RuntimeError]: No arg map for VirtualEthernetCardOpaqueNetworkBackingInfo>
[----] I, [2020-05-18T22:57:52.618764 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned]> Ending
[----] I, [2020-05-18T22:57:52.618928 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Method exited with rc=MIQ_OK
[----] I, [2020-05-18T22:57:52.619208 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Followed Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create]
[----] I, [2020-05-18T22:57:52.619328 #32155:e159b0] INFO – : Q-task_id([r1_miq_provision_1]) Processed State=[CheckProvisioned] with Result=[error]
[----] W, [2020-05-18T22:57:52.619483 #32155:e159b0] WARN – : Q-task_id([r1_miq_provision_1]) Error in State=[CheckProvisioned]

Thanks @zchwer! Looks like we were missing the object definition for the new backing type. I put in https://github.com/ManageIQ/vmware_web_service/pull/77 to fix this.