mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-21 13:47:50 +00:00
Checks connection failure to Qemu monitor.
This commit is contained in:
parent
14cc6d414f
commit
2ef45781ad
@ -911,7 +911,11 @@ class QemuVM(object):
|
||||
result = None
|
||||
if self.is_running() and self._monitor:
|
||||
log.debug("Execute QEMU monitor command: {}".format(command))
|
||||
tn = telnetlib.Telnet(self._monitor_host, self._monitor, timeout=timeout)
|
||||
try:
|
||||
tn = telnetlib.Telnet(self._monitor_host, self._monitor, timeout=timeout)
|
||||
except OSError as e:
|
||||
log.warn("Could not connect to QEMU monitor: {}".format(e))
|
||||
return result
|
||||
try:
|
||||
tn.write(command.encode('ascii') + b"\n")
|
||||
time.sleep(0.1)
|
||||
|
@ -778,16 +778,14 @@ class VirtualBoxVM(object):
|
||||
"--register"]
|
||||
|
||||
result = self._execute("clonevm", args)
|
||||
|
||||
args = [self._name,
|
||||
"take",
|
||||
"reset"]
|
||||
|
||||
result = self._execute("snapshot", args)
|
||||
log.debug("cloned VirtualBox VM: {}".format(result))
|
||||
|
||||
self._vmname = self._name
|
||||
self._execute("setextradata", [self._vmname, "GNS3/Clone", "yes"])
|
||||
log.debug("cloned VirtualBox VM: {}".format(result))
|
||||
|
||||
args = [self._name, "take", "reset"]
|
||||
result = self._execute("snapshot", args)
|
||||
log.debug("snapshot reset created: {}".format(result))
|
||||
|
||||
def _start_remote_console(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user