Using virt-rescue or virt-edit

From Notes_Wiki

Home > CentOS > CentOS 6.x > Virtualization tools > Libvirt > Using virt-rescue or virt-edit

It is possible to edit guest VM filesystem using tools such as guestfish, virt-rescue and virt-edit. virt-rescue and virt-edit are easier to use and hence are described here.


Using virt-rescue to edit guest VM files

To edit guest VM files using virt-rescue use:

  1. Start virt-rescue using 'virt-rescue -d <domain-name>'
  2. See available disk partitions using 'fdisk -l'
  3. Mount desired partition on /sysroot folder using 'mount /dev/vda<n> /sysroot'
  4. See available commands using 'help'
  5. Once editing of files is complete exit from virt-rescue using 'exit'


Using virt-edit to edit guest VM files

To edit guest VM file using virt-edit use:

virt-edit -d <domain> <file-path>



Home > CentOS > CentOS 6.x > Virtualization tools > Libvirt > Using virt-rescue or virt-edit