Problem:
When I run a new VMWare image provisioning the new VM doesn’t have the disk dimension assigned.
I had set up an image provisioning on VMWare with user-data plugin and cloud-init. Both are running perfectly and the VMs comes up&running w/out problems and configured as requested.
The problem is when I try to assign more disk space during the installation.
I created a VM (and cloned into a Template) with 60GB of disk and during the setup I tried to assign more disk space (eg. 90GB) but when VM is cloned the assigned space into VMWare is the original one, eg 60GB instead of the 90GB requested.
Is the only solution resize the disk from VMWare vCentre and ask cloud-init to resize it?
Thanks!
Expected outcome:
A new VM with the assigned disk space after userdata templates ran
Foreman and Proxy versions:
Foreman 1.19.1
Proxy 1.01
Foreman and Proxy plugin versions:
Userdata: tfm-rubygem-foreman_userdata-0.1.0-1.fm1_19.el7.noarch
Other relevant data:
“guest_id”=>“rhel6_64Guest” --> we’re running vm version 8, the maximum available is RHEL6.
production.log
2019-01-18T11:22:58 [I|app|9a34a] Processing by HostsController#template_used as */*
2019-01-18T11:22:58 [I|app|9a34a] Parameters: {"utf8"=>"✓",
"authenticity_token"=>"e8Q7MZqEHgGH+sBqccmgyNSUAgtEhFmB2SRmcI0LqsOA4vXRzJ9a+===",
"host"=>{"name"=>"test-template", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"5", "compute_profile_id"=>"1",
"content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"2", "content_source_id"=>"1"}, "ansible_role_ids"=>[""],
"config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed",
"interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"test-template",
"domain_id"=>"1", "subnet_id"=>"2", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1",
"virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"network-15067"}},
"new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"",
"ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "execution"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>"",
"compute_attributes"=>{"type"=>"VirtualE1000", "network"=>"network-15108"}}},
"compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"4096",
"firmware"=>"bios", "cluster"=>"MyLocation Cluster 1", "resource_pool"=>"Resources", "path"=>"/Datacenters/MyLocation/vm/Test and Dev",
"guest_id"=>"rhel6_64Guest", "hardware_version"=>"vmx-08", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1",
"scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"ParaVirtualSCSIController\",\"key\":1000}],
\"volumes\":[{\"thin\":true,\"name\":\"Hard **disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":62914560,\"sizeGb\":90,\"datastore\":\"UNITY1 TEST61\"}]}",**
"image_id"=>"502e6b65-b96a-1f7c-3d12-fd510753815b"}, "architecture_id"=>"1", "operatingsystem_id"=>"8", "provision_method"=>"image",
"build"=>"1", "medium_id"=>"11", "ptable_id"=>"139", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]",
"is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"install_media",
"fakepassword"=>"[FILTERED]", "provisioning"=>"image"}
2019-01-18T11:25:18 [I|app|2f737] Parameters: {"utf8"=>"✓", "authenticity_token"=>"e8Q7MZqEHgGH++lPbBsgNxbQUbeuaJRsjPJ3GhIsSctUVmw==", "host"=>{"name"=>"test-template", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"5", "compute_profile_id"=>"1", "content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"2", "content_source_id"=>"1"}, "ansible_role_ids"=>[""], "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"test-template", "domain_id"=>"1", "subnet_id"=>"2", "ip"=>"10.140.16.118", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"network-15067"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"4096", "firmware"=>"bios", "cluster"=>"MyLocation Cluster 1", "resource_pool"=>"Resources", "path"=>"/Datacenters/MyLocation/vm/Test and Dev", "guest_id"=>"rhel6_64Guest", "hardware_version"=>"vmx-08", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"ParaVirtualSCSIController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":62914560,\"sizeGb\":90,\"datastore\":\"UNITY1 TEST61\"}]}", "image_id"=>"502e6b65-b96a-1f7c-3d12-fd510753815b"}, "architecture_id"=>"1", "operatingsystem_id"=>"8", "provision_method"=>"image", "build"=>"1", "medium_id"=>"11", "ptable_id"=>"139", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"install_media"}
2019-01-18T11:25:18 [I|app|2f737] Current user set to admin (admin)
2019-01-18T11:25:19 [I|app|2f737] Rendering UserData template for test-template.mydomain.server
2019-01-18T11:25:19 [I|tem|2f737] Rendering template 'Unnamed'
2019-01-18T11:25:19 [I|blo|2f737] Unattended render of 'Unnamed' = '7ecd357c50567b057f5749d5c50b79e4883ad5e4c950059d33e8cb20c768ec99'
identity:
LinuxPrep:
domain: mydomain.server
hostName: test-template
globalIPSettings:
dnsSuffixList: [mydomain.server]
dnsServerList: [10.170.242.57, 10.140.16.20]
nicSettingMap:
- adapter:
dnsDomain: mydomain.server
dnsServerList: [10.170.242.57, 10.140.16.20]
gateway: [10.140.16.1]
ip: 10.140.16.118
subnetMask: 255.255.255.0
...
2019-01-18T11:25:18 [I|app|2f737] Current user set to admin (admin)
2019-01-18T11:25:19 [I|app|2f737] Rendering UserData template for test-template.mydomain.server
2019-01-18T11:25:19 [I|tem|2f737] Rendering template 'Unnamed'
2019-01-18T11:25:19 [I|blo|2f737] Unattended render of 'Unnamed' = '7ecd357c50567b057f5749d5c50b795e4c950059d33e8cb20c768ec99'
2019-01-18T11:25:19 [I|app|2f737] Revoked old certificates and enabled autosign for UserData
2019-01-18T11:25:19 [I|app|2f737] Adding Compute instance for test-template.mydomain.server
2019-01-18T11:25:36 [I|app|2f737] Powering up Compute instance for test-template.mydomain.server
2019-01-18T11:25:37 [I|app|2f737] Processed 4 tasks from queue 'Host::Managed Main', completed 4/4
2019-01-18T11:25:37 [I|aud|2f737] create event for Nic::Managed with id 346
2019-01-18T11:25:38 [I|aud|2f737] create event for Host::Base with id 287
2019-01-18T11:25:38 [I|aud|2f737] create event for Host::Base with id 260
2019-01-18T11:25:38 [I|app|2f737] Redirected to https://myserver/hosts/test-template.mydomain.server
2019-01-18T11:25:38 [I|app|2f737] Completed 302 Found in 19685ms (ActiveRecord: 228.7ms)