qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] migration: allow private destination ram with x


From: Peng Tao
Subject: Re: [Qemu-devel] [PATCH] migration: allow private destination ram with x-ignore-shared
Date: Fri, 14 Jun 2019 14:41:05 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1



On 2019/6/14 14:35, Peng Tao wrote:
By removing the share ram check, qemu is able to migrate
to private destination ram when x-ignore-shared capability
is on. Then we can create multiple destination VMs based
on the same source VM.

This changes the x-ignore-shared migration capability to
work similar to Lai's original bypass-shared-memory
work(https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg00003.html)
which enables kata containers (https://katacontainers.io)
to implement the VM templating feature.

An example usage in kata containers(https://katacontainers.io):
1. Start the source VM:
    qemu-system-x86 -m 2G \
      -object 
memory-backend-file,id=mem0,size=2G,share=on,mem-path=/tmpfs/template-memory \
      -numa node,memdev=mem0
2. Stop the template VM, set migration x-ignore-shared capability,
    migrate "exec:cat>/tmpfs/state", quit it
3. Start target VM:
    qemu-system-x86 -m 2G \
      -object 
memory-backend-file,id=mem0,size=2G,share=off,mem-path=/tmpfs/template-memory \
      -numa node,memdev=mem0 \
      -incoming defer
4. connect to target VM qmp, set migration x-ignore-shared capability,
migrate_incoming "exec:cat /tmpfs/state"
5. create more target VMs repeating 3 and 4

FYI, corresponding kata pull request is posted at https://github.com/kata-containers/runtime/pull/1799

Cheers,
Tao
--
Into something rich and strange.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]