ubuntu-vm-builder can't set ssh authorized keys

Asked by Hadmut Danisch on 2010-04-01

Binary package hint: ubuntu-vm-builder

Hi,

if I call ubuntu-vm-builder with

ubuntu-vm-builder kvm karmic --cpus=1 --arch=i386 --mem=512 --suite=karmic ... --ssh-key=/root/.ssh/authorized_keys --ssh-user-key=/root/.ssh/authorized_keys ...

I get the error message

Traceback (most recent call last):
  File "/usr/bin/ubuntu-vm-builder", line 28, in <module>
    VMBuilder.run()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/__init__.py", line 65, in run
    frontend.run()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/cli/__init__.py", line 68, in run
    vm.create()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 484, in create
    self.install()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 407, in install
    self.distro.install(self.installdir)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 148, in install
    self.suite.install(destdir)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 100, in install
    self.install_authorized_keys()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 150, in install_authorized_keys
    self.run_in_target('chown', '-R', '%s:%s' % (self.vm.user,)*2, '/home/%s/.ssh/' % (self.vm.user))
TypeError: not enough arguments for format string

BTW: Why does ist use plugins/ubuntu/dapper.py ?

regards
Hadmut

ProblemType: Bug
Architecture: amd64
Date: Thu Apr 1 20:09:29 2010
DistroRelease: Ubuntu 9.10
Package: ubuntu-vm-builder 0.11.3-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/tcsh
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: vm-builder
Uname: Linux 2.6.31-17-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:3643): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:3643): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:3692): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:3704): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubuntu-vm-builder Edit question
Assignee:
No assignee Edit question
Last query:
2010-04-01
Last reply:
2010-04-02
Hadmut Danisch (hadmut) said : #1
Nick Barcet (nijaba) said : #2

If you want to provide a full path to an ssh key, please use --ssh-key and not --ssh-user-key

    --ssh-key=PATH Add PATH to root's ~/.ssh/authorized_keys (WARNING:
                        this has strong security implications).
    --ssh-user-key=SSH_USER_KEY
                        Add PATH to the user's ~/.ssh/authorized_keys.

> BTW: Why does ist use plugins/ubuntu/dapper.py ?

dapper.py is just the base "ubuntu" class from which we derive each version.

Can you help with this problem?

Provide an answer of your own, or ask Hadmut Danisch for more information if necessary.

To post a message you must log in.