Connecting to RHEV Hypervisor with virsh or virt-manager

Latest response

I have RHEV 3.0 beta setup and running.  I am trying to use virsh to connect to the hypervisor by running it locally on the hypervisor or remotely from the manager.  It prompts for a user/password and it seems none of my current passwords that were setup on the manager or hypervisor are working. 

 

I found an old note about

 

vdsm component
VDSM now configures libvirt so that connection to its local read-write UNIX domain socket is password-protected by SASL. The intention is to protect virtual machines from human errors of local host administrators. All operations that may change the state of virtual machines on a Red Hat Enterprise Virtualization-controlled host must be performed from Red Hat Enterprise Virtualization Manager.
 
Does anyone know how I can find out the correct user/password to provide to virsh?
 
Thanks,
 
Keith

Responses

Why would you want to use virsh at all, when you have a proper management server, with a GUI and an API that can do more?

virsh under RHEV is not supported and should not be used at all, since it does not take into account the fact that this is a RHEV setup, and even if you hack the system to get into virsh console, the changes you make will not be in sync with the management server. This might lead to a state where the management server is not aware of the states of the VMs, hosts or storage it is supposed to manage, and might render a setup useless.

 

So instead, if you describe what you are trying to achieve, we could provide you with a better way of doing it in RHEV

I have a sample program built on libvirt that collects some stats using, virDomainBlockStats.  Previously when just using LinuxKVM and not RHEV-M/RHEV-H, I connect with either virConnectOpen/virConnectOpenAuth.  I am trying to find out the corect URI to provide to virConnectOpen/virConnectOpenAuth .  Since virsh/virt-manager are built on libvirt, I was using those to test my connection.  My end goal is to be able to run this program on either the RHEV-M or RHEV-H and have it collect the data I am looking for.  Is there another option to do this?

 

Thanks,

 

Keith

Here is something we expose through the RHEV-M API: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html-single/REST_API_Guide/index.html#sect-REST_API_Guide-VMs-Disk_Statistics

 

Can you try this and let us know whether it serves your purpose?