All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount
@ 2012-07-21 23:45 Kevin Shanahan
  2012-07-22  0:04 ` [Qemu-devel] [Bug 1027525] " Kevin Shanahan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Kevin Shanahan @ 2012-07-21 23:45 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When issuing a "change" command via the monitor, qemu is unable to open
the iso file if it is mounted on a read-only nfs share. If I mount read-
write (and make sure the file is writable by the qemu process), then the
change command succeeds. Note that this doesn't affect media specified
on the command line when starting qemu, only when changing via the
monitor.

To reproduce, mount cd images directory read only, e.g.

[root@kvmhost0 ~]# grep iso /etc/fstab
10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

Start qemu with minimal options, just need access to the monitor:

[root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

Connect to the monitor and issue a change command:

(qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

Re-mount the iso directory read-write and notice that the command
succeeds:

[root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

(qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
(qemu)

[root@kvmhost0 ~]# kvm --version
QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
[root@kvmhost0 ~]# uname -a
Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  New

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

* [Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount
  2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
@ 2012-07-22  0:04 ` Kevin Shanahan
  2012-08-02  1:15 ` Kevin Shanahan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Kevin Shanahan @ 2012-07-22  0:04 UTC (permalink / raw)
  To: qemu-devel

I ran strace while running the test and I see few times:

open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso", O_RDONLY|O_NONBLOCK) = 12
fstat(12, {st_mode=S_IFREG|0666, st_size=717533184, ...}) = 0
close(12)

But the final open looks like this:

open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso",
O_RDWR|O_DSYNC|O_CLOEXEC) = -1 EROFS (Read-only file system)

For some reason, the O_RDRW flag was requested.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  New

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

* [Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount
  2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
  2012-07-22  0:04 ` [Qemu-devel] [Bug 1027525] " Kevin Shanahan
@ 2012-08-02  1:15 ` Kevin Shanahan
  2012-08-02  1:16 ` Kevin Shanahan
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Kevin Shanahan @ 2012-08-02  1:15 UTC (permalink / raw)
  To: qemu-devel

Looks like the read_only flag in the block device state never gets set.
This needs to be set otherwise qmp_change_blockdev tries to open the
device read only. This patch works for me.

** Patch added: "Proposed fix"
   https://bugs.launchpad.net/qemu/+bug/1027525/+attachment/3245422/+files/cdroms-are-read-only.patch

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  New

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

* [Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount
  2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
  2012-07-22  0:04 ` [Qemu-devel] [Bug 1027525] " Kevin Shanahan
  2012-08-02  1:15 ` Kevin Shanahan
@ 2012-08-02  1:16 ` Kevin Shanahan
  2016-11-30 16:36 ` Thomas Huth
  2017-01-30  4:17 ` Launchpad Bug Tracker
  4 siblings, 0 replies; 6+ messages in thread
From: Kevin Shanahan @ 2012-08-02  1:16 UTC (permalink / raw)
  To: qemu-devel

Of course, I mean "qmp_change_blockdev tries to open the device read-
write".

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  New

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

* [Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount
  2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
                   ` (2 preceding siblings ...)
  2012-08-02  1:16 ` Kevin Shanahan
@ 2016-11-30 16:36 ` Thomas Huth
  2017-01-30  4:17 ` Launchpad Bug Tracker
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2016-11-30 16:36 UTC (permalink / raw)
  To: qemu-devel

Can you still reproduce this problem with the latest version of QEMU? If
so, could you please refresh your patch and send it to the qemu-devel
mailing list? (we do not accept patches from the bug tracker)

** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  Incomplete

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

* [Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount
  2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
                   ` (3 preceding siblings ...)
  2016-11-30 16:36 ` Thomas Huth
@ 2017-01-30  4:17 ` Launchpad Bug Tracker
  4 siblings, 0 replies; 6+ messages in thread
From: Launchpad Bug Tracker @ 2017-01-30  4:17 UTC (permalink / raw)
  To: qemu-devel

[Expired for QEMU because there has been no activity for 60 days.]

** Changed in: qemu
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1027525

Title:
  Unable to insert cd media located on ro nfs mount

Status in QEMU:
  Expired

Bug description:
  When issuing a "change" command via the monitor, qemu is unable to
  open the iso file if it is mounted on a read-only nfs share. If I
  mount read-write (and make sure the file is writable by the qemu
  process), then the change command succeeds. Note that this doesn't
  affect media specified on the command line when starting qemu, only
  when changing via the monitor.

  To reproduce, mount cd images directory read only, e.g.

  [root@kvmhost0 ~]# grep iso /etc/fstab
  10.48.50.20:/iso /srv/kvm/iso nfs4 defaults,ro 0 0

  Start qemu with minimal options, just need access to the monitor:

  [root@kvmhost0 ~]# kvm -vnc 127.0.0.1:0 -S

  Connect to the monitor and issue a change command:

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  Could not open '/srv/kvm/iso/ubuntu-12.04-server-amd64.iso

  Re-mount the iso directory read-write and notice that the command
  succeeds:

  [root@kvmhost0 ~]# mount -o remount,rw /srv/kvm/iso

  (qemu) change ide1-cd0 /srv/kvm/iso/ubuntu-12.04-server-amd64.iso
  (qemu)

  [root@kvmhost0 ~]# kvm --version
  QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
  [root@kvmhost0 ~]# uname -a
  Linux kvmhost0 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1027525/+subscriptions

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

end of thread, other threads:[~2017-01-30  4:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-21 23:45 [Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount Kevin Shanahan
2012-07-22  0:04 ` [Qemu-devel] [Bug 1027525] " Kevin Shanahan
2012-08-02  1:15 ` Kevin Shanahan
2012-08-02  1:16 ` Kevin Shanahan
2016-11-30 16:36 ` Thomas Huth
2017-01-30  4:17 ` Launchpad Bug Tracker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.