我正在安装16.04版本的客户机,使用以下命令:
ubuntu-vm-builder kvm xenial -v --mem 1024 --hostname tester
--addpkg openssh-server --mirror http://office:3142/ubuntu
很正常,对吧?
终止于:
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)
对此有什么想法吗?
ubuntu-vm-builder是现在使用的正确工具,还是有一个现代的替代品?我有点迷失在各种各样的虚拟机创建工具中。
我确实对此进行了搜索,我发现的唯一信息是建议编辑/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py。我可以这么做,但是……这真的是现在在Ubuntu上处理VM创建的标准方式吗?
编辑:我确实编辑了那个文件,并按照建议将dist-update替换为upgrade,然后它就工作了。很奇怪,一个Ubuntu LTS包会以一种每次都失败的方式发布(没有人在发布前测试过一次),除非我真的做错了什么。
谢谢
有一个解决方法,说明如下:https://askubuntu.com/questions/819844/kvm-vmbuilder-fails
基本上,它包括在这个文件中:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py
这个词"dist-upgrade", "更新"
然后,删除:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.pyc
听起来很奇怪,但它确实有效。不要因为编辑"dapper"文件而感到困惑,它适用于可靠的和xenial(我测试过的唯一的),只需更改"dapper"文件。