Bug 1438710

Summary: Backport new virt-rescue to RHEL 7
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact: Yehuda Zimmerman <yzimmerm>
Priority: unspecified    
Version: 7.4CC: ptoscano, rjones, xchen, yoguo
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.36.10-1.el7 Doc Type: Enhancement
Doc Text:
*virt-rescue* enhanced This release of the *virt-rescue* utility includes the following enhancements: * Ctrl+character sequences now act on commands run in *virt-rescue* and not on *virt-rescue* itself. * The `-i` option allows users to mount all disks after inspecting the guest.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 09:15:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1438709    
Bug Blocks:    

Description Richard W.M. Jones 2017-04-04 09:07:31 UTC
Description of problem:

The new virt-rescue is much better than the old version.  In particular,
major bugs like ^C killing the whole program are fixed.  Also supports
`-i' to mount all the disks and an escape key.

Version-Release number of selected component (if applicable):

libguestfs-1.36.2-3.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Run: virt-rescue --scratch

Actual results:

Try using ^C - it will kill the whole program.

Expected results:

^C, ^Z should work as expected.

There is an escape key: try using ^] h

You can also do:

  $ virt-builder fedora-25
  $ virt-rescue -a fedora-25.img -i

and it should automatically mount the guest's disks under /sysroot
inside the rescue shell.

Comment 2 Richard W.M. Jones 2017-10-20 14:37:05 UTC
Backported patches are here:

https://github.com/libguestfs/libguestfs/commits/fedora-26

Comment 4 YongkuiGuo 2017-11-16 09:03:18 UTC
Verified with package:
libguestfs-1.36.10-2.el7.x86_64

Steps:

1. #virt-rescue --scratch
--------------------------------------------------
...
The virt-rescue escape key is ‘^]’.  Type ‘^] h’ for help.

Welcome to virt-rescue, the libguestfs rescue shell.

Note: The contents of / (root) 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> ^]q
--------------------------------------------------

2. ^C and ^Z don't kill the rescue shell.

3. ^]q (an escape key) will exit the rescue shell successfully.

So verified this bug.

Comment 10 errata-xmlrpc 2018-04-10 09:15:08 UTC
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.

https://access.redhat.com/errata/RHBA-2018:0677