7

I have a fresh install of 16.04 and I have installed kvm. I'm trying to create a virtual machine using vmbuilder.

sudo vmbuilder kvm ubuntu --suite xenial --flavour virtual --arch i386 -o --libvirt qemu:///system --ip 10.0.0.80 --hostname sabsickvm --bridge br0

When I run virsh list after I show no vms

When everything "finishes" I see

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)
edwinksl
  • 23,789
rp1783
  • 71

2 Answers2

2

Setting the dpkg option for force-confnew also seams to work:

patch /usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py<<EOT
@@ -72,7 +72,7 @@
             self.call_hook('fix_ownership', manifest)

     def update(self):
-        self.run_in_target('apt-get', '-y', '--force-yes', 'dist-upgrade',
+        self.run_in_target('apt-get', '-y', '--force-yes', '--option=Dpkg::Options::=--force-confnew', 'dist-upgrade',
                            env={ 'DEBIAN_FRONTEND' : 'noninteractive' })

     def install_authorized_keys(self):
EOT
matt
  • 21
1

I am now having the same problem with an identical setup from 1 week ago (9/28/16) when there was no error. My install is almost the same as the op, except that I am using amd64.

I offer the solution that I used as a band-aid until the underlying bug is fixed.

SOLUTION:

1. change the word 'dist-upgrade' to 'update' in
    /usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py

 2. delete /usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.pyc

Now rerun vmbuilder. I still got a few errors/warns, but it built just fine.

Recognize this did not fix the underlying problem, but it does let you use for now: vmbuilder with 16.04.