Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to start the VMWare virtual machine in command line mode

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to start the VMWare virtual machine in command-line mode. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

In the work, we use to install VMWare Workstation in CentOS to deploy virtual machines. In the past, we used to use graphical interface to start virtual machines, so we need to adjust the resolution size of VNC. After restarting VNC Server, all virtual machines are turned off. In hindsight, it may be that the graphical startup of the virtual machine is running in level 5, and restarting VNC Server is equivalent to logging out of the session running vmware Workstation, and naturally all virtual machines are shut down.

To avoid this problem again, it feels like starting the virtual machine in level 3 through command-line mode.

Basic commands:

# vmrun-T ws start "/ opt/VMware/win2k8r2.vmx" nogui

Start a virtual machine without graphical interface (ws | server | server1 | fusion | esx | vc | player, ws, esx and player may be more commonly used, but I can run normally in Workstation without adding-T, so esx and server may be needed)

# vmrun start "/ opt/VMware/win2k8r2.vmx" gui

Start the virtual machine with graphical interface

# vmrun stop "/ opt/VMware/win2k8r2.vmx" hard | soft

Force shutdown of virtual machine (equivalent to direct power off) | shut down virtual machine normally

# vmrun reset "/ opt/VMware/win2k8r2.vmx" hard | soft

Cold restart virtual machine | Hot restart virtual machine

# vmrun suspend "/ opt/VMware/win2k8r2.vmx" hard | soft

Suspend a virtual machine (may be equivalent to hibernation)

# vmrun pause "/ opt/VMware/win2k8r2.vmx"

Pause the virtual machine

# vmrun unpause "/ opt/VMware/win2k8r2.vmx"

Stop pausing the virtual machine

# vmrun list

List the running virtual machines

# ps aux | grep vmx

Another way to view running virtual machines

# vmrun-T ws snapshot "/ opt/VMware/win2k8r2.vmx" snapshotName

Create a snapshot

# vmrun-T ws reverToSnapshot "/ opt/VMware/win2k8r2.vmx" snapshotName

Restore a virtual machine from a snapshot

# vmrun-T ws listSnapshots "/ opt/VMware/win2k8r2.vmx"

List the number and name of virtual machine snapshots

# vmrun-T ws deleteSnapshot "/ opt/VMware/win2k8r2.vmx" snapshotName

Delete a snapshot

It is best to stop creating a virtual machine when creating a snapshot. It is said that the snapshot created in this way is much smaller than when the virtual machine is running and has not been verified. Of course, there are many more commands, which can be queried by vmrun-help. The format of Linux and windows commands are the same.

Thank you for reading! This is the end of the article on "how to start the VMWare virtual machine in command line mode". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report