Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] {OT} Allow work from home?
Date: Wed, 20 Jan 2016 06:25:02
Message-Id: 2935607.oOjjTg2Dcx@andromeda
In Reply to: Re: [gentoo-user] {OT} Allow work from home? by lee
1 On Tuesday, January 19, 2016 11:22:02 PM lee wrote:
2 > "J. Roeleveld" <joost@××××××××.org> writes:
3 > > [...]
4 > > If disk-space is considered too expensive, you could even have every VM
5 > > use
6 > > the same base image. And have them store only the differences of the disk.
7 > > eg:
8 > > 1) Create a VM
9 > > 2) Snapshot the disk (with the VM shutdown)
10 > > 3) create a new VM based on the snapshot
11 > >
12 > > Repeat 2 and 3 for as many clones you want.
13 > >
14 > > Most installs don't change that much when dealing with standardized
15 > > desktops.
16 > How does that work? IIUC, when you created a snapshot, any changes you
17 > make to the snapshotted (or how that is called) file system are being
18 > referenced by the snapshot which you can either destroy or abandon.
19 > When you destroy it, the changes you made are being applied to the
20 > file system you snapshotted (because someone decided to use a very
21 > misleading terminology), and when you abandon it, the changes are thrown
22 > away and you end up with the file system as it was before the snapshot
23 > was created.
24 >
25 > In any case, you do not get multiple versions (which only reference the
26 > changes made) of the file system you snapshotted but only one current
27 > version.
28 >
29 > Do you need to use a special file system or something which provides
30 > this kind of multiple copies when you make snapshots?
31
32 I use LVM for this.
33
34 Steps are simple:
35 1) Create a LV (lv_1)
36 2) Create and install a VM using this LV (lv_1)
37 3) Stop the VM
38 4) Create multiple snapshots based on lv_1 (slv_1a, slv_1b, ......)
39 5) Create multiple VMs using the snapshots (vm1a -> slv_1a, vm1b,
40 slv_1b,.....)
41
42 Start the VMs
43
44 This way you can overcommit on the actual diskspace as only changes are taking
45 up diskspace.
46 If you force everyone on the same base-image, the differences should not be too
47 large.
48
49 If you also force users to store files on a shared filesystem, it shouldn't be
50 too much of a difficulty to occasionally move everyone to a new base-image when
51 the updates are causing the snapshots to grow too much.
52
53 --
54 Joost

Replies

Subject Author
Re: [gentoo-user] {OT} Allow work from home? lee <lee@××××××××.de>