Ubuntu – KVM – Guest does not recognize second NIC

kvm-virtualizationnetworkingproxmoxUbuntu

I have a server running Proxmox (a virtualization platform), and created a KVM virtual machine with Ubuntu Server 12.10. After configuring the network, everything works fine, but if I add a second network adapter to that virtual machine, it is not recognized. dmesg | grep -i eth just shows one interface (eth0).

EDIT:

root@ubuntuserver1:~# lspci 
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:12.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)

Best Answer

KVM and qemu based VMs are just processes. A disk is a resource assigned to the process. If you add a disk, but you don't restart the process, it will not be detected. Rebooting a VM does not restart it, instead, an actual reboot is simulated. So when you stop/start the VM, it actually kills the VM process and starts it with the new settings.

Sorry, things are more complex of course, and I'm being oversimplistic, but once you know how things work, I find it answers questions better than a "do A then B and things will click"

PS: the newer versions of qemu-kvm have a hotplug feature for disks and NICs

Related Topic