On 05/29/2014 05:10 PM, Jason Van Patten wrote:
> 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?

Thanks for the suggestion, I didn't know about portgroups. I pushed some
patches now that add UI for this in virt-manager. Basically, when you select a
virtual network that has portgroups in its XML, we will show a little dropdown
where you can select which portgroup to use for the interface. I also added
virt-install --network portgroup= support.

You can test it with:

git clone git://git.fedorahosted.org/virt-manager.git
cd virt-manager
./virt-manager --debug

Thanks,
Cole

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to