16.4.2. Modifying Files with guestfish
To modify files, create directories or make other changes to a guest virtual machine, first heed the warning at the beginning of this section: your guest virtual machine must be shut down. Editing or changing a running disk with guestfish will result in disk corruption. This section gives an example of editing the
/boot/grub/grub.conf
file. When you are sure the guest virtual machine is shut down you can omit the --ro
option in order to get write access via a command such as:
Commands to edit files include
edit
, vi
and emacs
. Many commands also exist for creating files and directories, such as write
, mkdir
, upload
and tar-in
.