Ubuntu – KVM vmbuilder fails

kvm

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)

Best Answer

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
Related Question