Bug #6948
closedvmware clone image custom specific function doesn't update hostname/IP
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.
Updated by Dominic Cleal almost 11 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.
Updated by Andrey Aleksandrov over 10 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"
Updated by Andrey Aleksandrov over 10 years ago
And this request duplicates #6157
Updated by Anonymous almost 8 years ago
- Is duplicate of Feature #6157: Deploy Windows Os from image without SSH provisioning method added