Red Hat Bugzilla – Bug 996039
guestfish does not work due to conflict of remote and interactive mode
Last modified: 2013-12-25 19:13:02 EST
Description of problem: guestfish dose not work due to conflict of remote and ineractive mode. Code of fish/fish.c /* Interactive, shell script, or command(s) on the command line? */ if (optind >= argc) { if (is_interactive) interactive (); else shell_script (); } else cmdline (argv, optind, argc); If gives this command "guestfish --remote --add test.img", guestfish looks like executing in interactive mode, but actually it try to connect the remote server. Version-Release number of selected component (if applicable): libguestfs-1.20.10-2.el6.x86_64 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
Fixed (by documenting the problem) upstream: https://github.com/libguestfs/libguestfs/commit/7e396954611d827dc236a114ed22a781687c002d
Reproduce: 1. Create a raw image: [host]#dd if=/dev/zero of=test.img bs=1M count=50 2. guestfish remote control [host]#eval "`guestfish --listen`" [host]#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 3. Check man page: In man page for libguestfs-1.20.10-2.el6.x86_64 I can not find some thing that prompt you do not use --remote & --add options together. Verified: libguestfs version: libguestfs-1.20.10-3.el6 1. Install libguestfs-1.20.10-3.el6 on RHEL6.5 host 2. [guest]#man guestfish, I can find the following content in man page: REMOTE CONTROL DOES NOT WORK WITH -a ETC. OPTIONS Options such as -a, --add, -N, --new etc don’t interact properly with remote support. They are processed locally, and not sent through to the remote guestfish. In particular this won’t do what you expect: guestfish --remote --add disk.img Don’t use these options. Use the equivalent commands instead, eg: guestfish --remote add-drive disk.img or: guestfish --remote ><fs> add disk.img
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-1536.html