[virt-tools-list] Portgroups in Virt-Manager VM Setup

Jason Van Patten jvp at lateapex.net
Thu May 29 21:10:09 UTC 2014


Hey folks -

Are there any plans to support the portgroup configuration in virt-manager when configuring a new VM?  Here’s why I ask:

I’m using openvswitch with KVM, and the vswitch I’ve created has two portgroups on it.  Those portgroups correspond to trunked VLANs from my upstream managed switch.  The network is defined like this:

<network>
        <name>openvswitch</name>
        <forward mode='bridge'/>
        <bridge name='ovsbr1'/>
        <virtualport type='openvswitch'/>
        <portgroup name=‘vlan-100'>
                <vlan>
                        <tag id=‘100'/>
                </vlan>
        </portgroup>
        <portgroup name=‘vlan-200'>
                <vlan>
                        <tag id=‘200'/>
                </vlan>
        </portgroup>
        <portgroup name='all'>
                <vlan trunk='yes'>
                        <tag id=‘100'/>
                        <tag id=‘200'/>
                </vlan>
        </portgroup>
</network>

When I create a new VM in virt-manager, all it sees is the “openvswitch” network, which I can select.  But I have to go in after the VM’s XML is created, edit it, and add the portgroup= bit in the “source network” line.

    <interface type='network'>
      <mac address='00:50:56:10:00:01'/>
      <source network='openvswitch' portgroup=‘vlan-200'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

This usually makes the VM’s first boot a failure since it has no proper networking.  If the installer tries to use networking during the first boot, it’ll also fail.

Is this something that could be considered?  Or am I doing VLANs on the hypervisor in an incorrect way?

Thanks!
--
Jason Van Patten





More information about the virt-tools-list mailing list