stepping-stone / vm-manager

The stoney cloud web interface.
http://www.stoney-cloud.org/
Other
0 stars 0 forks source link

Interface must be set according to the network configuration of a VM Pool #76

Open meichenberger opened 9 years ago

meichenberger commented 9 years ago

When creating a virtual machine from a template, the source bridge must be set according the network configuration.

The VM Pool defines the network range, therefore you know the corresponding subnet. The subnet entry contains the sstSourceBridge attribute.

This value is used to create the proper xml for the bridged interface:

    <interface type='bridge'>
      <mac address='52:54:00:c5:aa:aa'/>
      <source bridge='vmbr0'/>
      <target dev='kvm-1234_0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>