From: Manjong Han <aksmj8855@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time
Date: Wed, 29 Jul 2015 00:57:30 +0900 [thread overview]
Message-ID: <CAF9qyp+oiDvjTP=9-fe6SYYMzkX4wmnKBfXb2e9p-M3v-wBnJQ@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2015-07-28 15:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 15:57 Manjong Han [this message]
2015-07-29 8:46 ` [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAF9qyp+oiDvjTP=9-fe6SYYMzkX4wmnKBfXb2e9p-M3v-wBnJQ@mail.gmail.com' \
--to=aksmj8855@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).