Example #1
0
 def checkVmrun(self):
     """Checking if vmrun is installed"""
     vmrun = VMware.instance().findVmrun()
     if len(vmrun) == 0:
         return (
             1,
             "The vmrun executable could not be found, VMware VMs cannot be used"
         )
     return (0, None)
Example #2
0
    def execute_vmrun(self, subcommand, args, timeout=60):

        from gns3.modules.vmware import VMware
        vmware_settings = VMware.instance().settings()
        vmrun_path = vmware_settings["vmrun_path"]
        if sys.platform.startswith("darwin"):
            command = [vmrun_path, "-T", "fusion", subcommand]
        else:
            host_type = vmware_settings["host_type"]
            command = [vmrun_path, "-T", host_type, subcommand]
        command.extend(args)
        log.debug("Executing vmrun with command: {}".format(command))
        return self._process_check_output(command, timeout=timeout)
Example #3
0
    def execute_vmrun(self, subcommand, args, timeout=60):

        from gns3.modules.vmware import VMware
        vmware_settings = VMware.instance().settings()
        vmrun_path = vmware_settings["vmrun_path"]
        if sys.platform.startswith("darwin"):
            command = [vmrun_path, "-T", "fusion", subcommand]
        else:
            host_type = vmware_settings["host_type"]
            command = [vmrun_path, "-T", host_type, subcommand]
        command.extend(args)
        log.debug("Executing vmrun with command: {}".format(command))
        return self._process_check_output(command, timeout=timeout)
Example #4
0
 def checkVmrun(self):
     """Checking if vmrun is installed"""
     vmrun = VMware.instance().findVmrun()
     if len(vmrun) == 0:
         return (1, "The vmrun executable could not be found, VMware VMs cannot be used")
     return (0, None)