Thursday, 31 August 2017

ubuntu - Make an existing VM immutable


With XP security support coming to an end, but needing to use some software that will only run under XP (and some other software that just needs windows) I'd like to make my XP VM a bit more secure.


I've done quite a few things (disabling unnecessary services, avoiding admin logon where possible, installing avg, firefox with noscript etc. if web is needed), but I'd like a clean copy that I can easily roll back from - or run to work on my data.


I've cloned the VM (so I can have a version that keeps the antivirus up to date), but would like to set one copy to an immutable HDD. I don't see any options for doing that, and everything on the web that I've found is several versions old and has more problems than solutions. I would have thought this was a fairly common topic at the moment. My host is Ubuntu Precise.


By "immutable" I use the term as I understand it from the virtualbox documentation I've read: a disk which is read-only, i.e. changes to that disk are discarded when the session is closed. This means that rather than taking a copy of a clean copy to restore it to a known state all I have to do is boot it.


As an aside or a point of reference I've seem something similar on internet cafe machines, where when your time is up the guest OS restores to a clean state for the next user, but there you never get anywhere near the host.



Answer



This works for me:



  1. Halt the VM if it's running.

  2. Open the "Storage" settings for the VM where the HDD image is attached. Detach the image.

  3. From the VM Virtualbox Manager window, select File->Virtual Media Manager.

  4. In the media manager window, select the hard drive image that you want to change.

  5. Select the "Modify" button, or right-click on the image and select "Modify...". Change the image to immutable and click "OK".

  6. Return to the storage settings for the VM and re-attach the HDD image to the VM.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...