Idea: immutable base-disk images and per-VM differencing images

327 zobrazení
Přeskočit na první nepřečtenou zprávu

Mike Williams

nepřečteno,
22. 10. 2010 7:24:4122.10.10
komu: vagra...@googlegroups.com
Before discovering Vagrant, I had my own script to create VirtualBox VMs.  While it was in most ways vastly inferior to Vagrant, I did manage to speed up creation of new VMs, by sharing the base disk image.

  • I marked my base disk image as "immutable"
  • I attached the base disk image directly to new VMs, rather than making a copy first.  Being "immutable", VirtualBox creates a new copy-on-write "differencing image" for the VM.
  • Finally, I disabled "auto-reset" the new "differencing image".  When VirtualBox creates a "differencing" child of an immutable image, the default behaviour is to discard changes whenever the VM starts.  That's most definitely not what I wanted.

It seems to me like this would be a useful addition to Vagrant, and in fact, could/should be the default behaviour.  Imported box images would be marked immutable, and it would create a new "differencing" child image for each new VM.

Can anyone see any downsides to this approach?  If not, I'll have a crack at implementing it.

-- 
cheers, 
Mike Williams

Blake

nepřečteno,
22. 10. 2010 9:38:4422.10.10
komu: vagra...@googlegroups.com
I learn something new every day. This sounds like a great idea, and
would save tons of space, not just time to creation.

Blake

On Friday, October 22, 2010, Mike Williams <md...@dogbiscuit.org> wrote:
> Before discovering Vagrant, I had my own script to create VirtualBox VMs.  While it was in most ways vastly inferior to Vagrant, I did manage to speed up creation of new VMs, by sharing the base disk image.

> I marked my base disk image as "immutable"I attached the base disk image directly to new VMs, rather than making a copy first.  Being "immutable", VirtualBox creates a new copy-on-write "differencing image" for the VM.Finally, I disabled "auto-reset" the new "differencing image".  When VirtualBox creates a "differencing" child of an immutable image, the default behaviour is to discard changes whenever the VM starts.  That's most definitely not what I wanted.

Raja

nepřečteno,
22. 10. 2010 11:06:5022.10.10
komu: Vagrant


On Oct 22, 4:24 pm, Mike Williams <m...@dogbiscuit.org> wrote:
> Before discovering Vagrant, I had my own script to create VirtualBox VMs.  While it was in most ways vastly inferior to Vagrant, I did manage to speed up creation of new VMs, by sharing the base disk image.
>
> I marked my base disk image as "immutable"
> I attached the base disk image directly to new VMs, rather than making a copy first.  Being "immutable", VirtualBox creates a new copy-on-write "differencing image" for the VM.
> Finally, I disabled "auto-reset" the new "differencing image".  When VirtualBox creates a "differencing" child of an immutable image, the default behaviour is to discard changes whenever the VM starts.  That's most definitely not what I wanted.

This is interesting, can you explain how this is done? Everytime you
start up the VM, how would you provide the "differences" that were
done after the VM was created.

Thanks
Raja

Blake

nepřečteno,
22. 10. 2010 13:30:5722.10.10
komu: vagra...@googlegroups.com
Raja,
If this is indeed a copy-on-write method, then any changed blocks
would be stored in a separate file for that VM. Unchanged blocks
would remain in the original/master VM image.

Blake

Mike Williams

nepřečteno,
23. 10. 2010 5:57:0423.10.10
komu: vagra...@googlegroups.com
On 23/10/2010, at 04:30 , Blake wrote:

> Raja,
> If this is indeed a copy-on-write method, then any changed blocks
> would be stored in a separate file for that VM. Unchanged blocks
> would remain in the original/master VM image.

Precisely.

See http://www.virtualbox.org/manual/ch05.html#diffimages for details.

--
cheers,
Mike Williams

CjK

nepřečteno,
25. 10. 2010 3:37:5325.10.10
komu: Vagrant
Well I assume that one definite drawback will be reduced performance.
As "copy-on-write" implies, there will be increased disk-activity.

Claus

Sami Samhuri

nepřečteno,
25. 10. 2010 10:51:4325.10.10
komu: Vagrant
On Oct 25, 12:37 am, CjK <claus.klingb...@gmail.com> wrote:
> Well I assume that one definite drawback will be reduced performance.
> As "copy-on-write" implies, there will be increased disk-activity.

How so? Things are written to a location different from where they
were read but the same amount of data should be written.

Seeks may increase switching between the 2 files but large disk images
are going to get fragmented anyway.

-s

Mitchell Hashimoto

nepřečteno,
4. 11. 2010 0:44:4704.11.10
komu: vagra...@googlegroups.com
Mike,

Sorry it took so long to respond. This email was sent when I was out
of town and I completely forgot about it until now. This is definitely
something I will have to look into and that I'm very interested in
doing. I'll keep you up to date on what the status of this is. I don't
see any downsides to it if it works just as you described. I wasn't
even aware of this functionality!

Mitchell

Edward Evans

nepřečteno,
13. 8. 2016 14:11:1413.08.16
komu: Vagrant
Was this ever implemented and if so can you point me to any details?
Tia

Torben Knerr

nepřečteno,
13. 8. 2016 16:18:1013.08.16
komu: vagra...@googlegroups.com

Yes, see the linked clones section here:
https://www.vagrantup.com/docs/virtualbox/configuration.html

HTH, Torben


Am 13.08.2016 8:11 nachm. schrieb "Edward Evans" <ed.e...@gmail.com>:
Was this ever implemented and if so can you point me to any details?
Tia

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/dc4f7a18-7324-4615-b55f-5d153a0c889c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Evans

nepřečteno,
14. 8. 2016 20:17:4014.08.16
komu: Vagrant
Yes, indeed. Thanks so much!

Edward Evans

nepřečteno,
15. 8. 2016 13:55:1015.08.16
komu: Vagrant
Actually, I was hoping for something more like this that is for HyperV being enabled for VB.  As I understand it, the linked clones only works for multi-machine.  Am I wrong here?

On Saturday, August 13, 2016 at 3:18:10 PM UTC-5, Torben Knerr wrote:

Yes, see the linked clones section here:
https://www.vagrantup.com/docs/virtualbox/configuration.html

HTH, Torben

Am 13.08.2016 8:11 nachm. schrieb "Edward Evans" <ed.e...@gmail.com>:
Was this ever implemented and if so can you point me to any details?
Tia

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

nepřečteno,
15. 8. 2016 16:27:1915.08.16
komu: vagra...@googlegroups.com
not necesarily for multi machine

my understanding is on the 2nd and so on guest from the same template


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0ab52fb3-afd7-4d99-8611-d14a9ff52e3f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Edward Evans

nepřečteno,
15. 8. 2016 18:05:5915.08.16
komu: Vagrant
Right, but with the HyperV support, the first box uses a diff disk whereas with with the VB and linked clones only 2nd and successive use diff disk, right?



--

Alvaro Miranda Aguilera

nepřečteno,
16. 8. 2016 18:09:4716.08.16
komu: vagra...@googlegroups.com
what i understand, is with virtuabox this is what it does.

base box -> base full clone for linked clones

base -> linked clone1
base -> linked clone2

that is to ensure the linked clone are independent from the base box, since vagrant box remove <name> wont check for linked clones of base boxes.

Thats from memory from when the feature was implemented.
It should be with comments on the source code

Alvaro.

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4dc2a6d0-9d5c-4fb5-ba0b-8a4fb8c1f06d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Odpovědět všem
Odpověď autorovi
Přeposlat
0 nových zpráv