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:
- Start virt-rescue using 'virt-rescue -d <domain-name>'
- See available disk partitions using 'fdisk -l'
- Mount desired partition on /sysroot folder using 'mount /dev/vda<n> /sysroot'
- See available commands using 'help'
- 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