$domain is not available in libvirtxml.tmpl

Bug #705395 reported by Sergey Svishchev
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
New
Low
Unassigned

Bug Description

I'm using customized libvirtxml.tmpl with vmbuilder. In Karmic, $domain was available, in Lucid, it isn't.

Revision history for this message
Dave Walker (davewalker) wrote :

Tentatively assigning to Serge Hallyn for comment if this is a regression, or a feature change. Are you aware of the cause of this?

Thanks.

Changed in vm-builder (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. Could you attach the template you are using, and the command which you use in karmic to make use of it?

Changed in vm-builder (Ubuntu):
status: New → Incomplete
Revision history for this message
Sergey Svishchev (svs) wrote :

Command line looks like this:

sudo vmbuilder kvm ubuntu --config .../vm.cfg ...

vm.cfg looks like this:

[kvm]
<...>
domain = example.com

[kvm/ubuntu]

suite = karmic
flavour = virtual
components = main,restricted,universe,multiverse
templates = .../vmbuilder
<...>

Sergey Svishchev (svs)
Changed in vm-builder (Ubuntu):
status: Incomplete → New
Changed in vm-builder (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the info, but please attach the complete files (replacing any passwords with XXX) and give the full command line. Your vm.cfg has 'templates = ../vmbuilder' - what is in that directory?

Changed in vm-builder (Ubuntu):
status: In Progress → Incomplete
importance: Medium → Low
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I don't believe this bug is valid. I tested it by exploiting the fact that '$domain' is used in /etc/vmbuilder/ubuntu/etc_hosts.tmpl. So, I ran:

vmbuilder kvm ubuntu --suite=lucid --mirror=http://localhost:3142/us.archive.ubuntu.com/ubuntu/ --config=my.cfg

where my.cfg contained:

============================
[ubuntu]

domain = fakehallyn.com
hostname = myvm
=============================

The /etc/hosts on the resulting machine contained my entries.

In your example .cfg file, you have 'domain' under

[kvm/ubuntu]. Since you didn't show me your templates I can't be sure, but I suspect you needed to use [kvm] or [ubuntu].

I'm marking this Invalid. If you feel I'm wrong about that, please re-mark it 'New' and upload all your templates in a tarfile (so that I can also see their hierarchy).

Changed in vm-builder (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Sergey Svishchev (svs) wrote :

Indeed, $domain works in /etc/vmbuilder/ubuntu/etc_hosts.tmpl, but it still doesn't in libvirt/libvirtxml.tmpl

2011-06-08 14:40:50,519 INFO : Calling hook: deploy
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 24, in <module>
    cli.main()
  File "/usr/lib/python2.6/dist-packages/VMBuilder/contrib/cli.py", line 121, in main
    hypervisor.finalise(destdir)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/hypervisor.py", line 78, in finalise
    self.call_hooks('deploy', destdir)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/distro.py", line 66, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/util.py", line 158, in call_hooks
    getattr(plugin, func, log_no_such_method)(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/libvirt/__init__.py", line 78, in deploy
    vmxml = VMBuilder.util.render_template('libvirt', self.context, 'libvirtxml', tmpl_ctxt)
  File "/usr/lib/python2.6/dist-packages/VMBuilder/util.py", line 147, in render_template
    output = t.respond()
  File "_tmp_tmp_uasGWMW6K5_705395_tmpl_libvirt_libvirtxml_tmpl.py", line 94, in respond
NameMapper.NotFound: cannot find 'domain'

Changed in vm-builder (Ubuntu):
status: Invalid → New
Changed in vm-builder (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.