how to remove a "non oprational" hypervisor

Latest response

install hypervisor 6.2 ,when approve the  hypervisor in rhevm GUI , it becomes "non operational" , set it to maintenance mode failed :

Host can not access one of the  Storage domains attached to it ,or the data center object. setting the Host state to "Non-Operational"

login to hypervisor remotely ,try to login the iscsi storage  attached inthe  date center ,successfully.

 

I want to remove the hypervisor and reregister the hypervisor ,but how to set the state to maintenance mode ,then  remove it ,in rhevm 2.2 ,there are commands :

C:\> sqlcmd -S .\SQLEXPRESS -d rhevm -Q "select vds_id from vds_static where vds_name="YOUR_HOST_NAME"" Example output: vds_id -------------- 1

 

C:\> sqlcmd -S .\SQLEXPRESS -d rhevm -Q "UPDATE dbo.vds_dynamic SET status=2, vm_active=0, vm_count=0, vm_migrating=0 WHERE vds_id="YOUR_HOST_ID"

 

which could set the hypervisor state to maintenance  manually , are there the similar commands in rhevm3.0 ?

Responses

The schema for vds_static and vds_dynamic hasn't (yet) changed significantly in RHEV 3, so your SQL above is still correct - just needs to be rephrased slightly for Postgres rather than SQL Server.

 

So, something like:

 

ssh your-rhevm-host

su - postgres

psql -d rhevm     # Use DB password you specified when

                          # RHEV-M was installed

select vds_id from vds_static where vds_name='your-host-name';

update vds_dynamic set status=2, vm_active=0, vm_count=0, vm_migrating=0 where vds_id='copy-and-paste-host-id-from-above';

\q

 

For ease of SQL hacking (which I expect to have to do a lot in this beta!), I've installed pgpPgAdmin on my RHEV-M server, which allows me to easily modify tables interactively via a web UI.

 

IIRC, a simpler but more disruptive way to get around the problem of a "non-operational" host is to power it off.  After a while RHEV-M will detect that it is off and change its status to "non-responsive", which will then allow you to place it in maintenance even though it is off.  You can then boot it again and manually "activate" it in RHEV Manager when you're ready.