Hello!
I create a lot of linked clones of machine with normal HDD on a same host system simultaneously. Every machine makes some calculations and writes data on "their own" HDD (I do not clone HDD, just use linked clones default behaviour). Is it needed to use multi-attach HDD or normal HDD is safe enough? Do I need to create multi-attache device manualy and add it to every created linked clone?
Linked clones by definition don't use a normal hdd, they work like branching snapshots each with their own a difference file. Even the original VM is converted to this mode when you create a linked clone from it. The original base hdd is frozen.
So the question about multi-attach is misplaced. In any case I don't regard any form of differencing scheme as "safe", so your question is moot.
Thanks, mpack!
As I understood, simultaneously writings on HDD of clones do not conflict and do not affect HDD of the "main" guest (guest system for cloning). Am I right?
The base hdd of the original VM is treated as read-only and every VM writes changes to a difference file.
I'm curious why you would think this is a good idea. Any engineer will glance once and shriek in horror. Whatever you think the advantage is, I'll bet you're wrong.
>>>Whatever you think the advantage is, I'll bet you're wrong.
Why? I create some kind of automated test system based on virtualbox and python API. For that purpose I have one "main" guest as pattern for cloning. The main guest is changed only for updates of virtualbox additionals (and of course tests are not running at this moment). Also I have to run about two thousands heavy tests per day, and every test need to have "clear" machine state with some specific settings on start. Linked clone looks good enough for this task, because it is pretty simple, fast and I can run tests simultaneously. Isn't it?
You can't just update the "main guest" because it too is now behaving like a linked clone - the base VDI is frozen, even for the original VM.
I used to think there might be an advantage if all of the offshoots were short lived, however that also neglects the point that creating a linked clone of a base VM permanently alters the base VM.
Even besides that, were you assuming that updating the base VDI would update all of the guests as well? It won't, instead it would almost certainly corrupt them all.
There is no (writeable) shared disk scheme that allows you to update multiple guests at once. The closest is a network of independant clones getting updates "pushed" to them by the network.
Seems it is my mistake. I did not write that my automated system unregisters and removes linked clones after every test. Of course system creates linked clones before every test again. I do not allow to live clones permanently, be cause tests need "clear" system.
When system does upgrade of "main" guests, it stops, unregisters (with cleanupMode 'FULL') and removes all stuff of linked clones. Also I can not use preinstalled virtual machines with needed snapshots. System do not know on which systems(about 25 different systems: Linux/FreeBSD/Solaris/WinX) it will have to run tests beforehand (and how many tests for particular systems).