Richard W.M. Jones
2009-Sep-22 18:48 UTC
[Libguestfs] [PATCH 0/2] Add a 'virt-rescue' command
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). Example session: $ 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 ><rescue> exit I'd really like to know how to get rid of that bash error message. Rich. -- 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#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Richard W.M. Jones
2009-Sep-22 18:55 UTC
[Libguestfs] [PATCH 0/2] Add a 'virt-rescue' command
There are actually going to be 3 patches in this series. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Possibly Parallel Threads
- selinux question and answer
- [PATCH] Add 'setcon', 'getcon' commands to set and get the SELinux context
- ext4 mount fails with "resize inode not valid" after a reboot
- [PATCH 1/2] rescue: Suggest using recursive bind mounts.
- [PATCH] Replace shell_quote function with %Q and %R printf specifiers.