Failure when using iso image in 16.04

Bug #1587981 reported by Paul Kehle
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When using vmbuilder on a 16.04 server trying to install a 16.04 client image, there is a failure in the script when trying to read InRelease from the iso image.

lsb_release -rd:

Description: Ubuntu 16.04 LTS
Release: 16.04

apt-cache policy python-vm-builder:

python-vm-builder:
  Installed: 0.12.4+bzr494-0ubuntu1
  Candidate: 0.12.4+bzr494-0ubuntu1
  Version table:
 *** 0.12.4+bzr494-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

# Command to fetch the iso image from hosting server
sudo wget -O /var/lib/libvirt/boot/ubuntu-16.04-server-amd64.iso http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso

# script input variables
isoFile="/var/lib/libvirt/boot/ubuntu-16.04-server-amd64.iso"
imageName="app-c0"
imagePath="/mnt/storage0/images"
destDir="${imagePath}/${imageName}"

# main call to generate the image, offending/errored script
sudo vmbuilder kvm ubuntu -o -v --debug --iso $isoFile -c /var/lib/libvirt/configs/ubuntuBase.conf --part /var/lib/libvirt/configs/vmbuilder.partitions --hostname $imageName --ip 192.168.1.200 --dest=${destDir} --firstboot /var/lib/libvirt/configs/first_boot.sh

2016-06-01 12:24:15,001 INFO : logging to file: /tmp/tmpNPPtI6
2016-06-01 12:24:15,019 DEBUG : Launch directory: /home/sat_system
2016-06-01 12:24:15,019 DEBUG : Output destdir: /mnt/storage0/images/app-c0
2016-06-01 12:24:15,020 DEBUG : Returning value None for configuration key ppa
2016-06-01 12:24:15,020 DEBUG : Returning value None for configuration key uid
2016-06-01 12:24:15,020 DEBUG : Returning value '/etc/ssl/private/mongoCluster.pem' for configuration key ssh-user-key
2016-06-01 12:24:15,021 DEBUG : Returning value 'http://archive.ubuntu.com/ubuntu' for configuration key mirror
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key domain
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key install-security-mirror
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key firstlogin
2016-06-01 12:24:15,021 DEBUG : Returning value 'defaultpwd' for configuration key pass
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key timezone
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key install-mirror
2016-06-01 12:24:15,021 DEBUG : Returning value None for configuration key rootpass
2016-06-01 12:24:15,021 DEBUG : Returning value 'unattended-upgrades, openssh-server, acpid' for configuration key addpkg
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key seedfile
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key hostname
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key gid
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key debootstrap-tarball
2016-06-01 12:24:15,022 DEBUG : Returning value 'xenial' for configuration key suite
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key firstboot
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key removepkg
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key variant
2016-06-01 12:24:15,022 DEBUG : Returning value 'vm_user' for configuration key user
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key copy
2016-06-01 12:24:15,022 DEBUG : Returning value None for configuration key arch
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key lang
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key lock-user
2016-06-01 12:24:15,023 DEBUG : Returning value 'virtual' for configuration key flavour
2016-06-01 12:24:15,023 DEBUG : Returning value 'Generic Virtual Machine Super User' for configuration key name
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key execscript
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key manifest
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key iso
2016-06-01 12:24:15,023 DEBUG : Returning value 'http://security.ubuntu.com/ubuntu' for configuration key security-mirror
2016-06-01 12:24:15,023 DEBUG : Returning value 'main, universe, restricted' for configuration key components
2016-06-01 12:24:15,023 DEBUG : Returning value None for configuration key ssh-key
2016-06-01 12:24:15,024 DEBUG : Returning value None for configuration key proxy
2016-06-01 12:24:15,024 DEBUG : Returning value '192.168.122.1' for configuration key gw
2016-06-01 12:24:15,024 DEBUG : Returning value 'br0' for configuration key bridge
2016-06-01 12:24:15,024 DEBUG : Returning value None for configuration key network
2016-06-01 12:24:15,024 DEBUG : Returning value '512' for configuration key mem
2016-06-01 12:24:15,024 DEBUG : Returning value None for configuration key ip
2016-06-01 12:24:15,024 DEBUG : Returning value '255.255.255.0' for configuration key mask
2016-06-01 12:24:15,025 DEBUG : Returning value '1' for configuration key cpus
2016-06-01 12:24:15,025 DEBUG : Returning value 'qemu:///system' for configuration key libvirt
2016-06-01 12:24:15,025 DEBUG : Returning value None for configuration key mac
2016-06-01 12:24:15,025 DEBUG : Returning value '192.168.122.1' for configuration key dns
2016-06-01 12:24:15,025 DEBUG : Returning value '192.168.122.0' for configuration key net
2016-06-01 12:24:15,025 DEBUG : Returning value '192.168.122.255' for configuration key bcast
2016-06-01 12:24:15,025 INFO : Calling hook: preflight_check
2016-06-01 12:24:15,025 DEBUG : (args=(), kwargs={})
2016-06-01 12:24:15,026 DEBUG : Calling preflight_check method in VMBuilder.plugins.network plugin.
2016-06-01 12:24:15,026 DEBUG : Calling preflight_check method in VMBuilder.plugins.postinst plugin.
2016-06-01 12:24:15,026 DEBUG : Calling preflight_check method in VMBuilder.plugins.firstscripts plugin.
2016-06-01 12:24:15,026 DEBUG : Checking if firstboot script /var/lib/libvirt/configs/first_boot.sh exists
2016-06-01 12:24:15,026 DEBUG : Calling preflight_check method in context plugin VMBuilder.plugins.ubuntu.distro.
2016-06-01 12:24:15,031 INFO : Calling hook: set_defaults
2016-06-01 12:24:15,031 DEBUG : (args=(), kwargs={})
2016-06-01 12:24:15,031 DEBUG : Calling set_defaults method in VMBuilder.plugins.network plugin.
2016-06-01 12:24:15,031 DEBUG : Calling set_defaults method in VMBuilder.plugins.postinst plugin.
2016-06-01 12:24:15,031 DEBUG : Calling set_defaults method in VMBuilder.plugins.firstscripts plugin.
2016-06-01 12:24:15,032 DEBUG : Calling set_defaults method in context plugin VMBuilder.plugins.ubuntu.distro.
2016-06-01 12:24:15,032 INFO : Calling hook: bootstrap
2016-06-01 12:24:15,032 DEBUG : (args=(), kwargs={})
2016-06-01 12:24:15,032 DEBUG : Calling bootstrap method in VMBuilder.plugins.network plugin.
2016-06-01 12:24:15,033 DEBUG : No such method (bootstrap) in context plugin (VMBuilder.plugins.network)
2016-06-01 12:24:15,033 DEBUG : Calling bootstrap method in VMBuilder.plugins.postinst plugin.
2016-06-01 12:24:15,033 DEBUG : No such method (bootstrap) in context plugin (VMBuilder.plugins.postinst)
2016-06-01 12:24:15,033 DEBUG : Calling bootstrap method in VMBuilder.plugins.firstscripts plugin.
2016-06-01 12:24:15,033 DEBUG : No such method (bootstrap) in context plugin (VMBuilder.plugins.firstscripts)
2016-06-01 12:24:15,033 DEBUG : Calling bootstrap method in context plugin VMBuilder.plugins.ubuntu.distro.
2016-06-01 12:24:15,034 DEBUG : ['mount', '-o', 'loop', '-t', 'iso9660', '/var/lib/libvirt/boot/ubuntu-16.04-server-amd64.iso', '/tmp/tmp1zpABP']
2016-06-01 12:24:15,038 INFO : mount: /dev/loop0 is write-protected, mounting read-only
2016-06-01 12:24:15,038 DEBUG : ['/usr/sbin/debootstrap', '--arch=amd64', 'xenial', '/tmp/tmpzh0rYs', 'file:///tmp/tmp1zpABP']
2016-06-01 12:24:15,070 DEBUG : I: Retrieving InRelease
2016-06-01 12:24:15,070 DEBUG : I: Failed to retrieve InRelease
2016-06-01 12:24:15,073 DEBUG : I: Retrieving Release
2016-06-01 12:24:15,083 DEBUG : I: Retrieving Release.gpg
2016-06-01 12:24:15,086 DEBUG : I: Checking Release signature
2016-06-01 12:24:15,089 DEBUG : I: Valid Release signature (key id C5986B4F1257FFA86632CBA746181433FBB75451)
2016-06-01 12:24:15,112 DEBUG : I: Retrieving Packages
2016-06-01 12:24:15,117 DEBUG : I: Validating Packages
2016-06-01 12:24:15,322 DEBUG : I: Resolving dependencies of required packages...
2016-06-01 12:24:15,575 DEBUG : I: Resolving dependencies of base packages...
2016-06-01 12:24:16,350 DEBUG : I: Checking component main on file:///tmp/tmp1zpABP...
2016-06-01 12:24:16,476 DEBUG : I: Retrieving libacl1 2.2.52-3
2016-06-01 12:24:16,483 DEBUG : I: Validating libacl1 2.2.52-3
2016-06-01 12:24:16,492 DEBUG : I: Retrieving adduser 3.113+nmu3ubuntu4
2016-06-01 12:24:16,497 DEBUG : I: Validating adduser 3.113+nmu3ubuntu4
2016-06-01 12:24:16,507 DEBUG : I: Retrieving libapparmor1 2.10.95-0ubuntu2
2016-06-01 12:24:16,511 DEBUG : I: Validating libapparmor1 2.10.95-0ubuntu2
2016-06-01 12:24:16,521 DEBUG : I: Retrieving apt 1.2.10ubuntu1
2016-06-01 12:24:16,527 DEBUG : I: Validating apt 1.2.10ubuntu1
2016-06-01 12:24:16,547 DEBUG : I: Retrieving apt-utils 1.2.10ubuntu1
2016-06-01 12:24:16,551 DEBUG : I: Validating apt-utils 1.2.10ubuntu1
2016-06-01 12:24:16,565 DEBUG : I: Retrieving libapt-inst2.0 1.2.10ubuntu1
2016-06-01 12:24:16,568 DEBUG : I: Validating libapt-inst2.0 1.2.10ubuntu1
2016-06-01 12:24:16,579 DEBUG : I: Retrieving libapt-pkg5.0 1.2.10ubuntu1
2016-06-01 12:24:16,583 DEBUG : I: Validating libapt-pkg5.0 1.2.10ubuntu1

...

2016-06-01 12:24:18,105 DEBUG : I: Retrieving liblzma5 5.1.1alpha+20120614-2ubuntu2
2016-06-01 12:24:18,110 DEBUG : I: Validating liblzma5 5.1.1alpha+20120614-2ubuntu2
2016-06-01 12:24:18,122 DEBUG : I: Retrieving zlib1g 1:1.2.8.dfsg-2ubuntu4
2016-06-01 12:24:18,126 DEBUG : I: Validating zlib1g 1:1.2.8.dfsg-2ubuntu4
2016-06-01 12:24:18,134 DEBUG : I: Chosen extractor for .deb packages: dpkg-deb
2016-06-01 12:24:18,153 DEBUG : I: Extracting libacl1...
2016-06-01 12:24:18,160 DEBUG : I: Extracting adduser...
2016-06-01 12:24:18,184 DEBUG : I: Extracting libapparmor1...
2016-06-01 12:24:18,192 DEBUG : I: Extracting libattr1...

...

2016-06-01 12:24:19,762 DEBUG : I: Extracting mount...
2016-06-01 12:24:19,783 DEBUG : I: Extracting util-linux...
2016-06-01 12:24:19,877 DEBUG : I: Extracting liblzma5...
2016-06-01 12:24:19,893 DEBUG : I: Extracting zlib1g...
2016-06-01 12:24:19,910 INFO : Cleaning up
2016-06-01 12:24:19,910 DEBUG : ['umount', '/tmp/tmp1zpABP']
2016-06-01 12:24:19,948 ERROR : Process (['/usr/sbin/debootstrap', '--arch=amd64', 'xenial', '/tmp/tmpzh0rYs', 'file:///tmp/tmp1zpABP']) returned 1. stdout: I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id C5986B4F1257FFA86632CBA746181433FBB75451)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on file:///tmp/tmp1zpABP...
I: Retrieving libacl1 2.2.52-3
I: Validating libacl1 2.2.52-3
I: Retrieving adduser 3.113+nmu3ubuntu4
I: Validating adduser 3.113+nmu3ubuntu4

...

I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
, stderr:
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 24, in <module>
    cli.main()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 221, in main
    distro.build_chroot()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 83, in build_chroot
    self.call_hooks('bootstrap')
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 170, in call_hooks
    getattr(context, func)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 139, in bootstrap
    self.suite.debootstrap()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 273, in debootstrap
    run_cmd(*cmd, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
    raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.exception.VMBuilderException: Process (['/usr/sbin/debootstrap', '--arch=amd64', 'xenial', '/tmp/tmpzh0rYs', 'file:///tmp/tmp1zpABP']) returned 1. stdout: I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id C5986B4F1257FFA86632CBA746181433FBB75451)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on file:///tmp/tmp1zpABP...
I: Retrieving libacl1 2.2.52-3
I: Validating libacl1 2.2.52-3
I: Retrieving adduser 3.113+nmu3ubuntu4
I: Validating adduser 3.113+nmu3ubuntu4
I: Retrieving libapparmor1 2.10.95-0ubuntu2
I: Validating libapparmor1 2.10.95-0ubuntu2

...

I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
, stderr:
sat_system@app-srv001:~$

Revision history for this message
Jim Davis (jjdavis) wrote :
Download full text (12.8 KiB)

I'm hitting the same bug. I plodded a little bit further down the road by running

jim@krebstar:/tmp$ sudo debootstrap --arch amd64 --make-tarball=/tmp/wtf.tar xenial /tmp/whatever http://archive.ubuntu.com/ubuntu

and then sticking --debootstrap-tarball=/tmp/wtf.tar

in my setup script. Now it dies in a different place:

2016-06-28 17:02:02,476 INFO : logging to file: /tmp/tmpFvJj7X
2016-06-28 17:02:02,500 INFO : Calling hook: preflight_check
2016-06-28 17:02:02,502 INFO : Calling hook: set_defaults
2016-06-28 17:02:02,503 INFO : Calling hook: bootstrap
2016-06-28 17:02:29,620 INFO : Calling hook: configure_os
2016-06-28 17:02:34,991 INFO :
2016-06-28 17:02:34,992 INFO : Current default time zone: 'Etc/UTC'
2016-06-28 17:02:34,993 INFO : Local time is now: Wed Jun 29 00:02:34 UTC 2016.
2016-06-28 17:02:34,993 INFO : Universal Time is now: Wed Jun 29 00:02:34 UTC 2016.
2016-06-28 17:02:34,993 INFO :
2016-06-28 17:02:36,194 INFO : Generating locales (this might take a while)...
2016-06-28 17:02:36,791 INFO : en_US.UTF-8... done
2016-06-28 17:02:36,791 INFO : Generation complete.
Extracting templates from packages: 100%
2016-06-28 17:02:43,136 INFO : W: --force-yes is deprecated, use one of the options starting with --allow instead.
2016-06-28 17:02:45,411 INFO : Cleaning up
2016-06-28 17:02:45,412 INFO : Calling hook: preflight_check
2016-06-28 17:02:45,449 INFO : Calling hook: configure_networking
2016-06-28 17:02:45,460 INFO : Calling hook: create_partitions
2016-06-28 17:02:45,460 INFO : Creating disk image: "/tmp/tmpfgeOJ_" of size: 131072MB
2016-06-28 17:02:45,473 INFO : Adding partition table to disk image: /tmp/tmpfgeOJ_
2016-06-28 17:02:45,482 INFO : Adding type 4 partition to disk image: /tmp/tmpfgeOJ_
2016-06-28 17:02:45,483 INFO : Partition at beginning of disk - reserving first cylinder
2016-06-28 17:02:45,487 INFO : Warning: The resulting partition is not properly aligned for best performance.
2016-06-28 17:02:45,491 INFO : Adding type 3 partition to disk image: /tmp/tmpfgeOJ_
2016-06-28 17:02:45,495 INFO : [0] ../../libparted/filesys.c:148 (ped_file_system_type_get): File system alias linux-swap(new) is deprecated
2016-06-28 17:02:45,495 INFO : Warning: The resulting partition is not properly aligned for best performance.
2016-06-28 17:02:45,499 INFO : Creating loop devices corresponding to the created partitions
2016-06-28 17:02:45,627 INFO : Creating file systems
2016-06-28 17:02:45,630 INFO : mke2fs 1.42.13 (17-May-2015)
2016-06-28 17:02:45,813 INFO : Calling hook: configure_mounting
2016-06-28 17:02:45,817 INFO : Calling hook: mount_partitions
2016-06-28 17:02:45,818 INFO : Mounting target filesystems
2016-06-28 17:02:46,761 INFO : Calling hook: install_bootloader
2016-06-28 17:02:49,723 INFO : E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
2016-06-28 17:02:50,355 INFO : update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
2016-06-28 17:02:50,366 INFO : invoke-rc.d: could not determine current runlevel
2016-06-28 17:02:50,37...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vm-builder (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.