Project

General

Profile

Actions

Bug #9970

closed

Creating hosts with NICs on vmWare fails with "Unknown Network ID:"

Added by Tomáš Strachota over 9 years ago. Updated over 9 years ago.

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

Description

hammer -d host create --name dn101 --hostgroup-id 7 --compute-resource-id 2 --provision-method image --image-id 5 --enabled true --managed true --environment-id 1 --domain-id 2 --interface "compute_network=SDC1_111" --subnet-id 2 --compute-attributes "cluster=BD_LAB,memory_mb=16384,cpus=4,start=1" --volume "datastore=BDH04_DISK3,name=HDD,size_gb=100" 

Fails with:

Could not create the host:
  Failed to create a compute VC02_BIGD (VMware) instance dn101.pldc1.example.com: Unknown Network ID:

It seems that parameters being sent in the log are correct.

There is suspicious part of the code that raises the exception. The data structures changed a bit since the primary NIC extraction has been merged and it tries to compare missing data. Compute related data has been moved under a key "compute_attributes" in the interface structure. The fix is most likely just adding the "compute_attributes" key.
https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/vmware.rb#L305


Files

hammer.log hammer.log 4.42 KB Tomáš Strachota, 03/31/2015 08:17 AM
production.log production.log 16.7 KB Tomáš Strachota, 03/31/2015 08:17 AM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #9871: Provisioning a new vmware hosts fails with 'Invalid MAC 'Resolved03/23/2015Actions
Related to Hammer CLI - Feature #3849: Add commands for managing interfacesClosedTomáš Strachota12/11/2013Actions
Actions

Also available in: Atom PDF