GCP- Recover VM boot disk with GCE Rescue
“Oh no! I can’t access my VM 🥴” Have you had one of these sigh scary moments? System administrators often encounter scenarios where a server fails to boot or forgotten login credentials. The recovery process historically involved physical access to the server, utilizing a bootable Linux distribution on a USB drive or a CD-ROM. Alternatively, if the server offers remote management features like iLO (Integrated Lights-Out) or iDRAC (Integrated Dell Remote Access Controller), an option is to mount a bootable ISO file using the virtual drive.
However, advancements in server management have provided more remote and automated recovery solutions, such as:
- Remote Console Access: Many modern servers offer remote console access through dedicated management interfaces like iLO, iDRAC, BMC (Baseboard Management Controller), or IPMI (Intelligent Platform Management Interface). These interfaces enable accessing the server console remotely, similar to physical access.
- PXE Boot: Preboot Execution Environment (PXE) allows booting the server over the network. Administrators can set up PXE servers to provide bootable images, making it possible to boot and recover servers remotely.
- Remote Recovery Tools: Some vendors offer specialized tools and platforms designed explicitly for remote server recovery. These tools facilitate diagnostics, repairs, and even complete system reinstalls remotely.
- Cloud-Based Management: In cloud environments, server recovery is often handled through cloud management consoles, providing remote access and recovery options.
Today’s systems emphasize remote accessibility and management, reducing the reliance on physical access for server recovery. Cloud computing operates on the principle of treating virtual machines (VMs) as disposable entities. This approach embraces the concept of Infrastructure as Code (IaC) and promotes the ease of replacing faulty or problematic instances effortlessly.
GCE Rescue
FYI: GCE Rescue is maintained and supported by the Open Source Community and is not part of Google Cloud Suite products.
“Google Compute Engine Rescue is a powerful command-line utility designed specifically for Google Cloud Platform VMs (GCE). This tool efficiently boots VMs into Rescue Mode, enabling users to address critical issues or perform troubleshooting tasks seamlessly. It achieves this by creating a temporary Linux image disk and strategically placing it at the forefront of the boot disk list.
Much akin to the process of recovering physical servers, GCE Rescue offers a streamlined solution within the cloud environment. By prioritizing the creation of this specialized Linux image disk, users gain direct access to the VM, allowing them to address and resolve any unforeseen challenges that may hinder normal operation.
With GCE Rescue, managing and remedying issues with GCE VMs becomes a smooth and structured process, ensuring efficient troubleshooting and rapid restoration of functionality.”
GCE Rescue: Use Cases
- Rescue a VM that has lost connectivity — being unable to connect to the VM using normal connection methods like SSH(Secure Session Host) and RDP(Remote Desktop Protocol)
- Fix the boot process of a VM- bootloaders, kernel updates or even disk partition eros that can cause boot issues
- Restoring passwords — a situation where a local admin user has lost a local password
- Retrieve files for a VM unable to boot- a VM that cannot be booted
Github: Link
Contact GCE Rescue Team
Related Article: Restoring Windows Server Access via your Google Cloud Serial Console