1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-02-17 18:42:00 +00:00

Merge pull request #649 from GNS3/bind_qemu_all_host

Bind qemu UDP tunnels on all hosts
This commit is contained in:
Jeremy Grossmann 2016-09-12 11:04:08 -06:00 committed by GitHub
commit b8909c54cf

View File

@ -1125,8 +1125,8 @@ class QemuVM(BaseNode):
if self.ubridge and self.ubridge.is_running(): if self.ubridge and self.ubridge.is_running():
yield from self._add_ubridge_udp_connection("QEMU-{}-{}".format(self._id, adapter_number), yield from self._add_ubridge_udp_connection("QEMU-{}-{}".format(self._id, adapter_number),
self._local_udp_tunnels[adapter_number][1], self._local_udp_tunnels[adapter_number][1],
nio) nio)
elif self.is_running(): elif self.is_running():
raise QemuError("Sorry, adding a link to a started Qemu VM is not supported without using uBridge.") raise QemuError("Sorry, adding a link to a started Qemu VM is not supported without using uBridge.")
@ -1229,6 +1229,7 @@ class QemuVM(BaseNode):
log.info("QEMU VM '{name}' [{id}]: stopping packet capture on adapter {adapter_number}".format(name=self.name, log.info("QEMU VM '{name}' [{id}]: stopping packet capture on adapter {adapter_number}".format(name=self.name,
id=self.id, id=self.id,
adapter_number=adapter_number)) adapter_number=adapter_number))
@property @property
def started(self): def started(self):
""" """
@ -1446,7 +1447,7 @@ class QemuVM(BaseNode):
adapter_number, adapter_number,
nio.rhost, nio.rhost,
nio.rport, nio.rport,
self._host, "0.0.0.0",
nio.lport)]) nio.lport)])
elif isinstance(nio, NIOTAP): elif isinstance(nio, NIOTAP):
network_options.extend(["-net", "tap,name=gns3-{},ifname={}".format(adapter_number, nio.tap_device)]) network_options.extend(["-net", "tap,name=gns3-{},ifname={}".format(adapter_number, nio.tap_device)])