mirror of
				https://github.com/tteck/Proxmox.git
				synced 2025-11-04 04:49:29 +00:00 
			
		
		
		
	Update monitor-all.sh to restart virtual machines instead of resetting (#1704)
If a virtual machine is not responding or has become unresponsive, perform a forceful restart instead of a soft reset
This commit is contained in:
		
							parent
							
								
									cb4097e74c
								
							
						
					
					
						commit
						76d7cc6f71
					
				@ -73,12 +73,13 @@ while true; do
 | 
			
		||||
      else
 | 
			
		||||
        # It is a virtual machine
 | 
			
		||||
        if qm status $instance | grep -q "status: running"; then
 | 
			
		||||
          echo "$(date): VM $instance is not responding, resetting..."
 | 
			
		||||
          qm reset $instance >/dev/null 2>&1
 | 
			
		||||
          echo "$(date): VM $instance is not responding, restarting..."
 | 
			
		||||
          qm stop $instance >/dev/null 2>&1
 | 
			
		||||
          sleep 5
 | 
			
		||||
        else
 | 
			
		||||
          qm start $instance >/dev/null 2>&1
 | 
			
		||||
          echo "$(date): VM $instance is not running, starting..."
 | 
			
		||||
        fi
 | 
			
		||||
        qm start $instance >/dev/null 2>&1
 | 
			
		||||
      fi
 | 
			
		||||
    fi
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user