Bug #19702


Hammer host create, with vmware compute resource, cant use VMware network names, needs the network ID instead

Added by Daniel Lobato Garcia over 6 years ago. Updated almost 4 years ago.

Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:


Cloned from
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

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

How reproducible:

Steps to Reproduce:
1. try to create a VM using the familiar name

Actual results:
returns an error when using the network name

Expected results:
host would be created using the name not the ID

In the documentation it list two options with regard to vmware hosts (

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

Additional info:

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
-91',domain_id=1,subnet_id=1,ip=" --interface="identifier=eth1,type=Nic::Managed,managed=true,compute_type=VirtualVmxnet3,compute_network='network

Related issues 1 (0 open1 closed)

Related to Hammer CLI - Tracker #26990: Tracker for VMware issuesClosedOleh Fedorenko

Actions #1

Updated by Dominic Cleal over 6 years ago

  • Project changed from Foreman to Hammer CLI

This appears to be a duplicate of #4593, the requirement to use IDs as parameters when creating hosts.

Actions #2

Updated by Oleh Fedorenko over 4 years ago

Actions #3

Updated by yifat makias almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to yifat makias
Actions #4

Updated by The Foreman Bot almost 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request added
Actions #5

Updated by The Foreman Bot almost 4 years ago

  • Fixed in Releases hammer-cli-foreman-0.20.0 added
Actions #6

Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF