Description of problem: $ virt-builder fedora-21 --firstboot-command '# this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment this is a long comment' [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-21.xz [ 2.0] Planning how to build this image [ 2.0] Uncompressing [ 13.0] Opening the new disk [ 28.0] Setting a random seed [...] virt-builder: error: libguestfs error: internal_write: open: /usr/lib/virt-sysprep/scripts/0001---this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment-this-is-a-long-comment: File name too long Version-Release number of selected component (if applicable): libguestfs-tools-c-1.29.34-1.fc23.x86_64 How reproducible: 100% Steps to Reproduce: 1. See description above.
https://www.redhat.com/archives/libguestfs/2015-April/thread.html#00098
Pushed upstream in 1.29.38.
Can confirm 1.29.41 works. Tested with: libguestfs-1.29.41-1.fc23 Test ---- $ virt-builder fedora-21 \ [. . .] --firstboot-command ' # Create the user account. useradd -m -p "" -G wheel stack chage -d 0 stack chmod 0755 /home/stack mkdir -m 0755 /home/stack/.ssh cp /var/tmp/authorized_keys /home/stack/.ssh/ chown -R stack.stack /home/stack/.ssh # Enable some services to not break DevStack restart systemctl enable openvswitch mariadb rabbitmq-server httpd ' Before applying the fix, tested with '1.28.9-1.fc21' --------------------------------------------------- [. . .] virt-builder: error: libguestfs error: internal_write: open: /usr/lib/virt-sysprep/scripts/0001---------Create-the-user-account-------useradd--m--p-----G-wheel-stack------chage--d-0-stack------chmod-0755--home-stack------mkdir--m-0755--home-stack--ssh------cp--var-tmp-authorized_keys--home-stack--ssh-------chown--R-stack-stack--home-stack--ssh--------Enable-some-services-to-not-break-DevStack-restart------systemctl-enable-openvswitch-mariadb-rabbitmq-server-httpd-----: File name too long [. . .] After applying 'libguestfs-1.29.41-1.fc23' ------------------------------------------ The same "--first-command" completes successfully: $ virt-builder fedora-21\ [. . .] [1711.0] Installing firstboot command: # Create the user account. useradd -m -p "" -G wheel stack chage -d 0 stack chmod 0755 /home/stack mkdir -m 0755 /home/stack/.ssh cp /var/tmp/authorized_keys /home/stack/.ssh/ chown -R stack.stack /home/stack/.ssh # Enable some services to not break DevStack restart systemctl enable openvswitch mariadb rabbitmq-server httpd [1711.0] Setting passwords [1714.0] SELinux relabelling [1714.0] Finishing off Output file: /export/vmimages/devstack1.qcow2 Output size: 40.0G Output format: qcow2 Total usable space: 38.6G Free space: 37.3G (96%)