Received: from eggs.gnu.org ([2001:4830:134:3::10]:40332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK8Kx-0002qq-JD for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK8Kt-0002hZ-DJ for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:06:43 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:32924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK8Kt-0002gy-1x for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:06:39 -0400 Received: by padck2 with SMTP id ck2so72768307pad.0 for ; Tue, 28 Jul 2015 10:06:38 -0700 (PDT) Received: from [192.168.0.21] ([116.33.30.134]) by smtp.gmail.com with ESMTPSA id ti10sm36386537pab.20.2015.07.28.10.06.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Jul 2015 10:06:37 -0700 (PDT) From: =?euc-kr?B?x9G4uMG+?= Content-Type: multipart/alternative; boundary="Apple-Mail=_B7577607-A208-4591-847F-18FE66B6D287" Message-Id: <4A7D0474-7DAE-47F3-8ABA-8EE21036BA20@gmail.com> Date: Wed, 29 Jul 2015 02:06:33 +0900 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Apple-Mail=_B7577607-A208-4591-847F-18FE66B6D287 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, I'm facing a weird behavior when I used the one disk image file on 2 = virtual machines at the same time. I made the instance of a virtual machine, using the below command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm When the OS(Ubuntu 14.04 64bit) was booted up, I made an another one, = using the same command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm Then, I had 2 virtual machines using the same disk image file. When I made a directory on first virtual machine, using the command like = below. $ mkdir test1 The "test1" directory wasn't showed on another virtual machine. And, I = made a directory on second virtual machine, using the command like = below. $ mkdir test2 The "test2" directory wasn't showed on another virtual machine, either. Then, I shut the all virtual machines down. I tried to mount the disk = image file on my host machine. $ sudo modprobe nbd $ sudo qemu-nbd -c /dev/nbd0 ./10G.qcow2 $ sudo mount /dev/nbd0p1 /mnt/10G Then, I checked what the file is showed. The result was that "test2" = directory was only showed. Where is the "test1" directory? This is the weird behavior on my test. Before my test, I created a disk image file and installed the OS on the = disk image, using the commands like below. $ qemu-img create -f qcow2 -o preallocation=3Dmetadata 10G.qcow2 10G $ qemu-system-x86_64 -smp 2 -m 2048 -hda 10G.qcow2 -cdrom = ../iso/ubuntu-1404.2-desktop-x86_64.iso -enable-kvm= --Apple-Mail=_B7577607-A208-4591-847F-18FE66B6D287 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Hi,

I'm facing a weird behavior when I = used the one disk image file on 2 virtual machines at the same = time.

I made the instance of a virtual = machine, using the below command.
$ = qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 = -enable-kvm

When the OS(Ubuntu 14.04 64bit) = was booted up, I made an another one, using the same = command.
$ qemu-system-x86_64 -smp 2 -m = 1024 -hda 10G.qcow2 -enable-kvm

Then, I had 2 virtual machines = using the same disk image file.

When I made a directory on first = virtual machine, using the command like below.
$ = mkdir test1

The "test1" directory wasn't = showed on another virtual machine. And, I made a directory on second = virtual machine, using the command like below.
$ = mkdir test2

The "test2" directory wasn't = showed on another virtual machine, either.

Then, I shut the all virtual = machines down. I tried to mount the disk image file on my host = machine.
$ sudo modprobe = nbd
$ sudo qemu-nbd -c /dev/nbd0 = ./10G.qcow2
$ sudo mount /dev/nbd0p1 = /mnt/10G

Then, I checked what the file is = showed. The result was that "test2" directory was only = showed.

Where is the "test1" directory? = This is the weird behavior on my test.

Before my test, I created a disk = image file and installed the OS on the disk image, using the commands = like below.

$ qemu-img create -f qcow2 -o = preallocation=3Dmetadata 10G.qcow2 10G
$ = qemu-system-x86_64 -smp 2 -m 2048 -hda 10G.qcow2 -cdrom = ../iso/ubuntu-1404.2-desktop-x86_64.iso = -enable-kvm
= --Apple-Mail=_B7577607-A208-4591-847F-18FE66B6D287--