From 6fb7161aaaec18800b7ece69d44851db696556b0 Mon Sep 17 00:00:00 2001 From: LoveIsGrief Date: Sun, 10 Jan 2016 20:40:58 +0100 Subject: [PATCH] Get real number of slots for VM Before it was theoretical, now it's real (a response from a query the VM, not the hypervisor settings) Related to saltstack/salt#27089 Saltcloud virtualbox provider --- salt/utils/virtualbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/utils/virtualbox.py b/salt/utils/virtualbox.py index 206edbfe96..8ca35334a4 100644 --- a/salt/utils/virtualbox.py +++ b/salt/utils/virtualbox.py @@ -197,7 +197,7 @@ def vb_get_network_addresses(machine_name=None, machine=None): if machine_name: machine = vb_get_box().findMachine(machine_name) - total_slots = vb_get_max_network_slots() + total_slots = int(machine.getGuestPropertyValue("/VirtualBox/GuestInfo/Net/Count")) ip_addresses = [] for i in range(total_slots): try: