• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Reset Unknown VM in RHV Engine Database

by admin

On AdminPortal, you see that the VM status becomes unknown with a black question mark and all operations become grey and no operation can be done on this VM as follows:

unknown

This post will show you how to reset state of vm in the engine databse and run the VM again.

1. Follow the below post steps to connect to the Postgres engine database.

Useful RHV Engine PostgreSQL Database Queries

2. Check the VM status in Databse:

# select a.vm_guid,a.vm_name,b.status,c.vds_name from vm_static a, vm_dynamic b,vds_static c where a.vm_guid=b.vm_guid and b.run_on_vds=c.vds_id ;

For example:

engine=# select a.vm_guid,a.vm_name,b.status,c.vds_name from vm_static a, vm_dynamic b,vds_static c where a.vm_guid=b.vm_guid and b.run_on_vds=c.vds_id ;
vm_guid | vm_name | status | vds_name
----------------------------+---------+--------+--------------------------
xxx-xxx-xxx-xxx-xxx | VM1 | 1 | KVM Host1
xxx-xxx-xxx-xxx-xxx | VM2 | 1 | KVM Host2
xxx-xxx-xxx-xxx-xxx | VM3 | 7 | KVM Host3         >>>>>>>>>> Status 7 indicates that the VM is in unknown.
(3 rows)

3. Take a backup of the current database following the below post:

How to Backup And Restore The RHEV Manager Engine

4. Update the VM status in the database:

# update vm_dynamic set status = 0 where vm_guid =(select vm_guid from vm_static where vm_name = '');

For example:

engine=# update vm_dynamic set status = 0 where vm_guid =(select vm_guid from vm_static where vm_name = 'VM3');
UPDATE 1

5. Check the current VM status in the AdminPortal and it will become as ‘Down’.

Down

6. Now you can click ‘Run’ button to start this VM.

Up

Filed Under: CentOS/RHEL, RHV

Some more articles you might also be interested in …

  1. How to disable NFS client caching in CentOS/RHEL
  2. How to Create a Bridge Interface Using nmcli in CentOS/RHEL 7 and 8
  3. ‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
  4. Zenoss Core Installation & Configuration on CentOS/RHEL 6.X
  5. How To Create A SSH Banner in CentOS/RHEL Server
  6. Understanding Cluster Fencing Policy in RedHat Virtualization (RHV)
  7. How to Convert a Directory to Partition in Linux
  8. “Logical volume vg/lv contains a filesystem in use” – while removing LVM filesystem
  9. Intel I219-LM Centos 6 network failed to start
  10. How To Configure NIS (Network Information System) Master and Slave Servers in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • gml2gv Command Examples
  • glow Command Examples
  • glib-compile-resources Command Examples
  • glances Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright