Merge branch '2.2' into 3.0

# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/symbol_handler.py
#	gns3server/version.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/endpoints/compute/test_qemu_nodes.py
#	tests/endpoints/controller/test_nodes.py
This commit is contained in:
grossmj committed 2020-10-12 18:04:49 +10:30
commit 0746949207
162 files changed
+34333 -50289

No files matched your search

@@ -223,6 +223,24 @@ class HyperVGNS3VM(BaseGNS3VM):
elif ret != 0 or ret != 32775:
raise GNS3VMError("Failed to change state to {}".format(state))
async def _is_vm_network_active(self):
"""
Check if WMI is updated with VM virtual network adapters
and wait until their count becomes > 0
ProtocolIFType Unknown (0)
Other (1)
IPv4 (4096)
IPv6 (4097)
IPv4/v6 (4098)
"""
wql = "SELECT * FROM Msvm_GuestNetworkAdapterConfiguration WHERE InstanceID like \
'Microsoft:GuestNetwork\\" + self._vm.Name + "%' and ProtocolIFType > 0 "
nic_count = len(self._conn.query(wql))
while nic_count == 0:
await asyncio.sleep(0.1) # 100ms
nic_count = len(self._conn.query(wql))
async def start(self):
"""
Starts the GNS3 VM.
@@ -244,6 +262,9 @@ class HyperVGNS3VM(BaseGNS3VM):
raise GNS3VMError("Failed to start the GNS3 VM: {}".format(e))
log.info("GNS3 VM has been started")
# check if VM network is active
await self._is_vm_network_active()
# Get the guest IP address
# LIS (Linux Integration Services) must be installed on the guest
# See https://oitibs.com/hyper-v-lis-on-ubuntu-18-04/ for details.
+1 -1
View File
@@ -135,7 +135,7 @@ class Symbols:
return symbol
else:
# return the default computer symbol
log.warning("Could not retrieve symbol '{}'".format(symbol_id))
log.warning("Could not retrieve symbol '{}', returning default symbol...".format(symbol_id))
return self._symbols_path[":/symbols/classic/computer.svg"]
def get_size(self, symbol_id):