Page 1 of 1
Immutable disk image which resets even in snapshots
Posted: 16. Jan 2011, 14:53
by pepak
I prepared a temp disk, to be used with all my virtual machines. I changed its type to "immutable". The idea is that this disk should always remain as it is, with differencing images reset at every reboot. But I am confused by the documentation:
Documentation wrote:If you take a snapshot of a machine with immutable images, then on every machine power-up, those images are reset to the state of the last (current) snapshot (instead of the state of the original immutable image).
Is there any way to get rid of this behavior? That is, I
want all snapshots to reset to the state of the original immutable image.
Thanks for any insight.
Re: Immutable disk image which resets even in snapshots
Posted: 18. Jan 2011, 11:38
by mpack
The whole point of taking a snapshot is to create a moment of time that can be reverted to. What's the point of taking the snapshot if you don't want that to happen?
Re: Immutable disk image which resets even in snapshots
Posted: 18. Jan 2011, 18:03
by pepak
Thank you for your contribution. I am somewhat baffled how on Earth I managed to leave the "I need your comments on whether this is a good idea in your usage scenarios" in my post, but I do appreciate your answer.
Anyway, the point is that I want to take a snapshot of useful data. I am pretty certain I won't need the temporary files or the content of the page file in any probable future, so I would just as well not have it inside the snapshot.
Re: Immutable disk image which resets even in snapshots
Posted: 18. Jan 2011, 19:26
by mpack
You asked for a way to "get rid of this behaviour". One easy way to get rid of the behaviour is to stop asking for it to happen - which I pointed out. I'm sorry if this is too complicated for you.
You say you want to freeze the moment when the disk contains only useful data. Why doesn't the base (immutable) disk do that?
Re: Immutable disk image which resets even in snapshots
Posted: 18. Jan 2011, 19:44
by pepak
Because I have two disks: One contains the operating system and software, is of type "normal" and I want to be able to make snapshots of it. The other is for temporary files only and should remain unchanged even through snapshots.
Anyway, I would rather prefer to stop this discussion, as it is completely off-topic. I am not interested in "why", I am interested in "how". If it isn't possible, fine, I can live with that, but I don't care about flamewars regarding the question of whether it is a good idea or a bad one. And I am especially not interested in someone answering my question of "how to do X" by "don't do X, do Y instead" - I have my reasons why I want X. Thank you.
Re: Immutable disk image which resets even in snapshots
Posted: 19. Jan 2011, 11:57
by mpack
I'll take pity this once: mine is not a "do Y instead" response, it's a "your do X question seems to be based on a total misunderstanding of how X works and hence can never be answered to your satisfaction by anyone" response. I made no "Y" suggestion because the question itself seems meaningless. But, if you are unwilling to clarify then fine, I'll leave you to your own merits.
Re: Immutable disk image which resets even in snapshots
Posted: 19. Jan 2011, 12:59
by Martin
So you have a VM with two harddisks, the first type "normal" for the OS and the second type "immutable" for temporary files.
Do I understand correctly that you want to use snapshots only for the first disk and that the snapshot shouldn't care about the second disk?
Re: Immutable disk image which resets even in snapshots
Posted: 19. Jan 2011, 17:51
by pepak
Martin, that is exactly what I have and want.
Re: Immutable disk image which resets even in snapshots
Posted: 20. Jan 2011, 13:00
by raistlin majere
Re: Immutable disk image which resets even in snapshots
Posted: 20. Jan 2011, 13:37
by mpack
raistlin majere wrote:Maybe this will be of some help:
Be warned: even if the linked thread was on point - and I don't think it is - then it would still be badly obsoleted by the introduction of VirtualBox v4, which stores the media registry in a new way. Hence much of what that thread says about the content of various xml files is now wrong.
Re: Immutable disk image which resets even in snapshots
Posted: 20. Jan 2011, 16:47
by raistlin majere
You're right!
I didn't even pay attention to the version. I also had (up until today) an older version (v3) of VirtualBox, and that thread was helpful to me.
Today I installed the newest version of VirtualBox, and it's a totally different story
As far as I can see, it is possible to set a immutable disk that also applies to snapshots.
Re: Immutable disk image which resets even in snapshots
Posted: 21. Jan 2011, 17:28
by pepak
I use a similar approach (eithout export/import). But it requires that I detach and re-attach the temp disk before taking any snapshot, and I hoped I could avoid that.
As far as I can see, it is possible to set a immutable disk that also applies to snapshots.
How? That's exactly what I am looking for!