From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK7G1-0004jt-VE for qemu-devel@nongnu.org; Tue, 28 Jul 2015 11:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK7G0-00012A-Sg for qemu-devel@nongnu.org; Tue, 28 Jul 2015 11:57:33 -0400 Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:33574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK7G0-000120-OK for qemu-devel@nongnu.org; Tue, 28 Jul 2015 11:57:32 -0400 Received: by igbpg9 with SMTP id pg9so142978181igb.0 for ; Tue, 28 Jul 2015 08:57:30 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 29 Jul 2015 00:57:30 +0900 Message-ID: From: Manjong Han Content-Type: multipart/alternative; boundary=089e01184b0c128cf1051bf18745 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 --089e01184b0c128cf1051bf18745 Content-Type: text/plain; charset=UTF-8 Hi, I was 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 same command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm Then, I had 2 virtual machines, using 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 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 another virtual machine, too. 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 $ sudo mount /dev/nbd0p1 /mnt/10G Then, I checked what the file is showed. The result was that "test2" directory only lived. 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=metadata 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 --089e01184b0c128cf1051bf18745 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I was 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 be= low command.
$ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -= enable-kvm

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

Then, I had 2 virtual machines, using same disk image file.
When I made a directory on first virtual machine, using the co= mmand like below.
$ mkdir test1

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

The "test2" direct= ory wasn't showed another virtual machine, too.

Then, I shut the all virtual machines down. I tried to mount the disk ima= ge file on my host machine.
$=C2=A0sudo modprobe nbd
$= =C2=A0sudo qemu-nbd -c /dev/nbd0
$=C2=A0sudo mount /dev/nbd0p1 /m= nt/10G

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

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

Before my test, I created a disk ima= ge file and installed the OS on the disk image, using the commands like bel= ow.
$=C2=A0qemu-img create -f qcow2 -o preallocation=3Dmetadata 1= 0G.qcow2 10G
$=C2=A0qemu-system-x86_64 -smp 2 -m 2048 -hda 10G.qc= ow2 -cdrom ../iso/ubuntu-1404.2-desktop-x86_64.iso -enable-kvm
--089e01184b0c128cf1051bf18745--