[Bug 392097] Re: vmbuilder ignores mac option when using bridge network

Keith krbaker at metacarta.com
Fri May 7 19:57:07 BST 2010


Are you sure? this looks still broken in Lucid for me.

Most recent files in the archive are 0.12.3 which was released the day
the 'fixed' comment was posted but...

apt-get source python-vm-builder
cat vm-builder-0.12.3/VMBuilder/plugins/libvirt/templates/libvirtxml.tmpl
<domain type='kvm'>
  <name>$hostname</name>
  <memory>#echo int($mem) * 1024 #</memory>
  <vcpu>$cpus</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
#if $bridge
    <interface type='bridge'>
      <source bridge='$bridge'/>
#else
    <interface type='network'>
#if $mac
      <mac address='$mac'/>
#end if
#if $network
      <source network='$network'/>
#end if
#end if
#if $virtio_net
      <model type='virtio'/>
#end if
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' listen='127.0.0.1'/>
#for $disk in $disks
    <disk type='file' device='disk'>
      <source file='$disk.filename' />
      <target dev='hd$disk.devletters()' />
    </disk>
#end for
  </devices>
</domain>


I think the file has changed a bit and still has the bug, here's a new diff:
--- vm-builder-0.12.3/VMBuilder/plugins/libvirt/templates/libvirtxml.tmpl       2010-02-24 17:05:47.000000000 -0500
+++ /etc/vmbuilder/libvirt/libvirtxml.tmpl      2010-05-07 14:56:32.000000000 -0400
@@ -20,9 +20,6 @@
       <source bridge='$bridge'/>
 #else
     <interface type='network'>
-#if $mac
-      <mac address='$mac'/>
-#end if
 #if $network
       <source network='$network'/>
 #end if
@@ -30,6 +27,9 @@
 #if $virtio_net
       <model type='virtio'/>
 #end if
+#if $mac
+      <mac address='$mac'/>
+#end if
     </interface>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='-1' listen='127.0.0.1'/>

-- 
vmbuilder ignores mac option when using bridge network
https://bugs.launchpad.net/bugs/392097
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in ubuntu.



More information about the Ubuntu-server-bugs mailing list