Exemple #1
0
 def stop(self):
     vm = Vmrun(self.vmx)
     if vm.check_tools() is True:
         vm.stop()
     else:
         vm.stop(mode='hard')
     puts(colored.green("Stopped", vm))
Exemple #2
0
 def stop(self):
     vm = Vmrun(self.vmx)
     if vm.check_tools() is True:
         vm.stop()
     else:
         vm.stop(mode='hard')
     puts(colored.green("Stopped", vm))
Exemple #3
0
 def start(self):
     vm = Vmrun(self.vmx)
     if self.gui:
         vm.start(gui=True)
     else:
         vm.start()
     if vm.check_tools() is True:
         puts(colored.yellow("Getting IP address..."))
         ip = vm.ip()
         puts(colored.green("VM started on {}".format(ip)))
         puts(colored.yellow("Sharing current folder..."))
         vm.enableSharedFolders()
         vm.addSharedFolder('mech', os.getcwd())
         puts(colored.green("VM started on {}".format(ip)))
     else:
         puts(colored.yellow("VMWare Tools is not installed or running..."))
         puts(colored.green("VM started"))
Exemple #4
0
 def start(self):
     vm = Vmrun(self.vmx)
     if self.gui:
         vm.start(gui=True)
     else:
         vm.start()
     if vm.check_tools() is True:
         puts(colored.yellow("Getting IP address..."))
         ip = vm.ip()
         puts(colored.green("VM started on {}".format(ip)))
         puts(colored.yellow("Sharing current folder..."))
         vm.enableSharedFolders()
         vm.addSharedFolder('mech', os.getcwd())
         puts(colored.green("VM started on {}".format(ip)))
     else:
         puts(colored.yellow("VMWare Tools is not installed or running..."))
         puts(colored.green("VM started"))