Lab Virtual Machines

From DISI
Jump to navigation Jump to search

There are important VMs on both Cluster 0 and Cluster 2. Cluster 0 uses VMware while Cluster 2 uses KVM/libvirt.

Cluster 0

Significant hypervisors on Cluster 0: vmware1 (access via root with clust 0 formulax2)

VMWare Commands

Webpage that describes numerous VMware commands: http://www.doublecloud.org/2013/11/vmware-esxi-vim-cmd-command-a-quick-tutorial/

# To get a list of all VMs and obtain VMid
vim-cmd vmsvc/getallvms
# To shutdown a VM: 
vim-cmd vmsvc/power.off <VMid>
# To turn on a VM: 
vim-cmd vmsvc/power.on <VMid>


Cluster 2

kvm/libvirt commands

In order for a user to issue KVM commands, the service libvirtd must be running. Check the status of libvirtd by issuing the command: service libvirtd status. If libvirtd is not running, then you may issue command: service libvirtd start.

# to get list of VMs on hypervisor
virsh list --all 
# to start a VM virsh start <VM-name or VMid>
# to shutdown a VM virsh shutdown <VM-name or VMid>
# to force shutdown a VM (equivalent of pulling the plug on a computer) virsh destroy --graceful <VM-name or VMid>
# to pause a VM virsh suspend <VM-name or VMid>
# to unpause a VM virsh resume <VM-name or VMid>
# get XML file contents of VM virsh dumpxml <VM-name or VMid>