--iso needs better documentation

Bug #589383 reported by Barry Warsaw
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
VMBuilder
New
Undecided
Unassigned

Bug Description

I probably don't understand how --iso is supposed to work, but in Lucid, the following command line fails:

% sudo vmbuilder kvm ubuntu --suite=lucid --flavour=virtual --mac="52:54:00:12:13:14" --iso=/home/me/Desktop/ISOs/lucid-server-amd64.iso --libvirt=qemu:///system --hostname=scars --arch=amd64 --bridge=br0

while this command line succeeds:

% sudo vmbuilder kvm ubuntu --suite=lucid --flavour=virtual --mac="52:54:00:12:13:14" --libvirt=qemu:///system --hostname=scars --arch=amd64 --bridge=br0

The traceback is here:

2010-06-03 16:26:45,773 INFO : Calling hook: preflight_check
2010-06-03 16:26:45,776 INFO : Calling hook: set_defaults
2010-06-03 16:26:45,776 INFO : Calling hook: bootstrap
2010-06-03 16:26:45,808 ERROR : Process (['/usr/sbin/debootstrap', '--arch=amd64', 'lucid', '/tmp/tmpXsO8Cc', 'file:///tmp/tmpnjL5Gt']) returned 1. stdout: I: Retrieving Release
E: Failed getting release file file:///tmp/tmpnjL5Gt/dists/lucid/Release
, stderr:
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 24, in <module>
    cli.main()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/contrib/cli.py", line 109, in main
    distro.build_chroot()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/distro.py", line 82, in build_chroot
    self.call_hooks('bootstrap')
  File "/usr/lib/python2.6/dist-packages/VMBuilder/distro.py", line 66, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/util.py", line 165, in call_hooks
    getattr(context, func, log_no_such_method)(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 142, in bootstrap
    self.suite.debootstrap()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 269, in debootstrap
    run_cmd(*cmd, **kwargs)
  File "/usr/lib/python2.6/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', 'lucid', '/tmp/tmpXsO8Cc', 'file:///tmp/tmpnjL5Gt']) returned 1. stdout: I: Retrieving Release
E: Failed getting release file file:///tmp/tmpnjL5Gt/dists/lucid/Release
, stderr:

What I wanted was for the ISO to be used to install the vm, which seems reasonable given this --help text:

    --iso=PATH Use an iso image as the source for installation of
                        file. Full path to the iso must be provided. If
                        --mirror is also provided, it will be used in the
                        final sources.list of the vm. This requires suite and
                        kernel parameter to match what is available on the
                        iso, obviously.

I probably misunderstand what kind of iso is expected.

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 589383] [NEW] --iso does not work (or it is insufficiently documented)

On Thu, Jun 03, 2010 at 08:32:11PM -0000, Barry Warsaw wrote:
> I probably don't understand how --iso is supposed to work, but in
> Lucid, the following command line fails:
[...]
> I probably misunderstand what kind of iso is expected.

Nope, you got it just right. I wonder what's going on here, it works
fine for me. Could you try running it with --debug and attach the full
log here, please?

--
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/

Revision history for this message
Barry Warsaw (barry) wrote : Re: --iso does not work (or it is insufficiently documented)

Hi Soren. Attached is the log file when using --iso. Note that this is with your current daily PPA build:

% sudo vmbuilder kvm ubuntu --version
0.12.4.r446

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 589383] Re: --iso does not work (or it is insufficiently documented)

In this particular case, the problem is that you're trying to build a lucid vm with a maverick ISO. That's not what you did originally. Can you try again with the original command line + --debug? Fwiw, this particular requirement /is/ actually documented in the help text for --iso. :)
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Revision history for this message
Barry Warsaw (barry) wrote : Re: --iso does not work (or it is insufficiently documented)

Whoops! Here's the corrected log.

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 589383] Re: --iso does not work (or it is insufficiently documented)

That's a completely different backtrace than your original bug report. This one says that you gave the wrong path to the ISO. I can't fix that ;)
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Revision history for this message
Barry Warsaw (barry) wrote : Re: --iso does not work (or it is insufficiently documented)

Well, it's Monday morning, so either the coffee worked and I got it right this time, or I need more and failed again miserably.

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 589383] Re: --iso does not work (or it is insufficiently documented)

On Mon, Jun 07, 2010 at 02:39:14PM -0000, Barry Warsaw wrote:
> Well, it's Monday morning, so either the coffee worked and I got it
> right this time, or I need more and failed again miserably.

Please apply more coffee :) This time, you used an i386 ISO, but asked
for an amd64 VM. In the original bug report, you used an amd64 ISO.

--
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/

Revision history for this message
Barry Warsaw (barry) wrote : Re: --iso does not work (or it is insufficiently documented)

I have one more chance not to suck, and then you have permission to smack me in the head with a cluebat.

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 589383] Re: --iso does not work (or it is insufficiently documented)

Um... this time you used a desktop iso. They cannot be used this way. In the bug report you used an amd64 lucid server iso. How about you ping me on irc later today, and we can have a look at it? ;)
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Revision history for this message
Barry Warsaw (barry) wrote :

Okay, so Soren helped me get over my PEBKAC on IRC. With the right combination of iso and options, there is no crash. A few things can be improved though:

* better documentation about what kind of iso is necessary: e.g. desktop isos are no good because they don't have debs on them.

* --arch and --suite must match:

<soren> Very true. It could check if $arch and $suite is in the filename and
        print a warning if not. [17:59]

summary: - --iso does not work (or it is insufficiently documented)
+ --iso needs better documentation
Revision history for this message
kemet (ok-rome) wrote :

Hi ,

 I had hope that you post the solution to the initial problem you had since you got help on irc, cause i have the same error and in my case i dont see any error or mismacth between :

arch / suite

destop/ server

here is what i do : sudo vmbuilder vmserver ubuntu -o -c jeosVM.cfg

here is the content of my jeosVM.cfg :

[DEFAULT]
arch = amd64
domain = inroks.local
lang = fr_FR.UTF-8
bridge = brO
ip = 192.168.0.70
mask = 255.255.255.0
bcast = 192.168.0.255
gw = 192.168.0.1
part = ./vmbuilder.partition
user = roks
name = roks
pass = jujuone
tmpfs = -

[ubuntu]
suite = precise
flavour = virtual
iso = /home/roks/vm/tpl/libvirt/ubuntu-12.04.2-server-amd64.iso
hostname = vmmaster
addpkg = acpid, openssh-server

[vmserver]
mem = 2048
cpus = 1

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.