Description of problem: If you try to virt-builder --edit some file that does not exist, you get a non-intuitive error: $ virt-builder fedora-22 --edit '/etc/foobar: s/1/2/' [ 1.5] Downloading: http://libguestfs.org/download/builder/fedora-22.xz [ 3.8] Planning how to build this image [ 3.8] Uncompressing [ 14.7] Opening the new disk [ 28.8] Setting a random seed [ 28.8] Editing: /etc/foobar virt-builder: error: /etc/foobar is not a regular file in the guest It should probably say something like '/etc/foobar' file does not exist. Version-Release number of selected component (if applicable): libguestfs-tools-c-1.31.20-1.fc24.x86_64
Fixed with commit https://github.com/libguestfs/libguestfs/commit/6e41fc5a7f4fc56514dc1f2754db8c2c6eec9417 which is in libguestfs >= 1.31.26.