Reputation: 61
I'm on 16.04 and trying to install a 16.04 guest using this:
ubuntu-vm-builder kvm xenial -v --mem 1024 --hostname tester
--addpkg openssh-server --mirror http://office:3142/ubuntu
Pretty normal right?
It dies at:
Setting up sudo (1.8.16-0ubuntu1.2) ...
Configuration file '/etc/sudoers'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** sudoers (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package sudo (--configure):
end of file on stdin at conffile prompt
.... more message....
Errors were encountered while processing:
sudo
Extracting templates from packages: 100%
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any ideas on this?
Is ubuntu-vm-builder even the right tool to use now, or is there a modern replacement? I'm a bit lost in the variety of VM creation tools out there.
I did search on this and the only information I found a suggestion to edit /usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py. I could do this but... is that really the standard way to handle VM creation on Ubuntu these days?
Edit: I did edit that file and replaced dist-update with upgrade, as suggested, and then it worked. Pretty weird that an Ubuntu LTS package would ship in a way that fails every time (no one tested it even once before release), unless I'm really doing something wrong with this.
Thank you
Upvotes: 4
Views: 1335
Reputation: 1191
There is a workaround for this, explained here: https://askubuntu.com/questions/819844/kvm-vmbuilder-fails
Basically, it consists in changing, in this file:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py
The word 'dist-upgrade' to 'update'
Then, deleting:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.pyc
Sounds weird but it just works. Don't get confused by editing the "dapper" file, it works for trusty and xenial (the only ones I tested it for) just changing the "dapper" file.
Upvotes: 1