VMWare:Iniciando as VMs atraves da Linha de Comando

From Wiki
Revision as of 20:34, 4 February 2013 by Ebasso (talk | contribs) (→‎Ver também)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

O VMWare vem com o utilitário vmware-cmd que permite através da linha de comando ou shell realizar as seguintes ações sobre as Máquinas Virtuais:

  • Iniciar / Parar VM
  • Verificar o status das VMs
  • Definir Váriaveis

Listando as Máquinas Virtuais

Você pode listar todos os servidores e arquivos de configuração, através do comando:

vmware-cmd -l

Saída:

/VirtualMachines/OpenSUSE/OpenSUSE.vmx
/VirtualMachines/VMDomino/vmdomino.vmx
/VirtualMachines/VMAsterisk/vmasterisk.vmx
/VirtualMachines/VMPortal/portal.vmx
/VirtualMachines/CentOS5/CentOS5.vmx

Turn on VM / Power up VPS

Just pas start option to vmware-cmd,

  1. vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx start

To stop VM/VPS, enter:

  1. vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx stop

To reset VM/VPS, enter:

  1. vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx reset

To suspend VM/VPS, enter:

  1. vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx suspend

Find out if OpenBSD VM is on or off:

  1. vmware-cmd /disk2.vmware/vms/OpenBSD/OpenBSD.vmx getstate

Output:

getstate() = off

vmware-cmd offers other options, please consult VMWARE documentation for more information.

tags: vmware linha de comando


Ver também