zer0ish Posted April 6, 2023 Share Posted April 6, 2023 (edited) I'm very new to unraid and figure it would be useful for others to have this information. If you have ever had an ungraceful shutdown of your unraid server, you’ve most likely booted it back up to see your VM are no longer in the VMS tab. This happened to me yesterday due to a crazy Canadian winter ice storm, and finding information on how to recover this wasn’t clear. Most post I've read, have replies saying the libvirt.img was corrupted. This could be the case for some people, but not for me and I assume most others. These steps can be taken even after deleted the libvirt.img so long as you have the vdisk available. Here is how I recovered my VM. Please note this is only tested on a Linux VM since my current unraid server is on a miniPC that isn’t good enough to run VM’s and can’t install a Windows VM. This is just a testing system to play with unraid while I build my power house rig. With that said, lets start. Step 1: Make sure your directory and vdisk is still where it was, and note the name of the folder, for me it was "Kali Linux". Step 2: Go to the VMs Tab and click “ADD VM”. Step 3: Select what ever the old VM was. In my case, it was Linux. Step 4: Set the “Name” to what ever it was before and it should auto set the “Primary vDisk Location” to what you had in Step 1. Wrong name shows this: Correct Original Name shows this: Step 4.1: Set your “Initial” and “Max” Memory and anything else as close to what you had it before. This part is less important and can be changed later for most options. You do not need to select an “OS Install ISO”. Leave it alone. Step 5: Once all is what it needs to be, Click “Create”. Step 6: When the VM starts in noVNC, you will have this Shell screen. Step 7: Type "Exit" in the Shell prompt. And you will be greeted by the BIOS screen. Step 8: Go to Boot Maintenance Manager. Step 9: Boot Options. Step 10: Add Boot Option. Step 11: Select the NO VOLUME LABEL. Step 12: Select <EFI>. Step 13: Select your directory. In my case it was called Kali. Step 14: Select grubx64.efi. Step 15: Go to “Input the description” and hit Enter. Type in something, I typed Kali Linux. This is what will be used in the Boot options. This is important, do not forget to name it. Step 16: Select “Commit Changes and Exit”. Step 17: Go to “Change Boot Order” then select the boot devices and tap enter. I want my new device booting first, so I will highlight my device, tap the + button to move Kali Linux(The name we used in step 15) to the top, then hit enter. Now we have a new boot order for this VM. Step 18: Select “Commit Changes and Exit” Head back to the main BIOS screen and select Boot Manager. You should now see your new boot device at the top of the list. Go back to main BIOS screen again and select Continue. You will be sent to the proper recovered VM. Enjoy your recovered VM. Edited April 6, 2023 by zer0ish 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.