VMware Cookbook 读书笔(二)

5.19 Restarting the vCenter Agent

Solution
You can restart the agent from the command line.
Discussion
From time to time, you may have to restart the virtual center agent on your ESX Server.
For example, vCenter may not see changes made with command-line utilities until you
restart the agent. You can do this with the following command:
/etc/init.d/vmware-vpxa restart
While the agent is restarting, you may see your ESX Server become disconnected from
vCenter. Don’t worry, your virtual machines will continue to run, and the ESX Server
will reconnect once the agent and the vCenter server reestablish a connection.

 

5.20 Unregistering a Virtual Machine via the Command Line

 

Solution
You can unregister virtual machines via the command line.
Discussion
Running the following command will stop the virtual machine from showing up in the
inventory of your ESX Server. It will not delete the virtual machine, which will be left
intact:
vmware-cmd -s unregister /vmfs/volumes/datastore/NAME/NAME.vmx
Remember to replace datastore with your correct datastore name. The virtual machine
must be powered off in order for this to work.

 

 

5.21 Registering a Virtual Machine via the Command Line

vmware-cmd -s register /vmfs/volumes/datastore/NAME/NAME.vmx

 

5.22 Finding Virtual Machine Snapshots

Solution
You can list all the snapshots via the command line.
Discussion
This command will list all the snapshots in your virtual machine’s directories:
ls -Ral /vmfs/volumes/* |grep .vmsn
This is helpful if you need to track down which virtual machines currently have snap-
shots associated with them.
Snapshots will consume a lot of disk space if left unattended and should be reverted
when possible.

 

5.23  Renaming a Virtual Machine via vCenter

你可能感兴趣的:(vmware,职场,读书,休闲,Cookbook)