简体   繁体   English

VMWare Workstation不会从命令行挂起

[英]VMWare Workstation won't suspend from command line

I'm trying to automate VMWare Desktop on Windows 7 to suspend all vm's before I do a backup job each night. 我试图在Windows 7上自动执行VMWare Desktop,以挂起所有vm,然后每晚进行备份作业。 I used to have a script that did this but I've noticed now that it won't suspend anymore with the same command that used to work. 我曾经有个脚本可以做到这一点,但是现在我已经注意到,它不再使用以前可以使用的相同命令挂起。

If I do vmrun list I get a list of the running vms with no issue. 如果我执行vmrun list我会得到没有问题的正在运行的vms列表。

If I do vmrun suspend "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx" it just hangs and I have to kill the command with CTRL+C. 如果我执行vmrun suspend "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx"则它会挂起,我必须使用CTRL + C vmrun suspend "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx"该命令。

I've even tried a newer command using -T to specify it's workstation, ie vmrun -T ws suspend "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx" and still no love. 我什至尝试使用-T指定它的工作站,这是更新的命令,即vmrun -T ws suspend "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx" ,但还是没有爱。

If I have the vm already stopped, I can issue vmrun start "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx" and it starts fine. 如果我的vmrun start "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx"已经停止,则可以发出vmrun start "V:\\Virtual Machines\\RICHARD-DEV\\RICHARD-DEV.vmx"并且启动正常。

As well as the suspend command, the stop command also does not work. 与暂停命令一样,停止命令也无效。 I'm running VMWare Workstation 11.1.3 build-3206955 on Windows 7. 我正在Windows 7上运行VMWare Workstation 11.1.3 build-3206955。

Any ideas? 有任何想法吗?

Update: 更新:

I installed latest VMWare Tools on the guest, as well as the latest Vix on the Host so everything should be up to date. 我在客户机上安装了最新的VMWare工具,在主机上安装了最新的Vix,因此所有内容都应该是最新的。

I can start a vm using vmrun with no problem using vmrun -T ws start <path to vmx> but the command doesn't come back to the command prompt, so I'm assuming it's not getting confirmation from the vm that it is now running. 我可以使用vmrun来启动vm,而使用vmrun -T ws start <path to vmx>却没有问题,但是命令不会返回到命令提示符,因此我假设它没有从vm那里得到确认运行。

If I cancel the 'start' command and now try and suspend I'm getting the same lack of communication from the guest. 如果我取消了“开始”命令,现在尝试挂起,则来宾也同样缺少通信。 If I manually suspend the vm, once it's suspended I get an 'Error: vm is not running' and the 'suspend' command finally times out and comes back. 如果我手动挂起了vm,那么一旦挂起,我会收到一个“错误:vm没有运行”,并且“ suspend”命令最终超时并返回。

So, it looks to me like there is no communication from vmrun to the guest about what state it's in etc. Is there a way to debug the communication from the host to the guest using vmrun or other means? 因此,在我看来好像没有从vmrun到来宾的通信,它处于什么状态等。是否可以使用vmrun或其他方式调试从主机到来宾的通信? Are there ports I need open in the guest OS? 来宾操作系统中是否需要打开端口?

So, I never did get vmrun to work properly on my main system, although I did get it behave ok on my laptop so there is something weird happening on this machine. 因此,尽管我确实在笔记本电脑上运行vmrun正常,但我从未使vmrun在主系统上正常工作,因此这台计算机上发生了一些奇怪的事情。 I also installed a trial of the latest VMWare 12 and the same thing happens. 我还安装了最新版VMWare 12的试用版,并且发生了同样的事情。

As a workaround, I ended up changing the power management settings in my guest OS so that it would 'sleep' after 1 hr of inactivity. 作为一种解决方法,我最终在客户机OS中更改了电源管理设置,以使其在闲置1小时后会“休眠”。 When this happens VMWare detects it and automatically suspends the guest which is really what I'm looking for. 发生这种情况时,VMWare会检测到它并自动挂起guest虚拟机,这正是我想要的。 Not the most slick solution but it does manage to unlock the files I need to be backed up in a nightly backup. 这不是最聪明的解决方案,但它确实可以解锁我需要在每晚备份中备份的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM