Network label empty after cloning vware vm using image and distributed switch for network
|Assigned To:||Ivan Necas|
|Category:||Compute resources - VMware|
|Target version:||Team Ivan Iteration 7|
|Found in release:||1.5.0||Pull request:||https://github.com/theforeman/foreman/pull/4074, https://github.com/theforeman/foreman/pull/2714|
|Velocity based estimate||-|
Foreman 1.5.0 RC2 (and RC1)
exsi5, Vspere 5.0.0
When creating a vmware vm using image (template) with a distributed switch configured the cloned vm has an inactive network and empty label.
Attached the following screendumps.
New vm with name clonevm.localdomain config, before submit (Nic type: VMXNET3 and Network: DvPortGroup):
Created VM (clonevm.localdomain) with inactive dvPortGroup.
Empty Network Label in edit page of cloned vm:
Available labels for network config of clonevm.localdomain:
Manual Change Network to dvPortGroup(switch2):
Overview with active DvPortGroup:
We can't pass the network id directly to the fog, but it accepts the
virtualswitch parameter, that we can use to point to the right value.
Also, it fixes another issue, where we used the vsphere network id to
match against the interface network value, in case of portgroup, but a
`key` value should be used instead, as the key and id might differ in
#2 Updated by Ronny M over 3 years ago
Hope you can reproduce this.
Because I also have this while creating a host thats not based on an image.
Doesn't mater if I use dvPortGroup or dvSwitch2-DVUplinks-253. (Although not sure if both should be available for selection)
Not sure why but during the 10 test that I did that where about creating a host (not image) I once got the below unexpected error but host was still created.
undefined method `json?' for nil:NilClass
#3 Updated by Ronny M over 3 years ago
Might have to do with host name "new"?
Started GET "/hosts/new.localdomain" for 192.168.88.1 at 2014-04-29 12:19:08 -0700
Processing by HostsController#new as
Operation FAILED: undefined method `json?' for nil:NilClass
Rendered common/500.html.erb (4.0ms)
Completed 500 Internal Server Error in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)
#10 Updated by Ivan Necas about 2 years ago
Does it even make sense to talk about labels for non-distributed port groups?
Ad. the original issue, we've seen this behavior, if some VMs were mistakenly set
to the specific network, but non-distributed ports, the standard network started
being used as the default one.
The solution seems to not group the network interface just but the network name, but
having there also selection for every possible label.