{"id":7439,"date":"2014-06-19T03:57:38","date_gmt":"2014-06-19T03:57:38","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/19\/cannot-run-a-vm-with-more-than-three-network-interfaces-with-kvm-collection-of-common-programming-errors\/"},"modified":"2014-06-19T03:57:38","modified_gmt":"2014-06-19T03:57:38","slug":"cannot-run-a-vm-with-more-than-three-network-interfaces-with-kvm-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/19\/cannot-run-a-vm-with-more-than-three-network-interfaces-with-kvm-collection-of-common-programming-errors\/","title":{"rendered":"Cannot run a VM with more than three network interfaces with KVM-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/75c27fedfe52486cdf1fd7cda1146281?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJason Axelson<\/p>\n<p>I&#8217;m running KVM on top of Ubuntu 10.10 Server<\/p>\n<p>I can create VM&#8217;s (Virtual Machine) and network interfaces fine but I cannot seem to add more than three network interfaces. As soon as I have a VM with four network interfaces it gets stuck on startup at the starting SeaBIOS page with this message:<\/p>\n<pre><code>Starting SeaBIOS (version pre-0.6.1-20100702_143500-palmer)\n<\/code><\/pre>\n<p>So far I&#8217;ve verified this with two VM&#8217;s, a Ubuntu 10.10 desktop and a Vyatta router. The specific network hardware I assign to the VM&#8217;s doesn&#8217;t seem to matter. I&#8217;m trying to have one bridged interface and three private networks using Vyatta to route between them.<\/p>\n<p>Does anyone know why I can&#8217;t run a VM with more than three network interfaces?<\/p>\n<p>Edit: Additionally the KVM thread responsible for the specific VM hangs using ~100% CPU (i.e. one core). Here&#8217;s the command for the process that is hanging:<\/p>\n<pre><code>\/usr\/bin\/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name vyatta -uuid 6dff7c94-6810-423e-5fea-fec10da0e9b7 -nodefaults -chardev socket,id=monitor,path=\/var\/lib\/libvirt\/qemu\/vyatta.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive file=\/home\/rams\/virtual-machines\/vyatta.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device rtl8139,vlan=0,id=net0,mac=00:54:00:be:cc:4b,bus=pci.0,addr=0x3 -net tap,fd=97,vlan=0,name=hostnet0 -device rtl8139,vlan=1,id=net1,mac=52:54:00:da:59:ed,bus=pci.0,addr=0x5 -net tap,fd=98,vlan=1,name=hostnet1 -device rtl8139,vlan=2,id=net2,mac=52:54:00:ce:22:b6,bus=pci.0,addr=0x6 -net tap,fd=99,vlan=2,name=hostnet2 -device rtl8139,vlan=3,id=net3,mac=52:54:00:1e:bc:46,bus=pci.0,addr=0x7 -net tap,fd=101,vlan=3,name=hostnet3 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4\n<\/code><\/pre>\n<p>Edit: I&#8217;ve also found an error in dmesg that might be related (it also shows up when running virtd in verbose mode):<\/p>\n<pre><code>14:47:24.399: warning : qemudParsePCIDeviceStrs:1422 : Unexpected exit status '1', qemu probably failed\n<\/code><\/pre>\n<p>I&#8217;ve also tried disabling app armor but that doesn&#8217;t seem to make a difference.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/87e3d102ac82cfe984d556d07b66cc87?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndyasny<\/p>\n<p>Strange, I just started a VM on Fedora 14, with 4 NICs attached.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c2aa9ca8160da79aabe53f72ba2ca08a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnedm<\/p>\n<p>I don&#8217;t think it&#8217;s the number of NICs &#8212; are you using libvirt to create guests? Looks like it&#8217;s using RealTek (rtl8139) qemu drivers, which have sometimes been known to cause freezes or other issues under KVM. I would try switching them to e1000 or virtio.<\/p>\n<pre><code>virsh dumpxml vm1 &gt; vm1definition.xml\nvirsh destroy vm1\n<\/code><\/pre>\n<p>Edit the xml file and replace <code>rtl8139<\/code> in each NIC definition with <code>virtio<\/code> or <code>e1000<\/code><\/p>\n<pre><code>virsh create vm1definition.xml\n<\/code><\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Jason Axelson I&#8217;m running KVM on top of Ubuntu 10.10 Server I can create VM&#8217;s (Virtual Machine) and network interfaces fine but I cannot seem to add more than three network interfaces. As soon as I have a VM with four network interfaces it gets stuck on startup at the starting SeaBIOS page with this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7439","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7439"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7439\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}