Hammer host create, with vmware compute resource, cant use VMware network names, needs the network ID instead
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1456579
Description of problem:
When trying to use hammer to create a host with the vmware compute resource, you cant use the familiar network names that people are used to - such as v5-server-admin, instead you need to find the network id such as network-91
Hammer gives us no way to find these IDs, the VMware console, so far as I could find, doesnt display them either
You need to either a) write an API script to list them or b) use the web UI which, during creation only, displays the network names and then reverts to using the network id also (see bug https://bugzilla.redhat.com/show_bug.cgi?id=1456457)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. try to create a VM using the familiar name
returns an error when using the network name
host would be created using the name not the ID
In the documentation it list two options with regard to vmware hosts (https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html/hammer_cli_guide/chap-cli_guide-managing_hosts#sect-CLI_Guide-Creating_a_Host)
Specific to hosts provisioned on VMware
compute_type | Type of the network adapter, depends on your version of vSphere.
compute_network | Network ID form VMware.
It would be great if we could add a third
compute_network_name | Network Name from VMWare
Failing that, if there was a command we could use to list the network names and their corresponding network IDs, that would be great
Example command using the compute_network
hammer host create --name tmi-adrian-p1 --hostgroup-id 19 --compute-resource "VMware DC1" --compute-profile Standard-Test --organization 'TLG' --location P1 --root-password 'redhat01' --interface="identifier=eth0,type=Nic::Managed,managed=true,compute_type=VirtualVmxnet3,compute_network='network
Updated by Anonymous almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset hammer-cli-foreman|9b890507511cda4a777187a66e6c4f1d543e2f3e.