Hi,
I'm searching how to create multiple virtual box machines all based on a same read only disk. Each machine would just store the difference. I know qemu can do that, I guess it is also possible with virtualbox, but I couldn't find how.
What I'm trying to do is to have the basic system (in my case i plan to install WindowsXP) unchanged on a read only disk. And create a separate virtual machine for each application I want to use on Windows. That way, different applications have no chance to conflict together.
It seems that immutable image disks are more or less the solution, unfortunately it doesn't seems possible to save the difference between the immutable image and the current state in a file for when the virtual machine is halted. So if for example, a new software requires rebooting, it won't work since after reboot the previous state will be reverted :/
I tried to achieve that using snapshots, but it seems that I can't just run a previous snapshot without reverting the following snapshots. If you have a solution to that, I'm still open to it.
Thanks.
Mildred
Multiple disks/snapshots all based on the same disk/snapshot
-
mildred593
- Posts: 4
- Joined: 27. Oct 2008, 19:03
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Currently VBox does not allow you to "branch" with snapshots, and snapshots are the only kind of differenced disk the software currently supports.
You can however create full clones of the root VDI. This provides a way to implement branching, but of course it takes more disk space than a differenced disk feature would. On the other hand it is more robust - there is no way to lose a whole family of VMs by destroying a single (root) VDI file (though of course, backups could fix that). Also the clones are independant and hence it remains possible to update the root VDI after children have been created (eg. when Microsoft issues a new security patch).
There are a lot of pros and cons to this discussion, too many to go into in one message.
You can however create full clones of the root VDI. This provides a way to implement branching, but of course it takes more disk space than a differenced disk feature would. On the other hand it is more robust - there is no way to lose a whole family of VMs by destroying a single (root) VDI file (though of course, backups could fix that). Also the clones are independant and hence it remains possible to update the root VDI after children have been created (eg. when Microsoft issues a new security patch).
There are a lot of pros and cons to this discussion, too many to go into in one message.
-
mildred593
- Posts: 4
- Joined: 27. Oct 2008, 19:03
Perhaps .... Will this be implemented at some point?
And, it seems it is possible to branch disks. I successfully did it once (but I can't reproduce it). Then i thought that making snapshots over immutable disks would solve my problem, but not at all.
Do you know how to reproduce this branching shown in this screenshoot?


And, it seems it is possible to branch disks. I successfully did it once (but I can't reproduce it). Then i thought that making snapshots over immutable disks would solve my problem, but not at all.
Do you know how to reproduce this branching shown in this screenshoot?


-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Perhaps selecting the upper snapshot and make it boot that snapshot? Have you tried that?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
mildred593
- Posts: 4
- Joined: 27. Oct 2008, 19:03
I guess I was only been able to do that because of a bug in the VirtualBox interface ... I can't reproduce it. If I try to associate a machine with the disk that forks, I can only associate it with the root disk (not the children, the snapshots). And if I do so, I can't remove the machine (an errors tells me that it can't dissociate the disk). The solution I had was to delete the machine files, and then the machine from the interface.
My last chance, edit by hand the file ~/.VirtualBox/VirtualBox.xml ... But I don't know if I'll succeed, there are UUIDs everywhere ...
Why can't it be simple?
My last chance, edit by hand the file ~/.VirtualBox/VirtualBox.xml ... But I don't know if I'll succeed, there are UUIDs everywhere ...
Why can't it be simple?
-
mildred593
- Posts: 4
- Joined: 27. Oct 2008, 19:03
Related issues:
http://www.virtualbox.org/ticket/46
http://www.virtualbox.org/ticket/1918
The trick could be instead to have an immutable base image. Then create many virtual machines using this immutable disk. The problem is that when the machine is powered off, the current state for that immutable drive is lost.
So instead of shutting down the machine, we could simply reboot it, then when the OS just stopped and within the BIOS, pause the machine, take a snapshot and power it off. At that point the modifications done on the hard disk are in the snapshot, but are not in the current state, so just revert the current status to the last snapshot and you're done.
A but tricky, I'll admit.
I figured this out reading the issue #1918
Perhaps this feature could be added without much effort, it seems to be just a 'problem' in the front-end.
Mildred
http://www.virtualbox.org/ticket/46
http://www.virtualbox.org/ticket/1918
The trick could be instead to have an immutable base image. Then create many virtual machines using this immutable disk. The problem is that when the machine is powered off, the current state for that immutable drive is lost.
So instead of shutting down the machine, we could simply reboot it, then when the OS just stopped and within the BIOS, pause the machine, take a snapshot and power it off. At that point the modifications done on the hard disk are in the snapshot, but are not in the current state, so just revert the current status to the last snapshot and you're done.
A but tricky, I'll admit.
I figured this out reading the issue #1918
Perhaps this feature could be added without much effort, it seems to be just a 'problem' in the front-end.
Mildred