VM Builder

Discussion in 'Installation/Configuration' started by siteregsam, Aug 24, 2010.

  1. siteregsam

    siteregsam New Member

    Hi,

    I am very new to creating Image. I tried using vm-builder in ubunut 10.04 and stuck with following error.

    root@sam-laptop:~# sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o --libvirt qemu:///system
    2010-08-24 10:50:54,132 INFO : Calling hook: preflight_check
    2010-08-24 10:50:54,143 INFO : Calling hook: set_defaults
    2010-08-24 10:50:54,145 INFO : Calling hook: bootstrap
    2010-08-24 10:51:12,782 ERROR : Process (['/usr/sbin/debootstrap', '--arch=i386', 'lucid', '/tmp/tmpBHdlle', 'http://archive.ubuntu.com/ubuntu']) returned 1. stdout: I: Retrieving Release
    E: Failed getting release file http://archive.ubuntu.com/ubuntu/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 110, 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=i386', 'lucid', '/tmp/tmpBHdlle', 'http://archive.ubuntu.com/ubuntu']) returned 1. stdout: I: Retrieving Release
    E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/lucid/Release
    , stderr:
    root@sam-laptop:~#


    I don't know what's the reason for "E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/lucid/Release"
    Kindly some one help me...


    Thanks in advance..
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. siteregsam

    siteregsam New Member


    Till i got the following...

    root@sam-laptop:~# wget http://archive.ubuntu.com/ubuntu/dists/lucid/Release
    --2010-08-24 11:47:03-- http://archive.ubuntu.com/ubuntu/dists/lucid/Release
    Resolving archive.ubuntu.com... 91.189.92.166, 91.189.88.30, 91.189.88.31, ...
    Connecting to archive.ubuntu.com|91.189.92.166|:80... failed: No route to host.
    Connecting to archive.ubuntu.com|91.189.88.30|:80... failed: No route to host.
    Connecting to archive.ubuntu.com|91.189.88.31|:80... failed: No route to host.
    Connecting to archive.ubuntu.com|91.189.88.40|:80... failed: No route to host.
    Connecting to archive.ubuntu.com|91.189.88.45|:80... failed: No route to host.
    Connecting to archive.ubuntu.com|91.189.88.46|:80... failed: No route to host.


    I am actually connected through proxy server. What should i have to do to get connected to http://archive.ubuntu.com/ubuntu/dists/lucid/Release
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to run this command to set the proxy:

    Code:
    export http_proxy=www.your.proxy:port
    replace
    Code:
    www.your.proxy:port
    with the proxy server name and port.
     
  5. siteregsam

    siteregsam New Member

    Hi Till,

    After setting up the proxy i got the following problem...

    root@sam-laptop:~# export http_proxy=http://192.168.4.1:8080
    root@sam-laptop:~# vmbuilder kvm ubuntu --suite=lucid --flavour=virtual --arch=i386 lpia --libvirt=qemu:///system --ip=192.168.4.132 --part=vmbuilder.partition --templates=mytemplates --user=sampath --name=sampath --pass=htapmas --addpkg=vim-nox --addpkg=unattended-upgrades --addpkg=acpid --firstboot /root/vm1/boot.sh --mem=256 --hostname=vm1 --bridge=br0
    2010-08-25 10:09:11,534 INFO : Calling hook: preflight_check
    2010-08-25 10:09:11,539 INFO : Calling hook: set_defaults
    2010-08-25 10:09:11,540 INFO : Calling hook: bootstrap
    2010-08-25 10:27:23,579 INFO : Calling hook: configure_os
    2010-08-25 10:30:31,188 INFO : update-rc.d: warning: unattended-upgrades start runlevel arguments (none) do not match LSB Default-Start values (0 6)
    2010-08-25 10:30:31,188 INFO : update-rc.d: warning: unattended-upgrades stop runlevel arguments (0 6) do not match LSB Default-Stop values (none)
    2010-08-25 10:30:38,181 INFO :
    2010-08-25 10:30:38,181 INFO : Current default time zone: 'Etc/UTC'
    2010-08-25 10:30:38,203 INFO : Local time is now: Wed Aug 25 05:00:38 UTC 2010.
    2010-08-25 10:30:38,203 INFO : Universal Time is now: Wed Aug 25 05:00:38 UTC 2010.
    2010-08-25 10:30:38,203 INFO :
    2010-08-25 10:32:16,939 INFO :
    2010-08-25 10:32:16,940 INFO : Current default time zone: 'Etc/UTC'
    2010-08-25 10:32:16,944 INFO : Local time is now: Wed Aug 25 05:02:16 UTC 2010.
    2010-08-25 10:32:16,944 INFO : Universal Time is now: Wed Aug 25 05:02:16 UTC 2010.
    2010-08-25 10:32:16,944 INFO : Run 'dpkg-reconfigure tzdata' if you wish to change it.
    2010-08-25 10:32:16,945 INFO :
    2010-08-25 10:32:41,439 INFO : start: Job is already running: network-interface-security
    2010-08-25 10:32:48,971 INFO : Calling hook: post_install
    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 116, in main
    self.set_disk_layout(hypervisor)
    File "/usr/lib/python2.6/dist-packages/VMBuilder/contrib/cli.py", line 258, in set_disk_layout
    hypervisor.optparser.error("%s parsing --part option: %s" % (errno, strerror))
    AttributeError: 'KVM' object has no attribute 'optparser'



    any idea as how to overcome AttributeError: 'KVM' object has no attribute 'optparser'?
     
  6. dholbert

    dholbert New Member

    Check that "vmbuilder.partition" exists (from "--part=vmbuilder.partition")

    There's a bug on this in Ubuntu's bug tracker.

    Basically, this error means that you passed a bogus value to "--part" in your vmbuilder command. In your case, you passed "vmbuilder.partition" -- make sure that file is there and is readable. (If you're sure it is, then you might try passing the full path to that file (e.g. /home/myUsername/vmbuilder.partition)).

    The script is trying to be helpful and print out a more useful error message to tell you this, but it's tripping over itself and throwing an exception when doing so. See the bug I linked above for more details.
     
    Last edited: Dec 3, 2010

Share This Page