mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Send a warning notification if there is not enough RAM left to start a VM. Implements #329.
This commit is contained in:
1 parent
c700804014
commit
ac75977ae0
8 files changed
+38
-1
No files matched your search
@@ -247,6 +247,10 @@ class Router(BaseVM):
|
||||
if elf_header_start != b'\x7fELF\x01\x02\x01':
|
||||
raise DynamipsError('"{}" is not a valid IOS image'.format(self._image))
|
||||
|
||||
# check if there is enough RAM to run
|
||||
if not self._ghost_flag:
|
||||
self.check_available_ram(self.ram)
|
||||
|
||||
yield from self._hypervisor.send('vm start "{name}"'.format(name=self._name))
|
||||
self.status = "started"
|
||||
log.info('router "{name}" [{id}] has been started'.format(name=self._name, id=self._id))
|
||||
|
||||
Reference in new issue
Block a user