Project

General

Profile

Actions

Bug #30481

open

unable to build VMs on VMware with NSX

Added by Chris Roberts almost 4 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Description of problem:
When building a VM on a VMware compute resource with a NSX logical network we get the following traceback:

Could not find virtual machine network interface matching 000-mindy-smack.example.org

When applying the following patch from upstream:

https://github.com/fog/fog-vsphere/commit/055fb8c7a6679780f3856516c74515580a043231

We get wrong number of arguments (given 2, expected 1)

I did a remote session with the customer and looked in the database and it appears satellite/fog-vsphere is not familiar with NSX networks.

We can see that it finds a network and treats it as a standard portgroup:

interfaces=>[ <Fog::Vsphere::Compute::Interface
mac=nil,
network="network-o2246621",
name="Network adapter",
status=nil,
connected=nil,
summary="VM Network",
type=RbVmomi::VIM::VirtualVmxnet3,
key=nil,
virtualswitch=nil,
server_id=nil
>]

But we should have some additional network parameters for NSX.

When we have a network that is on a distributed switch we see it as the following:

networkname(distributed switch)

This customers network was in there as a standard switch which just shows up as `networkname`

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

Satellite 6.7
vSphere 6.7
NSX v4

How reproducible:

Steps to Reproduce:
1. Install Satellite 6.7
2. Connect vCenter that has NSX installed as compute resource
3. Try to build a VM

Actual results:
Could not find virtual machine network interface matching 000-mindy-smack.example.org

Expected results:

VM to build correctly

Actions #1

Updated by Chris Roberts almost 4 years ago

NSX Network:

:interfaces=>[ <Fog::Vsphere::Compute::Interface
mac=nil,
network="network-o2246621",
name="Network adapter",
status=nil,
connected=nil,
summary="VM Network",
type=RbVmomi::VIM::VirtualVmxnet3,
key=nil,
virtualswitch=nil,
server_id=nil
>]

Distributed Switch Network:

:interfaces=>[ <Fog::Vsphere::Compute::Interface
mac=nil,
network="dvportgroup-610891",
name="Network adapter",
status=nil,
connected=nil,
summary="VM Network",
type=RbVmomi::VIM::VirtualVmxnet3,
key=nil,
virtualswitch="dvSwitch_DC1",
server_id=nil
>]

Actions #2

Updated by Chris Roberts almost 4 years ago

  • Found in Releases 2.0.0 added
Actions #3

Updated by Matthew Gray about 2 years ago

  • Found in Releases 3.2.0 added

I was also experiencing an issue building VMs on NSX networks, though the versions have changed a bit since this issue was created. I was able to make it work

I'm using Foreman 3.2 which uses fog-vsphere 3.5.0

I changed fog-vsphere/lib/fog/vsphere/models/compute/interfaces.rb line 14 ( ref https://github.com/fog/fog-vsphere/blob/master/lib/fog/vsphere/models/compute/interfaces.rb#L14 )
From this:

load service.list_vm_interfaces(server.id)

to this:
load service.list_vm_interfaces(server.id, server.datacenter)

Actions #4

Updated by Chris Roberts about 2 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Chris Roberts)
Actions

Also available in: Atom PDF