Description of problem: virt-rescue return none zero value when exit Version-Release number of selected component (if applicable): libguestfs-1.2.9-2.fc13.x86_64 libguestfs-tools-1.2.9-2.fc13.x86_64 How reproducible: 100% Steps to Reproduce: 1. run virt-rescue vm.img 2. wait for virt-rescue shell prompt, then run some commands in virt-rescue shell 3. type "exit" Actual results: virt-rescue quit with none zero stauts 10. saying" child process died unexpectedly at /usr/bin/virt-rescue line 174." Expected results: should return zero when exit Additional info: guest vm 's kernel panic is expected but I think the return code and error message should be handled more carefully. logs: ------------------------------------------------------------ Welcome to virt-rescue, the libguestfs rescue shell. Note: The contents of / are the rescue appliance. You have to mount the guest's partitions under /sysroot before you can examine them. bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell ><rescue> ls bin etc init lib64 mnt proc sbin sys tmp var dev home lib media opt root selinux sysroot usr ><rescue> exit exit virt-rescue: Syncing the disk now before exiting ... (Don't worry if you see a 'Kernel panic' message below) [ 16.617326] Kernel panic - not syncing: Attempted to kill init! [ 16.618514] Pid: 1, comm: init Not tainted 2.6.33.5-124.fc13.x86_64 #1 [ 16.619980] Call Trace: [ 16.620552] [<ffffffff81428cbc>] panic+0x75/0x138 [ 16.621712] [<ffffffff8104eca8>] do_exit+0x76/0x71a [ 16.622822] [<ffffffff811bdff7>] ? security_file_permission+0x11/0x13 [ 16.624294] [<ffffffff8142dc45>] ? do_page_fault+0x2bd/0x2ed [ 16.625590] [<ffffffff8104f3c8>] do_group_exit+0x7c/0xa6 [ 16.626819] [<ffffffff8104f404>] sys_exit_group+0x12/0x16 [ 16.628125] [<ffffffff81009b02>] system_call_fastpath+0x16/0x1b [ 16.629399] Rebooting in 1 seconds..child process died unexpectedly at /usr/bin/virt-rescue line 174. [pcao@pcao-laptop libguestfs]$ [pcao@pcao-laptop libguestfs]$ echo $? 10
Yup, this is a bug ...
This is fixed upstream in this commit: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=c3194e4d370d917db9900a31ea18f10492554da4