<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I’m running into a bit of trouble using virt-builder and I’m hoping that someone might be able to point in the right direction.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My build process creates a custom ISO image which is subsequently used to kickstart an Oracle X4-2 server using PXE.  The ISO is a minimal install and contains a suite of packages and customization scripts to properly configure our box
 during first boot.  The process works great for kickstarting baremetal machines as well as VMs created with virt-manager or vsphere.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d like to be able to use virt-builder to build virtual images automatically (i.e., take our .ISO and generate a qcow2 of a properly installed system).  Unfortunately, virt-builder doesn’t seem to like the format of my ISO image.  The
 tool dies during the “Setting passwords” step because it’s attempting to create a temp file in /etc and my ISO doesn’t have an /etc directory at this point.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here’s a snippet that shows the error message:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">[  16.0] Setting passwords<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">libguestfs: trace: mktemp "/etc/shadow.guestfsXXXXXX"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">libguestfs: trace: mktemp = NULL (error)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-family:"Courier New";color:red">virt-builder: error: libguestfs error: mktemp: /etc/shadow.guestfsyU5Zwo:
<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-family:"Courier New";color:red">No such file or directory</span></b><b><span style="font-family:"Courier New""><o:p></o:p></span></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a particular ISO format that virt-builder expects?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As a test, I used virt-builder to successfully create a centos-6 image.  I looked in my .cache/virt-builder directory, unxz’d the image and then mounted the partitions.  It appears that the sanitized centos-6 image is fully complete (i.e.,
 contains a typical filesystem, has an /etc, an /etc/passwd…etc.) whereas mine seems more like a linux image that is in a ready-to-be-installed state.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">virt-inspector on my ISO shows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New""><?xml version="1.0"?><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New""><operatingsystems><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">  <operatingsystem><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <root>/dev/sda</root><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <name>linux</name><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <arch>x86_64</arch><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <distro>oraclelinux</distro><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <major_version>6</major_version><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <minor_version>0</minor_version><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <package_format>rpm</package_format><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <package_management>yum</package_management><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <format>installer</format><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <mountpoints><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">      <mountpoint dev="/dev/sda">/</mountpoint><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    </mountpoints><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <filesystems><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">      <filesystem dev="/dev/sda"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">        <type>iso9660</type><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">        <label>iDVA 4.95.0 x86_64</label><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">        <uuid>2015-11-20-19-50-52-00</uuid><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">      </filesystem><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    </filesystems><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">    <applications/><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">  </operatingsystem><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New""></operatingsystems><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Likewise, if I mount my ISO I have a filesystem that looks like:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x  3 test test      4096 Nov 19 18:03 images<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x 11 test test      4096 Nov 19 18:05 iqcustom<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test 966785078 Nov 19 18:08 iqcustom.tar.gz<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x  2 test test      4096 Nov 19 18:03 isolinux<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test      2368 Nov 19 18:03 ks-dell.cfg<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test     15158 Nov 19 18:03 ks-oracle.cfg<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test     15985 Nov 19 18:03 ks-pxe.cfg<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test      3061 Nov 19 18:03 ks-pxe-oracle-vm.cfg<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-rw-rw-r--  1 test test      2176 Nov 19 18:03 ks-vm.cfg<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x  2 test test     36864 Nov 19 18:04 Packages<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x  2 test test      4096 Nov 19 18:04 repodata<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">-r--r--r--  1 test test      3106 Nov 19 18:05 TRANS.TBL<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxr-x  3 test test      4096 Nov 19 18:05<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal">In contrast, mounting one of the partitions in the centos-6 image shows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">dr-xr-xr-x.  2 root root  4096 Oct 31  2014 bin<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Oct 31  2014 boot<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Oct 31  2014 dev<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x. 73 root root  4096 Dec  9 16:26 etc<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Sep 23  2011 home<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">dr-xr-xr-x. 10 root root  4096 Oct 31  2014 lib<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">dr-xr-xr-x.  9 root root 12288 Oct 31  2014 lib64<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwx------.  2 root root 16384 Oct 31  2014 lost+found<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Sep 23  2011 media<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Sep 23  2011 mnt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  3 root root  4096 Oct 31  2014 opt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Oct 31  2014 proc<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">dr-xr-x---.  2 root root  4096 Oct 31  2014 root<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">dr-xr-xr-x.  2 root root 12288 Oct 31  2014 sbin<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Oct 31  2014 selinux<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Sep 23  2011 srv<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x.  2 root root  4096 Oct 31  2014 sys<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxrwxrwt.  2 root root  4096 Oct 31  2014 tmp<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x. 13 root root  4096 Oct 31  2014 usr<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">drwxr-xr-x. 19 root root  4096 Oct 31  2014 var<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note: we build our ISO using mkisofs.  Is there some other tool/process that we should use to generate ISOs that satisfy virt-builder?  Should I be starting from a Live CD format?   <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers!<o:p></o:p></p>
<p class="MsoNormal">                                                                                                                                                      
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:black"><br>
NOTICE: This communication and any attachments may contain confidential and/or privileged information of IneoQuest Technologies, Inc. ("IneoQuest"). This communication is intended solely for the use of the individual or entity to which it is addressed. If you
 are not the intended recipient of this communication, you are hereby notified that any dissemination, distribution, copying or other use of this communication or the information it contains is strictly prohibited and may be unlawful. If you have received this
 communication in error, please notify the sender immediately by reply e-mail and destroy all copies of this communication (including attachments), electronic or otherwise. If you are a party to a written Non-Disclosure Agreement ("NDA") with IneoQuest, you
 should maintain the contents of this communication (including attachments) in confidence to the full extent specified in the NDA.
</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p>
</span></p>
</body>
</html>