Bug 785603

Summary: copy-out "No such file or directory"
Product: [Community] Virtualization Tools Reporter: Robin Green <greenrd>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: nick, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Green 2012-01-29 22:01:34 UTC
$ sudo guestfish -i rawhide.img 

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 (Rawhide)
/dev/vg/lv_root mounted on /
/dev/vda2 mounted on /boot

><fs> copy-out / rawhide
No such file or directory
libguestfs: error: /dev/fd/7: write: Broken pipe
libguestfs: error: file receive cancelled by daemon
><fs> copy-out / /home/greenrd/rawhide
No such file or directory
libguestfs: error: /dev/fd/8: write: Broken pipe
libguestfs: error: file receive cancelled by daemon

Comment 1 Richard W.M. Jones 2012-01-30 09:02:28 UTC
It seems like we need to pass '--one-file-system' to avoid
going into the /dev directory.  However if we do that then
it won't cross mount-points at all, which is desirable.

Comment 2 Richard W.M. Jones 2012-11-30 13:10:10 UTC
Sorry, this bug was misfiled under the wrong 'Product', which
is why it wasn't on our radar.

Comment 3 Richard W.M. Jones 2012-11-30 13:47:19 UTC
I totally misunderstood this bug.  What's happening is that
the target ("rawhide" or "/home/greenrd/rawhide") is not a
directory.  It looks like it doesn't exist at all.

What I still don't understand is the error message, because
in upstream libguestfs (and ever since the copy-out command
was added to guestfish) the error that should be printed is
quite reasonable:

$ guestfish --ro -a /dev/vg_data/F17x64 -i copy-out / /tmp/nosuchfile
copy-out: target '/tmp/nosuchfile' is not a directory

That's quite different from what the reporter is seeing.

Can you try this with a recent guestfish, and/or tell us
what the 'rawhide' object is?

Comment 4 Robin Green 2012-11-30 14:11:49 UTC
Sorry, I later managed to copy the data out, and I no longer remember whether rawhide existed at the time I filed this bug.

Comment 5 ndeveaux 2012-12-06 21:20:52 UTC
I am experiencing the same error message as well, immediately upon calling guestfish:

sudo guestfish -i master1.0.img
libguestfs: error: file receive cancelled by daemon
libguestfs: error: /dev/fd/3: error in chunked encoding

In my case, the file master1.0.img exists.

Comment 6 Richard W.M. Jones 2012-12-06 21:46:17 UTC
(In reply to comment #5)
> I am experiencing the same error message as well, immediately upon calling
> guestfish:
> 
> sudo guestfish -i master1.0.img
> libguestfs: error: file receive cancelled by daemon
> libguestfs: error: /dev/fd/3: error in chunked encoding
> 
> In my case, the file master1.0.img exists.

This is something different.

Can you open a separate bug about this, using the
following link:
https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools

In the bug report, include the full output when you
add the '-x' and '-v' options to that guestfish
command line.