Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Linux virtual machine with two disks, one is mounted as / and the other one as /home. I'd like to take a snapshot of / but not of /home so that I can later come back to a clean system and keep my data.

Is there anyway of achieving this?

share|improve this question
up vote 3 down vote accepted

After a bit more searching on the virtual box forum, I discovered that there is a type of virtual hard drives not affected by snapshots: writethrough.

To convert the disk, I first had to detach any differencing disk attached to it and then run this on the command line:

VBoxManage.exe modifyhd <path to vdi file> --type writethrough

After this, everything seems to work fine.

share|improve this answer

I don't know if there's a way to do this or not, but it's probably easier using Guest Additions to mount a folder from your host OS as /home, that way any changes to data there are unaffected by the snapshot.

share|improve this answer
that's currently my setup actually :) I currently copy my /home into a shared folder before restoring a snaphost, but it's not ideal. just wanted to see if there was a better way. – Locksfree Jun 11 '11 at 14:26
Oh--haha. I have never done this before, but why copy the contents? Does restoring the snapshot actually overwrite the contents of the folder on your host OS? If so, what happens when you disable Guest Additions before restoring the snapshot and then re-enabling them after? – jsejcksn Jun 11 '11 at 14:37
hum no it does not overwrite my host files; but it does revert my /home disk so I sync it to a shared folder first, then restore and then sync back. I am just looking for a "lazier" way :) – Locksfree Jun 11 '11 at 15:05
Thanks for your help, but I will accept my own answer after I found out how to do what I wanted last night. – Locksfree Jun 13 '11 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .