1 |
On 17 June 2020 19:01:54 CEST, Michael <confabulate@××××××××.com> wrote: |
2 |
>On Wednesday, 17 June 2020 07:32:10 BST J. Roeleveld wrote: |
3 |
>> On Wednesday, June 17, 2020 7:42:30 AM CEST n952162 wrote: |
4 |
>> > On 06/17/20 06:48, J. Roeleveld wrote: |
5 |
>> > > On Tuesday, June 16, 2020 11:08:23 PM CEST n952162 wrote: |
6 |
>> > >> On 06/16/20 22:36, J. Roeleveld wrote: |
7 |
>> <snipped> |
8 |
>> |
9 |
>> > > I have not come across MS HyperV outside of small businesses that |
10 |
>need |
11 |
>> > > some |
12 |
>> > > local VMs. These companies tend to put all their infrastructure |
13 |
>with one |
14 |
>> > > of |
15 |
>> > > the big cloud-VM providers (Like AWS, Azure, Googles,...) |
16 |
>> > > |
17 |
>> > > -- |
18 |
>> > > Joost |
19 |
>> > |
20 |
>> > Thank you for this excellent survey/summary. It tells me that vbox |
21 |
>is |
22 |
>> > good for my current usages, but I should start exposing myself to |
23 |
>Xen as |
24 |
>> > a possible migration path. |
25 |
>> |
26 |
>> I would actually suggest to read up on both Xen and KVM and try both |
27 |
>on |
28 |
>> spare machines. |
29 |
>> See which best fits your requirements and also see if the existing |
30 |
>> management tools actually do things in a way that you can work with. |
31 |
>> |
32 |
>> My systems have evolved over the past 25-odd years and I started |
33 |
>using Xen |
34 |
>> to reduce the amount of physical systems I had running. At the time, |
35 |
>VMWare |
36 |
>> was expensive, KVM didn't exist yet and was missing some important |
37 |
>features |
38 |
>> for a few years after it appeared (not sure if this exists yet, not |
39 |
>found |
40 |
>> anything about it on KVM): |
41 |
>> - limit memory footprint of host-VM during boot. |
42 |
>> - Dedicate CPU-core(s) to the host |
43 |
>> |
44 |
>> Limiting the memory size is important, because there are several |
45 |
>parts of |
46 |
>> the kernel (and userspace) that base their memory-settings on this |
47 |
>amount. |
48 |
>> This is really noticable when the host thinks it has 384GB available |
49 |
>when |
50 |
>> 370GB is passed to VMs. |
51 |
>> |
52 |
>> Dedicating CPU-cores exclusively to the host means the host will |
53 |
>always have |
54 |
>> CPU-resources available. This is necessary because all the |
55 |
>> context-switching is handled by the host and if this stalls, the |
56 |
>whole |
57 |
>> environment is impacted. |
58 |
>> |
59 |
>> For a lab-system, I was also missing the ability to save the full |
60 |
>state of a |
61 |
>> VM for a snapshot. All the howto's and guides I can find online only |
62 |
>talk |
63 |
>> about making a snapshot of the disks. Not of the memory as well. |
64 |
>Especially |
65 |
>> when used to Virtualbox, you will notice this issue. When only |
66 |
>snapshotting |
67 |
>> the disk, your snapshot is basically the state of when you literally |
68 |
>pulled |
69 |
>> the plug of your VM if you want to restore back to this. |
70 |
>> |
71 |
>> For KVM, I have found a few hints that this was planned. But I have |
72 |
>not |
73 |
>> found anything about this. Virt-manager does not (last time I looked) |
74 |
>> support Xen's functionality of storing the memory when creating |
75 |
>snapshots |
76 |
>> either. Which is why I don't use that even for my lab/testing-server. |
77 |
> |
78 |
>As far as I know QEMU with KVM can take snapshots of the current state |
79 |
>of RAM, |
80 |
>disk(s), CPU - it can take snapshots of images while online. |
81 |
> |
82 |
>https://wiki.qemu.org/Features/Snapshots2 |
83 |
|
84 |
Can you point to where in the commands above the memory anf cpu state is actually stored and loaded back when reverting to the snapshot? |
85 |
From what I see, it is only fhe disk image. |
86 |
I really need this feature for lab environments where I need the ability to fully roll back to a running instance. |
87 |
|
88 |
|
89 |
>However, I've only taken snapshots of qcow2 images after I shut down |
90 |
>the VM. |
91 |
>These work as advertised and they are quite handy before major updates/ |
92 |
>upgrades as temporary backups. |
93 |
> |
94 |
> |
95 |
>> As for tips/tricks (below works for Xen, but should also work with |
96 |
>KVM): |
97 |
>> |
98 |
>> The way I create a new Gentoo-VM is simply to create a new |
99 |
>block-device |
100 |
>> (Either LVM or ZFS), do all the initial steps in the chroot from the |
101 |
>host |
102 |
>> and when it comes to the first-reboot, umount the filesystems, hook |
103 |
>it up |
104 |
>> to a new VM and start that. |
105 |
>> |
106 |
>> Because of this, I can update the host as follows: |
107 |
>> - create new "partitions" for the host-system. |
108 |
>> - Install the latest versions, migrate the config across |
109 |
>> - reboot into the new host. |
110 |
>> |
111 |
>> If all goes fine, I can clean up the "old" partitions and prepare |
112 |
>them for |
113 |
>> next time. If there are issues, I have a working "old" version I can |
114 |
>quickly |
115 |
>> revert to. |
116 |
>> |
117 |
>> -- |
118 |
>> Joost |
119 |
> |
120 |
>I've wanted to migrate a qemu qcow2 image file or two of different OS', |
121 |
>all |
122 |
>currently stored on an ext4 partition on my desktop, to a dedicated |
123 |
>partition |
124 |
>on the disk. Would this be possible - how? Would I need to change the |
125 |
>qcow2 |
126 |
>to a raw image? |
127 |
|
128 |
I don't know. One of the reasons I dislike file based images is the lack of transparency and tools. LVM is much simpler for disk based snapshots and management. |
129 |
|
130 |
-- |
131 |
Joost |
132 |
|
133 |
|
134 |
|
135 |
-- |
136 |
Sent from my Android device with K-9 Mail. Please excuse my brevity. |