mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Merge pull request #2307 from GNS3/fix/3521
Allow disabling hardware virtualization check
This commit is contained in:
commit
14fd165f2a
@ -62,6 +62,9 @@ default_nat_interface = vmnet10
|
|||||||
; Enable the built-in templates
|
; Enable the built-in templates
|
||||||
enable_builtin_templates = True
|
enable_builtin_templates = True
|
||||||
|
|
||||||
|
; check if hardware virtualization is used by other emulators (KVM, VMware or VirtualBox)
|
||||||
|
hardware_virtualization_check = True
|
||||||
|
|
||||||
[VPCS]
|
[VPCS]
|
||||||
; VPCS executable location, default: search in PATH
|
; VPCS executable location, default: search in PATH
|
||||||
;vpcs_path = vpcs
|
;vpcs_path = vpcs
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import asyncio
|
|
||||||
import psutil
|
import psutil
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
from .project import Project
|
from .project import Project
|
||||||
|
from ..config import Config
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -128,10 +130,11 @@ class ProjectManager:
|
|||||||
:returns: boolean
|
:returns: boolean
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for project in self._projects.values():
|
if Config.instance().get_section_config("Server").getboolean("hardware_virtualization_check", True):
|
||||||
for node in project.nodes:
|
for project in self._projects.values():
|
||||||
if node == source_node:
|
for node in project.nodes:
|
||||||
continue
|
if node == source_node:
|
||||||
if node.hw_virtualization and node.__class__.__name__ != source_node.__class__.__name__:
|
continue
|
||||||
return False
|
if node.hw_virtualization and node.__class__.__name__ != source_node.__class__.__name__:
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user