1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Fix qemu hotlink

This commit is contained in:
Julien Duponchelle 2017-07-12 10:07:21 +02:00
parent 04303ca00c
commit 66d5d34877
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -1130,8 +1130,7 @@ class QemuVM(BaseNode):
raise QemuError('Adapter {adapter_number} does not exist on QEMU VM "{name}"'.format(name=self._name,
adapter_number=adapter_number))
if adapter_number not in self._local_udp_tunnels:
self._local_udp_tunnels[adapter_number] = self._create_local_udp_tunnel()
if self.is_running():
try:
yield from self.add_ubridge_udp_connection("QEMU-{}-{}".format(self._id, adapter_number),
self._local_udp_tunnels[adapter_number][1],
@ -1162,6 +1161,7 @@ class QemuVM(BaseNode):
raise QemuError('Adapter {adapter_number} does not exist on QEMU VM "{name}"'.format(name=self._name,
adapter_number=adapter_number))
if self.is_running():
yield from self._ubridge_send("bridge delete {name}".format(name="QEMU-{}-{}".format(self._id, adapter_number)))
nio = adapter.get_nio(0)