[Libguestfs] [PATCH 0/2] Add a 'virt-rescue' command
Richard W.M. Jones
rjones at redhat.com
Tue Sep 22 18:48:14 UTC 2009
Inspired by something Glauber asked me about today, I made a very
simple pair of patches which add a 'virt-rescue' command to
libguestfs. This uses the appliance as a "rescue appliance", so
people can boot into a disk image and repair it in an unstructured,
interactive way. (Specifically, Glauber's question was how to run
fsck interactively - with this patch you could do that).
$ virt-rescue --ro /dev/vg_trick/F11x64
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 will be able to examine them.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
><rescue> mount /dev/vg_f11x64/lv_root /sysroot
EXT4-fs (dm-0): barriers enabled
kjournald2 starting: pid 269, dev dm-0:8, commit interval 5 seconds
EXT4-fs (dm-0): internal journal on dm-0:8
EXT4-fs (dm-0): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (dm-0): mounted filesystem with ordered data mode
><rescue> ls /sysroot/
bin dev home lib64 media opt root selinux sys usr
boot etc lib lost+found mnt proc sbin srv tmp var
I'd really like to know how to get rid of that bash error message.
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)
More information about the Libguestfs