[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] creating VM disk with
From: |
Narcis Garcia |
Subject: |
Re: [Qemu-discuss] creating VM disk with |
Date: |
Mon, 2 May 2016 09:46:03 +0200 |
The problem can be that the operating system keeps cache of last
files/data loaded, and your template passes to second term when your
computer is working on the new VM image.
I suggest you to push the disk template to a RAM disk during these
operations, then you can be sure it's available from «your own cache».
With GNU/Linux, you can do this to get a space of 4GiB:
mkdir /tmp/vm-cache
mount -t tmpfs -o size=4g tmpfs /tmp/vm-cache
(after all operations you can free this with a simple umount)
El 29/04/16 a les 16:02, Nguyễn Thùy Linh ha escrit:
> Hello,
>
> I am working on booting a VM using qemu. My scenario: I have /n/ VMs,
> first, I boot the 1st VM completely, then boot the rest VMs at the same
> time.
>
> I found out there are two ways to create a VM disk from image:
>
> 1. using *qemu-img convert*: this command will create a disk with the
> same size of image. When VM is booted, VM use this disk to load OS.
> If I have many VMs, each VM owns an independent disk.
> 2. using *qemu-img create*: this command will create an empty VM disk.
> When VM is booted, qemu will load necessary kernel data from image
> to this disk. If I have many VMs, each VM has an empty disk.
>
> All VM disks is created from one image. What I expect is, in the 2nd
> way, when I boot the 1st VM, the image will be cached in memory, then,
> the other VMs will load image from cache. Therefore, the boot time of
> the other VMs might be faster.
>
> However, when I run this experiment, I observe that the image is not
> cached in the memory. Every VM has to read kernel data from physical
> disk (where image stored).
>
> My question is if image is cached in memory or not?
>
> Thank you,
>
> Linh Nguyen
- Re: [Qemu-discuss] creating VM disk with,
Narcis Garcia <=