Project

General

Profile

Actions

Bug #6948

closed

vmware clone image custom specific function doesn't update hostname/IP

Added by sri aleti almost 10 years ago. Updated almost 7 years ago.

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

Description

when provisioning host using a vsphere image to clone, its not parsing custom specifications. all it does is cloning the image and not passing hostname or ip details. hence the provisioning fails since hostname did not updated.


Related issues 1 (1 open0 closed)

Is duplicate of Foreman - Feature #6157: Deploy Windows Os from image without SSH provisioning methodNew06/11/2014Actions
Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Subject changed from vmware clone image custom specific funciton is not working to vmware clone image custom specific function doesn't update hostname/IP
  • Category set to Compute resources - VMware

It should work if instead, your image uses DHCP to set its hostname, or you update it using the finish script.

Actions #2

Updated by Andrey Aleksandrov over 9 years ago

Dominic Cleal wrote:

It should work if instead, your image uses DHCP to set its hostname, or you update it using the finish script.

Actually it would be better to modify https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/vmware.rb#L354-L366 to pass customization_spec

Something like this

opts = {
"datacenter" => datacenter,
"template_path" => args[:image_id],
"dest_folder" => args[:path].gsub(path_replace, ''),
"power_on" => false,
"start" => args[:start],
"name" => args[:name],
"numCPUs" => args[:cpus],
"memoryMB" => args[:memory_mb],
"datastore" => args[:volumes].first[:datastore],
"network_label" => args[:interfaces].first[:network],
"network_adapter_device_key" => network_adapter_device_key,
'customization_spec' => {
'domain' => args[:domain],
'ipsettings' => {
'ip' => args[:ip],
'gateway' => args[:gateway],
'subnetMask' => args[subnet],
},
},
}

This code with static data works fine. I think it can be creatad like a checkbox "Apply customization specifications"

Actions #3

Updated by Andrey Aleksandrov over 9 years ago

And this request duplicates #6157

Actions #4

Updated by Anonymous almost 7 years ago

  • Status changed from New to Duplicate
Actions #5

Updated by Anonymous almost 7 years ago

  • Is duplicate of Feature #6157: Deploy Windows Os from image without SSH provisioning method added
Actions

Also available in: Atom PDF