Recently I lost everything on my PC and reinstalled Windows. But I have my old Ubuntu virtual machine's .vdi file.
Can I make a virtual machine with that .vdi file? If so, how?
If you are using VirtualBox, then it is not too difficult to take a VDI and use it anywhere. Here's how:
.vdi
file to a directory where VirtualBox will be able to access it.vdi
file that you copied, then click "Next"So long as the .vdi
file has not been corrupted, it will work just fine.
You also have the option to convert a .vdi file to an .img file and flash that to HDD or USB.
Log into Ubuntu.
Open VirtualBox
cd to folder that contains ubuntu.vdi and run:
VBoxManage clonemedium --format RAW ubuntu.vdi ubuntu.img
This will create the Ubuntu image file
Install Image File to target drive
Caution: The target drive will be overwritten.
For using Etcher or Rufus to flash an image to HDD see: https://askubuntu.com/a/1333112/43926