Stay organized with collections Save and categorize content based on your preferences.
Linux Windows
If your VM is inaccessible or corrupted, you can recover the VM or its full bootdisk.
Recovering an inaccessible VM or a full boot disk
If you can't connect to your instance, or your boot disk is full and you can'tresize it, you must create an instance and recreate the boot disk from asnapshot to resize it. You must know the size of the boot disk you'rerecreating.
Permissions required for this task
To perform this task, you must have the following permissions:
compute.instances.create on the project to be able to create a new instance
compute.disks.create on the project to be able to create a new disk
compute.disks.createSnapshot on the disk
compute.instances.attachDisk on the new VM instance
compute.disks.use permission on the disk to attach
In the Google Cloud console, go to the VM instances page.
Click the instance name to open the VM instance details page.
Click Stop.
In the Boot disk section, note the boot disk's sizeand name.
In the Google Cloud console, go to the Create a snapshot page.
Go to Create a snapshot
Enter a snapshot Name.
Select the boot disk from the Source disk drop-down list.
Click Create.
In the Google Cloud console, go to the Create an instance page.
Go to Create an instance
Enter the instance details.
Create a new boot disk from the snapshot of the old boot disk.
Under Boot disk, select Change.
Select Snapshots.
Select the snapshot of the old boot disk from the Snapshot drop-down list.
Select the Boot disk type.
Enter the new size for the disk.
Click Select to confirm your disk options.
Click Create.
Recovering a corrupted VM
If a VM's OS is corrupted, you can retrieve the boot disk data to recover theVM. To recover the boot disk, you must first create a temporary VM using aGoogle-provided image, because the snapshot of thesource VM might be corrupted.
Create a snapshot from the boot disk of the source VM.
Create a temporary VM using a public image.
Check if you're able to connect to the temporary VM using SSH.
Add an additional disk to the temporary VM by following these steps:
In the Google Cloud console, go to the VM instances page.
Go to VM instances
Select the temporary VM that you created.
Click editEdit.
Under Additional disks, click Add new disk, and then do thefollowing:
Add the disk name.
For Source type, select the Snapshot tab.
In the Source snapshot drop-down menu, select the snapshot of thesource VM that you created earlier in these steps.
Click Done.
Click Save.
Connect to the VM using SSH.
Check the disk and partitions in the VM and make a note of the disk name—for example /dev/sdb1:
lsblk
The output is similar to the following:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 10G 0 disk └─sda1 8:1 0 10G 0 part / sdb 8:16 0 100G 0 disk ├─sdb1 8:17 0 96G 0 part ├─sdb2 8:18 0 1K 0 part └─sdb5 8:21 0 4G 0 part
Create a mount point at /mnt/newdisk:
sudo mkdir /mnt/newdisk
Mount the additional disk partition to the mount point /mnt/newdisk:
sudo mount -o discard,defaults DISK_NAME /mnt/newdisk
Replace DISK_NAME with the disk name that you noted earlier in these steps—for example, /dev/sdb1.
The snapshot's file system is mounted at /mnt/newdisk. You can navigate thedirectories and retrieve data.
To create a VM with the recovered boot disk, follow these steps:
Create an image from the disk of the temporary VM.
Create a VM with the image of the temporary VM.
After the VM is created, you can transfer the recovered data to the VM.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-03-26 UTC.
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]
Performing a reset on your VM is similar to doing a hard reset on your computer, where you might press a reset button or press and hold the power button. Resetting a VM forcibly wipes the memory contents of the machine and resets the VM to its initial state.
Performing a reset on your VM is similar to doing a hard reset on your computer, where you might press a reset button or press and hold the power button. Resetting a VM forcibly wipes the memory contents of the machine and resets the VM to its initial state.
In the Google Cloud console, go to the Cloud Storage Buckets page. In the list of buckets, find the bucket that contains the objects you want to restore. Click the Bucket overflow menu (more_vert) associated with the bucket and select Create restore job. The Create a restore job pane opens.
Navigate to the VM you want to reset. Select the desired VM and right-click or select the Actions menu. Select VM Power > Reset to display the Run Power Control window. Run Power Control: Verify the VM you want to reset, then select Next.
Google does not charge for VM resources while they are in the TERMINATED state. Google charges for storing the preserve state of suspended VMs. Because the VM remains in the RUNNING state when it is resetting, Google charges for VMs according to standard VM prices.
Navigate to the folder that used to contain the file or folder, right-click it, and then select Restore previous versions. If the folder was at the top level of a drive, for example C:\, right-click the drive, and then select Restore previous versions.
Most Android phones do not store voicemails on the device after you delete them. If you use a third-party phone app with its own voicemail service, voicemails might be stored in a trash folder. However, this method can restore the deleted voicemail only if the message was left on that app.
You can restore a deleted VM from a datastore primary or secondary backup to an ESXi host that you select. When restoring to a different location, SnapCenter Plug-in for VMware vSphere must be running in the linked vCenter that is the destination for the restore operation.
Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.