qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Hahn <hahn@univention.de>
To: qemu-devel@nongnu.org
Subject: "Instant clone" with Qemu?
Date: Tue, 5 Dec 2023 10:52:39 +0100	[thread overview]
Message-ID: <9447a47d-751c-4913-a60b-8d92f87f2998@univention.de> (raw)

Hello,

by accident I stumbled over "VMware Instant Clone" ¹, which allows 
cloning of running VMs by copy-on-write-sharing the disk images and 
memory content; the network MAC address gets changed (or a different 
bridge is used?).
I wonder if something similar can also be done with Qemu? My current 
solution would be to:
- start and install the VM
- create a live-snapshot into the qcow2 file
- clone the disk image, e.g. put a qcow2 overlay on it per clone
- start and restore the clones from that live-snapshot
- put the clones in individual bridges and let the host do some network 
address translation (NAT) to give each clone a unique external IP address.

Has someone done something similar or is there even a better alternative?

Background: our test suite currently provisions a set of multiple VMs, 
which are dependent on each other. Provisioning them takes sometimes 
many hours. After that the test suite runs inside these VMs and again 
takes many hours.
I'd like to speed that up by parallelizing these tests, e.g.
1. setup the VM environment once
2. clone the VM environments as the resources allow
3. distribute tests over these environments to run in parallel and to 
allow running flaky tests multiple times from a clean clone again

¹<https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-853B1E2B-76CE-4240-A654-3806912820EB.html>
-- 
Philipp Hahn
Open Source Software Engineer

Univention GmbH
Mary-Somerville-Str. 1
28359 Bremen
Germany | Deutschland
Phone: +49 (0)421 22232-0 | E-Mail: info@univention.de

https://www.univention.de | https://www.univention.com

Managing Directors: Peter H. Ganten, Stefan Gohmann
Local court: Amtsgericht Bremen
HRB 20755 | Ust-ID: DE220051310


             reply	other threads:[~2023-12-05  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  9:52 Philipp Hahn [this message]
2023-12-05 14:44 ` "Instant clone" with Qemu? Stefan Hajnoczi
2023-12-15 11:00   ` Philipp Hahn
2023-12-15 15:21     ` Stefan Hajnoczi
2023-12-18  7:36       ` Philipp Hahn
2023-12-18 14:18         ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9447a47d-751c-4913-a60b-8d92f87f2998@univention.de \
    --to=hahn@univention.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).