mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Only specify cluster for clone operations
This commit updates create_vm to target a cluster instead of an individual host for clone operations. Without this change cluster host utilization needs to be inspected for everyone clone operation.
This commit is contained in:
parent
2ffada72b6
commit
cd46eea13e
1 changed files with 2 additions and 2 deletions
|
|
@ -171,12 +171,12 @@ module Vmpooler
|
|||
)
|
||||
|
||||
# Choose a cluster/host to place the new VM on
|
||||
target_host_object = find_least_used_host(target_cluster_name, connection, target_datacenter_name)
|
||||
target_cluster_object = find_cluster(target_cluster_name, connection, target_datacenter_name)
|
||||
|
||||
# Put the VM in the specified folder and resource pool
|
||||
relocate_spec = RbVmomi::VIM.VirtualMachineRelocateSpec(
|
||||
datastore: find_datastore(target_datastore, connection, target_datacenter_name),
|
||||
host: target_host_object,
|
||||
pool: target_cluster_object.resourcePool,
|
||||
diskMoveType: :moveChildMostDiskBacking
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue