kvm – ubuntu-vm-builder在/ etc / sudoers上失败 – 任何解决方法?

我在16.04并尝试使用以下方法安装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甚至是现在使用的合适工具,还是有现代替代品?我在各种VM创建工具中迷失了方向.

我搜索了这个以及我发现编辑/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py的建议的唯一信息.我可以做到这一点,但是……这些是真的在Ubuntu上处理VM创建的标准方法吗?

编辑:我确实编辑了该文件,并按照建议更新了dist-update和升级,然后就可以了.非常奇怪的是,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”文件.

点赞