purpleidea / vagrant-builder

an elegant method for making base images for vagrant-libvirt
GNU Affero General Public License v3.0
42 stars 23 forks source link

incorrect path specified in index file #11

Closed vvaldez closed 8 years ago

vvaldez commented 9 years ago

The relative path set in the index file is wrong. Modifying the index to add the proper level of depth works.

virt-builder output from a run on Fedora 21 (there was similar behavior on Fedora 22):

  virsh --connect qemu:///system start tmp-dcadc328
+ sudo chown vvaldez /home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1
+ cleanup
+ rm -f /tmp/tmp.qJ4MWrPZ5T
+ sudo virsh undefine tmp-dcadc328
Domain tmp-dcadc328 has been undefined

[   0.0] Examining the guest ...
[  10.0] Performing "abrt-data" ...
[  10.0] Performing "bash-history" ...
[  10.0] Performing "blkid-tab" ...
[  10.0] Performing "crash-data" ...
[  10.0] Performing "cron-spool" ...
[  10.0] Performing "dhcp-client-state" ...
[  10.0] Performing "dhcp-server-state" ...
[  10.0] Performing "dovecot-data" ...
[  10.0] Performing "logfiles" ...
[  10.0] Performing "machine-id" ...
[  10.0] Performing "mail-spool" ...
[  10.0] Performing "net-hostname" ...
[  10.0] Performing "net-hwaddr" ...
[  10.0] Performing "pacct-log" ...
[  10.0] Performing "package-manager-cache" ...
[  10.0] Performing "pam-data" ...
[  10.0] Performing "puppet-data-log" ...
[  10.0] Performing "rh-subscription-manager" ...
[  10.0] Performing "rhn-systemid" ...
[  10.0] Performing "rpm-db" ...
[  10.0] Performing "samba-db-log" ...
[  10.0] Performing "script" ...
[  10.0] Performing "smolt-uuid" ...
[  10.0] Performing "ssh-hostkeys" ...
[  10.0] Performing "ssh-userdir" ...
[  10.0] Performing "sssd-db-log" ...
[  10.0] Performing "tmp-files" ...
[  10.0] Performing "udev-persistent-net" ...
[  10.0] Performing "utmp" ...
[  10.0] Performing "yum-uuid" ...
[  10.0] Performing "customize" ...
[  10.0] Setting a random seed
[  10.0] Performing "lvm-uuids" ...
Input disk virtual size = 6442450944 bytes (6.0G)
Create overlay file in /tmp to protect source disk ...
Examine source disk ...
Fill free space in /dev/sda1 with zero ...
Clearing Linux swap on /dev/sda2 ...
Fill free space in /dev/sda3 with zero ...
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ --:--
Copy to destination and make sparse ...

Sparsify operation completed with no errors.  Before deleting the old disk, 
carefully check that the target disk boots and works correctly.
Running virt-builder...
[   1.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz
cp: cannot stat ‘/home/vvaldez/tmp/builder/rhel-7.1-iso/../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz’: No such file or directory
virt-builder: error: cp (download) command failed copying 
'/home/vvaldez/tmp/builder/rhel-7.1-iso/../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz'

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]
Makefile:184: recipe for target '/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img' failed
make: *** [/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img] Error 1

Verifying the qcow image on disk:

[vvaldez@localhost v7]$ ls /home/vvaldez/tmp/builder/rhel-7.1-iso/../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz
ls: cannot access /home/vvaldez/tmp/builder/rhel-7.1-iso/../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz: No such file or directory
[vvaldez@localhost v7]$ ls /home/vvaldez/tmp/builder/rhel-7.1-iso/../../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz
/home/vvaldez/tmp/builder/rhel-7.1-iso/../../../tmp/builder/rhel-7.1-iso/rhel-7.1.xz

Modifying the index file to add ../ until it works:

[vvaldez@localhost v7]$ time ./versions/rhel-7.1-iso.sh 
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
Running virt-builder...
[   0.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz
cp: cannot stat ‘/home/vvaldez/tmp/builder/rhel-7.1-iso/../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz’: No such file or directory
virt-builder: error: cp (download) command failed copying 
'/home/vvaldez/tmp/builder/rhel-7.1-iso/../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz'

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]
Makefile:184: recipe for target '/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img' failed
make: *** [/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img] Error 1

real    0m0.595s
user    0m0.023s
sys 0m0.038s
[vvaldez@localhost v7]$ vi ~/tmp/builder/rhel-7.1-iso/index 
[vvaldez@localhost v7]$ time ./versions/rhel-7.1-iso.sh 
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
Running virt-builder...
[   1.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz
cp: cannot stat ‘/home/vvaldez/tmp/builder/rhel-7.1-iso/../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz’: No such file or directory
virt-builder: error: cp (download) command failed copying 
'/home/vvaldez/tmp/builder/rhel-7.1-iso/../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz'

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]
Makefile:184: recipe for target '/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img' failed
make: *** [/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img] Error 1

real    0m0.619s
user    0m0.030s
sys 0m0.036s
[vvaldez@localhost v7]$ vi ~/tmp/builder/rhel-7.1-iso/index 
[vvaldez@localhost v7]$ time ./versions/rhel-7.1-iso.sh 
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
Running virt-builder...
[   0.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz
cp: cannot stat ‘/home/vvaldez/tmp/builder/rhel-7.1-iso/../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz’: No such file or directory
virt-builder: error: cp (download) command failed copying 
'/home/vvaldez/tmp/builder/rhel-7.1-iso/../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz'

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]
Makefile:184: recipe for target '/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img' failed
make: *** [/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img] Error 1

real    0m0.635s
user    0m0.030s
sys 0m0.034s
[vvaldez@localhost v7]$ vi ~/tmp/builder/rhel-7.1-iso/index 
[vvaldez@localhost v7]$ time ./versions/rhel-7.1-iso.sh 
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
Running virt-builder...
[   1.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz
cp: cannot stat ‘/home/vvaldez/tmp/builder/rhel-7.1-iso/../../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz’: No such file or directory
virt-builder: error: cp (download) command failed copying 
'/home/vvaldez/tmp/builder/rhel-7.1-iso/../../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz'

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]
Makefile:184: recipe for target '/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img' failed
make: *** [/home/vvaldez/tmp/builder/rhel-7.1-iso/builder.img] Error 1

real    0m0.610s
user    0m0.030s
sys 0m0.030s
[vvaldez@localhost v7]$ vi ~/tmp/builder/rhel-7.1-iso/index 
[vvaldez@localhost v7]$ time ./versions/rhel-7.1-iso.sh 
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
/bin/bash: /home/vvaldez/.vagrant-builder/auth.sh: No such file or directory
Running virt-builder...
[   1.0] Downloading: /home/vvaldez/tmp/builder/rhel-7.1-iso/../../../../../home/vvaldez/tmp/builder/rhel-7.1-iso/rhel-7.1.xz
[   1.0] Planning how to build this image
[   1.0] Uncompressing
[  13.0] Resizing (using virt-resize) to expand the disk to 40.0G
[  24.0] Opening the new disk
[  34.0] Setting a random seed
purpleidea commented 8 years ago

I just tried this on a rhel-7.2 iso, and I can't reproduce. I'm hoping it's just ghosts. I don't know what's different about your environment that causes this. If we figure it out, lmk and reopen please!