Satellite 6 VMware template provisioning sets standard port group instead of distributed port group
Environment
- Red Hat Satellite 6.0
- VMware VSphere 5
Issue
- Vmware template provisioning sets standard port group
- When a new RHEL6 server is provisioned in VMware Vsphere 5.1 from a virtual image/template using Satellite 6, then the port type gets set to "Standard Port Group" instead of "Distributed Port Group" and the network label (setting what VLAN to use) is blank.
Resolution
There is no official resolution yet. Red Hat Engineering Team is working on this problem. Should you need assistance, please contact your Red Hat support representative.
For more KB articles/solutions related to Red Hat Satellite 6.x Provisioning Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Provisioning related Issues
Diagnostic Steps
Steps to Reproduce:
- in VMware UI define VMware network infrastructure based on distributed switches.
- in VMware UI create template based on image with attached distributed virtual switches/ports.
- In Sat6 define VMware compute resource and some compute profiles
- Make compute profiles using VMware template defined before
- In satellite6 WebUI go Hosts->New Host.
- Fill all needed parameters.
- Select Deploy on VMware.
- Select Compute Profile
- in Virtual Machine Tab
- in Network select any of defined VLANs/Network Labels (must be queried automatically)
- Click Submit.
Actual results:
New host gets created with network interface attached. Interface is not active and has type Standard Port. There is no label/VLAN assigned
Expected results:
Host gets correct type and label assigned to network interface
Foreman bug lists
- Content from projects.theforeman.org is not included.#7740 Installing from VMware Image breaks distributed Port Group support
- Content from projects.theforeman.org is not included.#5630 VmWare clone from template fails if Network Adator has labels in VmWare
- Content from projects.theforeman.org is not included.#5483 Network label empty after cloning vmware vm using image and distributed switch for network
- none of those bugs have solutions
Workaround
- to comment out a section in /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.21.0/lib/fog/vsphere/requests/compute/vm_clone.rb
# Options['network']
# Build up the config spec
#if ( options.has_key?('network_label') )
# #network_obj = datacenter_obj.networkFolder.find(options['network_label'])
# config_spec_operation = RbVmomi::VIM::VirtualDeviceConfigSpecOperation('edit')
# nic_backing_info = RbVmomi::VIM::VirtualEthernetCardNetworkBackingInfo(:deviceName => options['network_label'])
# #:deviceName => "Network adapter 1",
# #:network => network_obj)
# connectable = RbVmomi::VIM::VirtualDeviceConnectInfo(
# :allowGuestControl => true,
# :connected => true,
# :startConnected => true)
# device = RbVmomi::VIM::VirtualE1000(
# :backing => nic_backing_info,
# :deviceInfo => RbVmomi::VIM::Description(:label => "Network adapter 1", :summary => options['network_label']),
# :key => options['network_adapter_device_key'],
# :connectable => connectable)
# device_spec = RbVmomi::VIM::VirtualDeviceConfigSpec(
# :operation => config_spec_operation,
# :device => device)
# virtual_machine_config_spec.deviceChange = [device_spec]
#end
In the case if there are many VLANs defined in VMware this workaround will require to create VM template per each VLAN definition which might be not acceptable
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.