Bug 1135585

Summary: [RFE] virt-builder should support copying in a directory/list of files
Product: [Community] Virtualization Tools Reporter: James (purpleidea) <jshubin>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, 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-02-03 09:43:07 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 James (purpleidea) 2014-08-29 17:23:16 UTC
Description of problem:
Virt-builder only supports copying in one file at a time...
For scripts wrapping virt-builder this is annoying to impossible because you can't script in a list of files. So typically the work around is make a tar, pull in the tar, un tar it. Yuck.

Example:
https://github.com/purpleidea/vagrant-builder/blob/feat/docker-save/centos-7.0/Makefile#L104

pasted in in case i rebase the above:

virt-builder ...
--upload $(OUTPUT)/docker.tar:/root/ 
--run-command 'mkdir /root/docker/ && tar -C /root/docker/ -xf /root/docker.tar && rm /root/docker.tar' 


Version-Release number of selected component (if applicable):
git master

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
Less than expected amount of magic.

Expected results:
More magic!

Additional info:
The awesome rwmjones requested an RFE :)

Comment 1 Pino Toscano 2015-02-03 09:43:07 UTC
https://github.com/libguestfs/libguestfs/commit/573fe962b986e90584afa71aa3e9d9d4448190da
adds the copy-in operation in virt-customize/builder/sysprep, in libguestfs >= 1.29.24; furthermore, the copy_in and copy_out APIs are now available in the library itself.