Lets say you deleted your VM (by accident or not) but now you want to restore it. Its pretty easy to do unless you selected the option “Remove image files from storage” when you deleted the VM.
To delete a VM:
From Oracle VM Manager, on the Virtual Machines tab, select the VM you would like to delete and from the “More Actions” drop down list and click on the “Go” button. The following confirmation screen will appear:
If you don’t want to clean up the image files from the VM Server manually, select “Remove image files from storage” and click on the delete button.
To clean up the files manually ssh to your Oracle VM Server, go to the /OVS/running_pool and delete it:
[root@ ~]# cd /OVS/running_pool/
[root@ running_pool]# ls
15_RC0001 22_RC0002 28_RC0003
[root@ running_pool]# cd 28_RC0003/
[root@ 28_RC0003]# ls -alrt
-rw-rw-rw- 1 root root 351 Aug 14 08:05 vm.cfg
drwxrwxrwx 5 root root 4096 Aug 14 08:05 ..
drwxrwxrwx 2 root root 4096 Aug 14 08:05 .
-rw-rw-rw- 1 root root 1025507328 Aug 14 08:07 System.img
[root@ 28_RC0003]# cd ..
[root@ running_pool]# rm –rf 28_RC0003
To restore a VM:
For any number of reasons you decide that you want to restore a previously deleted VM. If you didn’t select the “Remove image files from storage” option and you didn’t clean up the files manually, your VM is still on the VM Server. If the VM is no longer on disk then you’ll need to restore from tape and place it back in the /OVS/running_pool directory. (Hopefully you backed it up!)
Login to Oracle VM Manager, goto the Resources tab and select Virtual Machine Images.
Click on the Import button:
Select the second option, Select from Server Pool (Discover and register) and click on Next:
In the Virtual Machine Image Name drop down you should see you VM which is same name as the directory the VM is stored in in /OVS/running_pool. Select and fill in the other fields and click on the Next button. You will be shown a confirmation page, review the screen and click on the Confirm button. At which point you’ll be back to the Virtual Machine Images entry page:
Click on the Approve button. You will be shown another confirmation page, click on the Confirm button.
You should now see the VM in a powered off state. Click the Power On button and you should be good to go!