Custom Search

Saturday, March 9, 2013

How to connect to VMware vCenter Server using libvirt API and virsh command


1) First install libvirt 1.0.0
http://fosshelp.blogspot.in/2013/03/how-to-compile-and-install-libvirt-100.html

2) Connect to VMware vCenter Server 
#virsh -c vpx://192.168.12.156/vCenter/Cluster-1/192.168.12.153?no_verify=1
#virsh -c vpx://vcenter-server-name/datacenter-name/cluster-or-computeresource-name/host-name?no_verify=1

or

#virsh -c vpx://192.168.12.156/Datacenters/vCenter/host/Cluster-1/192.168.12.153?no_verify=1
#virsh -c vpx://vcenter-server-name/folder-name/datacenter-name/host/cluster-or-computeresource-name/host-name?no_verify=1

vpx :  driver or hypervisor
192.168.12.156 : vCenter Server
192.168.12.153 : ESXi Server (host)
vCenter : Name of Datacenter
Cluster-1 : Name of Cluster or Compute Resource


#list --all

#list --help

#help

#pool-list

#net-list

#version

#uri

#list --all

#domstate dom-id or dom-name

#dominfo dom-id or dom-name

#start dom-id or dom-name

#shutdown dom-id or dom-name

#reboot dom-id or dom-name

#destroy dom-id or dom-name

#migrate dom-id or dom-name


1 comment: