Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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