0002-Take-just-running-and-suspended-machines-in-free-mem.patch
| im/remotes/vmware.rb | ||
|---|---|---|
| 70 | 70 | |
| 71 | 71 |
vms.info |
| 72 | 72 |
vm_ids_array = |
| 73 |
vms.retrieve_elements("/VM_POOL/VM/HISTORY[HOSTNAME=\"#{@host}\"]/../ID")
|
|
| 73 |
vms.retrieve_elements("/VM_POOL/VM[STATE=3 or STATE=5]/HISTORY[HOSTNAME=\"#{@host}\"]/../ID")
|
|
| 74 | 74 |
if vm_ids_array |
| 75 | 75 |
vm_ids_array.each do |vm_id| |
| 76 | 76 |
vm=OpenNebula::VirtualMachine.new_with_id(vm_id, client) |
| 77 | ||
| 78 | 77 |
vm.info |
| 79 | 78 | |
| 80 | 79 |
used_memory = used_memory + (vm['TEMPLATE/MEMORY'].to_i * 1024) |
| 81 |
- |
|