+++ This bug was initially created as a clone of Bug #996039 +++ Description of problem: eval `guestfish --listen` guestfish --remote --add test.img The '--add' flag for the second command adds the disk to the second local guestfs handle, not to the remote handle as you might expect. You can prove this by adding -x options and running the two commands in separate windows: t1$ guestfish --listen -x libguestfs: trace: set_pgroup true libguestfs: trace: set_pgroup = 0 GUESTFISH_PID=20662; export GUESTFISH_PID t2$ GUESTFISH_PID=20668 guestfish --remote --add debian.img -x libguestfs: trace: set_pgroup true libguestfs: trace: set_pgroup = 0 libguestfs: trace: add_drive "debian.img" <-- note added here, not in t1$ libguestfs: trace: add_drive = 0 Version-Release number of selected component (if applicable): libguestfs-1.20.10-2.el6.x86_64 Also happens upstream (1.23.17). How reproducible: 100% Steps to Reproduce: 1. create a disk [root@intel-8400-8-2 home]# dd if=/dev/zero of=test.img bs=1M count=50 50+0 records in 50+0 records out 52428800 bytes (52 MB) copied, 0.0447178 s, 1.2 GB/s 2. guestfish remote control [root@intel-8400-8-2 home]# eval "`guestfish --listen`" [root@intel-8400-8-2 home]# guestfish --remote --add test.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 ><fs> quit ><fs> quit guestfish: remote: looks like the server is not running ><fs> quit guestfish: remote: looks like the server is not running ><fs> We have to use "ctrl + d" to quit Actual results: guestfish does not work because of conflict Expected results: guestfish can work well with one method (remote or interactive) Additional info: Following is correct 1. [root@intel-8400-8-2 home]# eval "`guestfish --listen`" [root@intel-8400-8-2 home]# guestfish --remote -- add test.img 2.[root@intel-8400-8-2 home]# eval "`guestfish --listen`" [root@intel-8400-8-2 home]# guestfish --remote add test.img same issue in rhel7, libguestfs-1.22.5-3.el7.x86_64
This is tricky to fix. I suspect we should just document it for now.
Fixed (by documentation) upstream: https://github.com/libguestfs/libguestfs/commit/7e396954611d827dc236a114ed22a781687c002d