mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
New option: require KVM. If false, Qemu VMs will not be prevented to run without KVM.
This commit is contained in:
parent
068077c594
commit
3e2e8e61f7
@ -63,3 +63,5 @@ license_check = True
|
||||
[Qemu]
|
||||
; !! Remember to add the gns3 user to the KVM group, otherwise you will not have read / write permssions to /dev/kvm !!
|
||||
enable_kvm = True
|
||||
; Require KVM to be installed in order to start VMs
|
||||
require_kvm = True
|
@ -1624,7 +1624,10 @@ class QemuVM(BaseNode):
|
||||
return False
|
||||
|
||||
if not os.path.exists("/dev/kvm"):
|
||||
if self.manager.config.get_section_config("Qemu").getboolean("require_kvm", True):
|
||||
raise QemuError("KVM acceleration cannot be used (/dev/kvm doesn't exist). You can turn off KVM support in the gns3_server.conf by adding enable_kvm = false to the [Qemu] section.")
|
||||
else:
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
|
@ -212,6 +212,7 @@ report_errors = True
|
||||
|
||||
[Qemu]
|
||||
enable_kvm = True
|
||||
require_kvm = True
|
||||
EOFC
|
||||
|
||||
chown -R gns3:gns3 /etc/gns3
|
||||
@ -298,6 +299,7 @@ report_errors = True
|
||||
|
||||
[Qemu]
|
||||
enable_kvm = True
|
||||
require_kvm = True
|
||||
EOFSERVER
|
||||
|
||||
log "Install packages for Open VPN"
|
||||
|
Loading…
Reference in New Issue
Block a user