Difference between revisions of "Virt-rescue"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
<code>virt-rescue</code> - Run a rescue shell on a virtual machine | <code>virt-rescue</code> - Run a rescue shell on a virtual machine | ||
− | virt-rescue -> [[fdisk -l]] -> mount /dev/sdXXX /sysroot | + | virt-rescue -> [[fdisk -l]] -> [[mount]] /dev/sdXXX /sysroot |
virt-rescue -a /path/to/image/debian_your_name.[[qcow2]] | virt-rescue -a /path/to/image/debian_your_name.[[qcow2]] |
Revision as of 07:35, 13 October 2020
virt-rescue
- Run a rescue shell on a virtual machine
virt-rescue -> fdisk -l -> mount /dev/sdXXX /sysroot
virt-rescue -a /path/to/image/debian_your_name.qcow2
virt-rescue -a /srv/libvirt/rcu-test-root.qcow2 supermin: mounting /proc supermin: ext2 mini initrd starting up: 5.1.19 Starting /init script ... [/usr/lib/tmpfiles.d/systemd.conf:11] Unknown group 'utmp'. [/usr/lib/tmpfiles.d/systemd.conf:19] Unknown user 'systemd-network'. [/usr/lib/tmpfiles.d/systemd.conf:20] Unknown user 'systemd-network'. [/usr/lib/tmpfiles.d/systemd.conf:21] Unknown user 'systemd-network'. [/usr/lib/tmpfiles.d/systemd.conf:25] Unknown group 'systemd-journal'. [/usr/lib/tmpfiles.d/systemd.conf:26] Unknown group 'systemd-journal'. Failed to parse ACL "d:group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "group:adm:r--": No such file or directory. Ignoring Failed to parse ACL "d:group::r-x,d:group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "group::r-x,group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "d:group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "group:adm:r-x": No such file or directory. Ignoring Failed to parse ACL "group:adm:r--": No such file or directory. Ignoring starting version 237 /init: line 116: echo: write error: Invalid argument /init: line 116: echo: write error: Invalid argument mdadm: No arrays found in config file or automatically WARNING: Failed to connect to lvmetad. Falling back to device scanning. [ ] ------------------------------------------------------------ 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. groups: cannot find name for group ID 0 ><rescue>
fdisk -l Disk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectors Disk model: QEMU HARDDISK Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: BE15153C-637B-4D56-BE22-0EF6E5F72AE5 Device Start End Sectors Size Type /dev/sda1 2048 52426751 52424704 25G Linux filesystem Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors Disk model: QEMU HARDDISK Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
Related commands
Activities
See also
Advertising: