[OpenIndiana-discuss] KVM with multple ethernets

Gabriele Bulfon gbulfon at sonicle.com
Fri Jan 15 14:19:46 UTC 2021


Hi,
 
has anyone tried to use kvm with multiple ethernets?
What I'm trying to do is to have the first eth linked to the main igb0, and have some other ones to separate etherstubs.
So what I did is this:

sonicle at dev:~$ dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
igb0        phys      1500   up       --         --
igb1        phys      1500   unknown  --         --
switch0     etherstub 9000   up       --         --
switch1     etherstub 9000   up       --         --
switch2     etherstub 9000   up       --         --
switch3     etherstub 9000   up       --         --
switch4     etherstub 9000   up       --         --
xstreamos1  vnic      9000   up       --         switch1
xstreamos2  vnic      9000   up       --         switch2
xstreamos3  vnic      9000   up       --         switch3
xstreamos4  vnic      9000   up       --         switch4
xstreamos0  vnic      1500   up       --         igb0
 
 
And then have this command running the VM (done using kvmadm):

 /usr/bin/qemu-kvm
-name xstreamos
-enable-kvm
-no-hpet
-m 4096
-cpu qemu64
-smp 2
-rtc base=utc,driftfix=slew
-pidfile /var/usr/run/xstreamos/xstreamos.pid
-monitor unix:/var/usr/run/xstreamos/xstreamos.monitor,server,nowait,nodelay
-uuid fb4a8aa8-25ee-47ad-98ff-dae391ef066b
-vga std
-vnc 0.0.0.0:0,console
-drive file=/dev/zvol/rdsk/data/kvm/xstreamos/rpool,if=virtio,media=disk,index=0,serial=0,cache=writeback,boot=on
-drive file=/dev/zvol/rdsk/data/kvm/xstreamos/disk1,if=virtio,media=disk,index=1,serial=1,cache=writeback
-drive file=/dev/zvol/rdsk/data/kvm/xstreamos/disk2,if=virtio,media=disk,index=2,serial=2,cache=writeback
-drive file=/dev/zvol/rdsk/data/kvm/xstreamos/disk3,if=virtio,media=disk,index=3,serial=3,cache=writeback
-boot order=cd
-device virtio-net-pci,mac=02:08:20:05:cf:59,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0
-net vnic,vlan=0,name=net0,ifname=xstreamos0
-device virtio-net-pci,mac=02:08:20:af:bf:ab,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0
-net vnic,vlan=0,name=net1,ifname=xstreamos1
-device virtio-net-pci,mac=02:08:20:ab:44:06,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0
-net vnic,vlan=0,name=net2,ifname=xstreamos2
-device virtio-net-pci,mac=02:08:20:dd:4a:15,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0
-net vnic,vlan=0,name=net3,ifname=xstreamos3
-device virtio-net-pci,mac=02:08:20:21:11:18,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0
-net vnic,vlan=0,name=net4,ifname=xstreamos4
-boot c
-daemonize
 
The big problem is that once the VM starts, qemu goes crazy during bios boot, host goes 100% cpu, and I have only the console responding, to kill qemu-kvm process.
If I use all eths as linked to separate etherstubs, system boots, but then I have no access to the VM from the network.
If I just use one eth over igb0, it works fine.
 
I'm doing this on our XStreamOS distro, but I think may be the same on other distros as well.
 
Any idea? Maybe I should use different dladm nic types for this?
 
Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 



More information about the openindiana-discuss mailing list