Bug 863696 - [F18] libguestfs fails to mount a disk image file(in this case qcow2) as 'root'
Summary: [F18] libguestfs fails to mount a disk image file(in this case qcow2) as 'root'
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-06 17:09 UTC by Kashyap Chamarthy
Modified: 2013-03-06 11:40 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-06 11:40:58 UTC
Embargoed:


Attachments (Terms of Use)
libvirtd.log with debug log 1 (176.24 KB, text/plain)
2012-10-06 17:10 UTC, Kashyap Chamarthy
no flags Details

Description Kashyap Chamarthy 2012-10-06 17:09:23 UTC
Description of problem:

'guestfish' fails to mount a disk image as "root" on Fedora 18. Same disk image when opened as 'non-root', mounts just fine. 

[root@moon libvirt]# guestfish --ro -i -a /export/vmimgs2/f17-base.qcow2 
libguestfs: error: could not create appliance through libvirt: Unable to read from monitor: Connection reset by peer [code=38 domain=10]
[root@moon libvirt]# 


Version-Release number of selected component (if applicable):
------------------------------------------
[root@moon libvirt]# rpm -q libvirt libguestfs ; uname -r
libvirt-0.10.2-4.fc18.x86_64
libguestfs-1.19.45-1.fc18.x86_64
3.6.0-0.rc6.git0.2.fc18.x86_64
[root@moon libvirt]# 
------------------------------------------
[Note: the above version of libvirt is compiled latest libvirt(w/ a bump in spec-file, so that local rpms can upgrade smoothly) from git (as of 6-OCT-2012), and applied Eric's blockcommit patches.)

How reproducible:
All the time

Steps to Reproduce:

1/ Just have any disk image (in this case I used a qcow2)

2/ use guestfish to access the disk-image file directly in read only mode

# guestfish --ro -i -a /export/vmimgs2/f17-base.qcow2 


Actual results:

[root@moon libvirt]# guestfish --ro -i -a /export/vmimgs2/f17-base.qcow2                                                                            
libguestfs: error: could not create appliance through libvirt: Unable to read from monitor: Connection reset by peer [code=38 domain=10]


Expected results:

Disk image should be mounted just fine, irrespective of root

Additional info:

Mounts just fine as 'non-root'

#-----------------------------------#
[kashyap@moon qemu]$  guestfish --ro -i -a /export/vmimgs2/f17-base.qcow2 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Fedora release 17 (Beefy Miracle)
/dev/sda1 mounted on /

><fs> 
#-----------------------------------#
[root@moon libvirt]# getenforce 
Permissive
[root@moon libvirt]# 
#-----------------------------------#
[root@moon libvirt]# systemctl status libvirtd.service
libvirtd.service - Virtualization daemon
          Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; disabled)
          Active: active (running) since Sat, 06 Oct 2012 22:10:49 +0530; 10min ago
        Main PID: 23344 (libvirtd)
          CGroup: name=systemd:/system/libvirtd.service
                  ├ 10756 /sbin/dnsmasq --strict-order --bind-interfaces --local=// --domain-needed --pid-file=/var/run/libvirt/network/default....
                  ├ 20158 /usr/bin/qemu-system-x86_64-oct6-git -name f17-base -S -M pc-1.2 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=...
                  └ 23344 /usr/sbin/libvirtd
.
.
.
#-----------------------------------#

Comment 1 Kashyap Chamarthy 2012-10-06 17:10:10 UTC
Created attachment 622766 [details]
libvirtd.log with debug log 1

Comment 2 Richard W.M. Jones 2012-11-23 15:39:44 UTC
[root@moon libvirt]# guestfish --ro -i -a /export/vmimgs2/f17-base.qcow2 
libguestfs: error: could not create appliance through libvirt: Unable to read from monitor: Connection reset by peer [code=38 domain=10]

I suspect this is not really anything to do with root or
non-root (since I occasionally have the same error as
non-root).  I think this is a failure of some sort in
libvirt or qemu.

Can you try to repeat the failure, adding the -v option
to the command line.

Then:

- Extract the guest name from the debug output.  It'll
  be something like <name>guestfs-SOMETHINGRANDOM</name>

- Have a look for the corresponding libvirtd log file.
  It'll be something like
  $HOME/.cache/log/libvirt/qemu/log/guestfs-SOMETHINGRANDOM.log
  Although I don't know where libvirtd puts the log file when
  it is run as root.

- Attach the whole log file to the bug.

Comment 3 Richard W.M. Jones 2013-03-06 11:40:58 UTC
Closing because no information supplied.

There have been a lot of fixes in Fedora 18 particularly
w.r.t. libvirt and SELinux.  Only reopen if this still
happens with the very latest Fedora 18 packages.


Note You need to log in before you can comment on or make changes to this bug.