"vdsClient -s 0 list table" command is not listing the VMs which are down.
Hi,
I tried to list all the VMs running on a specific host using the following vdsClient command. But it is showing only the VMs which are "UP"
"vdsClient -s 0 list table"
When the RHV-Manager is down,
1) How to list all the VMs (regardless the VM is up or down) running on a host?
2) How to manually start/shutdown/poweroff the VM using vdsClient?
3) How to get the MAC addresses of all the nics present on all the VMs on a specific host?
4) Is there any other tool similar to vdsClient to get the VM information when the RHV-Manager is down?
Thanks.
Responses
Hello,
In response:
1) How to list all the VMs (regardless the VM is up or down) running on a host?
vdsClient will only list the running VMs. VM's are only associated with a host if they are running, so it's not possible to report on VM's that are down. The only exception to this would be the HostedEngine instance.
2) How to manually start/shutdown/poweroff the VM using vdsClient?
This is not possible. VM's must be started via the GUI or API (the API requires ovirt-engine to be running)
3) How to get the MAC addresses of all the nics present on all the VMs on a specific host?
# vdsClient -s 0 list| grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}|vmName.*'
It's difficult to parse the output nicely, not sure if there is an easier way.
4) Is there any other tool similar to vdsClient to get the VM information when the RHV-Manager is down?
vdsClient is the only tool that I am aware of, other than general OS tools ('ps', 'lsof', etc...)
'virsh' may be useful in some limited instances, ie:
- Another way to list running VM's
# virsh -r list
- Show the current running VM config - xml format.
# virsh -r dumpxml <vm-name>
Hello,
Sorry I was focusing on the request to start VM's. Yes there is a 'shutdown' command and in theory it can be done without ovirt-engine's knowledge. (not much different to shutting the VM down itself, or killing the process on the hypervisor). The engine would just see this changed state and update accordingly.
Starting the VM, however, is different. It must be controlled by the engine, otherwise you could easily start the same VM on two different hypervisors simultaneously. This would result in the VM's disk being mounted and modified by two different instances, and then filesystem corruption.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
