epcim
9/8/2016 - 10:32 PM

kvm, virsh live attach network interface to VM

kvm, virsh live attach network interface to VM

etc/network/interfaces:

  auto em1.250                                                                                      
  iface em1.250 inet manual                                                                         
    vlan-raw-device em1                                                                             
    mtu 1500                                                                                        
                                                                                                    
  auto br250                                                                                        
  iface br250 inet static                                                                           
    bridge_ports em1.250                                                                            
    bridge_maxwait 5                                                                                
    bridge_stp off                                                                                  
    address 10.1.37.201                                                                             
    netmask 22                                                                                      
    mtu 1500       

Attach:

  virsh attach-interface --domain ctl01.os2.xxx.local --type bridge --source em1.250 --model virtio --mac  ac:de:48:77:a2:32 --config --live