Problem:
When cloning a vm in vmware with 2 disks attached i.e. 5GB SWAP and 50GB DATA we put SWAP and DATA on separate datastores however when attempting to do this via Foreman the first datastore is selected and both disks and cloned here. e.g.
- Foreman Virtual machine tab: 10G SWAP on DATA01datastore and 50G DATA on DATA02datastore
- Build
- Build has the two hard disks assigned to DATA01datastore nothing is created on DATA02datastore
It appears that Foreman is taking the first argument for the volumes present on the template; adding new disks to the template works fine and they are assigned to the correct datastore. Preexisting disks are created on the first datastore in the array.
Expected outcome:
A template with 2 disks has the disks created on the correct datastores.
Foreman and Proxy versions:
Foreman Version 1.16.2
Vmware VCenter Server 6.0.0
Other relevant data:
Logs do not indicate any failures
2018-08-02T13:12:31 17be8acd [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"PHpjAbIROl0xlaWJNqeIHt6/IYKdEX+1g2rT/1zZkns6bRi2KG9GMvURnrWvZoGozNIWyYnEO9UaDX37uV/xnQ==", "host"=>{"run_list"=>{"0"=>{"type"=>"role", "name"=>"base"}, "1"=>{"type"=>"recipe", "name"=>"postprovision"}, "2"=>{"type"=>"role", "name"=>"monitoring-client"}}, "override_chef_attributes"=>"true", "name"=>"brad-reekie", "hostgroup_id"=>"4", "compute_resource_id"=>"1", "chef_proxy_id"=>"1", "chef_environment_id"=>"2", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"brad-reekie", "domain_id"=>"2", "subnet_id"=>"5", "ip"=>"##.##.##.##", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualE1000", "network"=>"network-64"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"bios", "cluster"=>"UK 5.1", "resource_pool"=>"1000 Low Performance", "path"=>"/Datacenters/vm", "guest_id"=>"sles12_64Guest", "hardware_version"=>"Default", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"VirtualLsiLogicController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":4194304,\"sizeGb\":40,\"datastore\":\"SYSTEM01\"},{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":52428800,\"sizeGb\":4,\"datastore\":\"DATA03\",\"storagePod\":\"\",\"eagerZero\":false}]}", "image_id"=>"Templates 5/sles12sp3-devops"}, "architecture_id"=>"1", "operatingsystem_id"=>"4", "provision_method"=>"image", "build"=>"1", "pxe_loader"=>"None", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"8-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image", "provider"=>"Vmware", "bare_metal_capabilities"=>"build"}