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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
If you are using VirtualBox, then it is not too difficult to take a VDI and use it anywhere. Here's how:
.vdifile to a directory where VirtualBox will be able to access it
.vdifile 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.
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