Project

General

Profile

Actions

Support #9956

closed

Failed to create a compute <Datacenter> (VMWare) instance foo.sub.domain.tld: undefined method `[]' for nil:NilClass

Added by Christian Meißner over 9 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

If we try to create a virtual machine (compute resource vmware) with image based provisioning method we get the error message above. Log is attached but we can't find helpful information there.
The service user which is used to connect to vSphere-Server is attached to role Admin so it can't be a permission problem.

Image is defined as followed:

Name: test
OS: Ubuntu Trusty Thar
Arch: x86_64
User: *
Pass: *

Image path: aaa_Templates/foreman-trusty-image-01


Files

production.log production.log 30.1 KB Christian Meißner, 03/31/2015 01:44 AM
production_1.8.1.log production_1.8.1.log 16.7 KB Anthony Lapenna, 06/26/2015 08:39 AM

Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #5630: VmWare clone from template fails if Network Adator has labels in VmWareClosed05/08/2014Actions
Actions #1

Updated by Christian Meißner over 9 years ago

Environmentinformation:

Ubuntu 14.04

foreman 1.7.3-1
foreman-compute 1.7.3-1
foreman-proxy 1.7.3-1
foreman-sqlite3 1.7.3-1
foreman-vmware 1.7.3-1

Software installed from deb.theforman.org

Actions #2

Updated by Dominic Cleal over 9 years ago

  • Is duplicate of Bug #5630: VmWare clone from template fails if Network Adator has labels in VmWare added
Actions #3

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Feedback

This looks like bug #5630, which is unfortunately still open.

Actions #4

Updated by Anthony Lapenna over 9 years ago

Same issue here in Foreman 1.8.1, joining my production log.

Actions #5

Updated by Anthony Lapenna over 9 years ago

I've been able to patch the issue on my Foreman host by editing the file /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb and by replacing the line 359:

interface = interfaces.detect{|i| i[:name] == "Network adapter 1" }

With:

interface = interfaces.detect{|i| i[:name].end_with?('1') }

Works for me on a French vsphere installation (interface is named 'Adaptateur réseau 1').

Actions #6

Updated by Timo Goebel over 9 years ago

The patch Anthony Lapenna suggested fixed this with a packer build template in German as well.
I could prepare a PR for this. What do you think?

Actions #7

Updated by Dominic Cleal over 9 years ago

Timo, yes, that'd be a help I think. Please use ticket #5630 if you do submit a patch.

The other element that hasn't been fixed and seems to affect some languages is http://projects.theforeman.org/issues/5630#note-4, which I'd expect you to hit with a German instance - the Datacenter name is different.

Actions #8

Updated by Anonymous over 7 years ago

should be resolved by now.

Actions #9

Updated by Anonymous over 7 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF