qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Using the one disk image file on 2 virtual machines at


From: Manjong Han
Subject: Re: [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time
Date: Thu, 30 Jul 2015 02:29:14 +0900

Thanks, Stefan.

2015-07-29 17:46 GMT+09:00 Stefan Hajnoczi <address@hidden>:
>
> You should probably use qcow2 backing files instead:
>
>   10G.qcow2 <-- vm001.qcow2
>             ^-- vm002.qcow2
>
> The command to create these files is:
>
>   qemu-img create -f qcow2 -o backing_file=10G.qcow2 vm001.qcow2.
>
> Both VMs share the data in 10G.qcow2.  All writes go to vm001.qcow2 or
> vm002.qcow2, respectively, so they don't corrupt each other.
>

I tried to create a backing files, using the commands which you told.

$ qemu-img create -f qcow2 -o backing_file=10G.qcow2 vm001.qcow2
$ qemu-img create -f qcow2 -o backing_file=10G.qcow2 vm002.qcow2

And, I used these backing files on each virtual machines.
But, new files weren't written on original disk image(10G.qcow2)..
The backing files were working each other.

> Standard file systems (ext4, xfs) and volume managers (LVM) are not
> cluster-aware by default.  They must only be accessed from one machine
> at a time.  Otherwise you risk data corruption.
>

I think that I must probably use a shared file system like NFS..



reply via email to

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