Bug 1275806

Summary: virt-builder: error: [file] is not a regular file in the guest
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 09:29:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2015-10-27 19:34:35 UTC
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

Comment 1 Pino Toscano 2015-11-10 09:29:06 UTC
Fixed with commit
https://github.com/libguestfs/libguestfs/commit/6e41fc5a7f4fc56514dc1f2754db8c2c6eec9417
which is in libguestfs >= 1.31.26.