For the issue I reported above, I believe this is a bug. There are two checks for pre-existing VMs, and they differ:
/usr/lib/python2.7/dist-packages/VMBuilder/plugins/libvirt/__init__.py
line 54: if hostname in self.all_domains() and not self.context.overwrite:
line 80: if hostname in self.all_domains() and not self.vm.overwrite:
Changing line 80 to match line 54 prevents this error.
Line 80 throws an error when run:
Traceback (most recent call last):
File "/usr/bin/vmbuilder", line 24, in <module>
cli.main()
File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 227, in main
hypervisor.finalise(destdir)
File "/usr/lib/python2.7/dist-packages/VMBuilder/hypervisor.py", line 78, in finalise
self.call_hooks('deploy', destdir)
File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
call_hooks(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 158, in call_hooks
getattr(plugin, func, log_no_such_method)(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/libvirt/__init__.py", line 80, in deploy
if hostname in self.all_domains() and not self.vm.overwrite:
AttributeError: 'Libvirt' object has no attribute 'vm'
For the issue I reported above, I believe this is a bug. There are two checks for pre-existing VMs, and they differ: python2. 7/dist- packages/ VMBuilder/ plugins/ libvirt/ __init_ _.py overwrite:
/usr/lib/
line 54: if hostname in self.all_domains() and not self.context.
line 80: if hostname in self.all_domains() and not self.vm.overwrite:
Changing line 80 to match line 54 prevents this error.
Line 80 throws an error when run: vmbuilder" , line 24, in <module> python2. 7/dist- packages/ VMBuilder/ contrib/ cli.py" , line 227, in main finalise( destdir) python2. 7/dist- packages/ VMBuilder/ hypervisor. py", line 78, in finalise call_hooks( 'deploy' , destdir) python2. 7/dist- packages/ VMBuilder/ distro. py", line 67, in call_hooks hooks(self, *args, **kwargs) python2. 7/dist- packages/ VMBuilder/ util.py" , line 158, in call_hooks such_method) (*args, **kwargs) python2. 7/dist- packages/ VMBuilder/ plugins/ libvirt/ __init_ _.py", line 80, in deploy
Traceback (most recent call last):
File "/usr/bin/
cli.main()
File "/usr/lib/
hypervisor.
File "/usr/lib/
self.
File "/usr/lib/
call_
File "/usr/lib/
getattr(plugin, func, log_no_
File "/usr/lib/
if hostname in self.all_domains() and not self.vm.overwrite:
AttributeError: 'Libvirt' object has no attribute 'vm'