qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time
@ 2015-07-28 15:57 Manjong Han
  2015-07-29  8:46 ` Stefan Hajnoczi
  0 siblings, 1 reply; 9+ messages in thread
From: Manjong Han @ 2015-07-28 15:57 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1851 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time
@ 2015-07-28 16:45 Manjong Han
  0 siblings, 0 replies; 9+ messages in thread
From: Manjong Han @ 2015-07-28 16:45 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

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
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=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

[-- Attachment #2: Type: text/html, Size: 2671 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time
@ 2015-07-28 17:06 한만종
  2015-07-28 21:40 ` Eric Blake
  0 siblings, 1 reply; 9+ messages in thread
From: 한만종 @ 2015-07-28 17:06 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

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=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

[-- Attachment #2: Type: text/html, Size: 6621 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-31 12:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 15:57 [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time Manjong Han
2015-07-29  8:46 ` Stefan Hajnoczi
2015-07-29 11:34   ` Kashyap Chamarthy
2015-07-29 17:29   ` Manjong Han
2015-07-29 17:46     ` John Snow
2015-07-31 12:27       ` Christopher Covington
  -- strict thread matches above, loose matches on Subject: below --
2015-07-28 16:45 Manjong Han
2015-07-28 17:06 한만종
2015-07-28 21:40 ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).