mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-13 20:08:55 +00:00
Implement variable replacement for Qemu VM options.
This commit is contained in:
parent
cfbcc1194d
commit
e08aebf1f0
@ -1636,6 +1636,11 @@ class QemuVM(BaseNode):
|
||||
"""
|
||||
|
||||
additional_options = self._options.strip()
|
||||
additional_options = additional_options.replace("%vm-name%", self._name)
|
||||
additional_options = additional_options.replace("%vm-id%", self._id)
|
||||
additional_options = additional_options.replace("%project-id%", self.project.id)
|
||||
additional_options = additional_options.replace("%project-path%", self.project.path)
|
||||
print(additional_options)
|
||||
command = [self.qemu_path]
|
||||
command.extend(["-name", self._name])
|
||||
command.extend(["-m", "{}M".format(self._ram)])
|
||||
|
Loading…
Reference in New Issue
Block a user