Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)
share|improve this question
    
Does it appear when you type ifconfig -a? –  Heis Spiter Jan 4 '13 at 10:00
    
@HeisSpiter not at all –  davids Jan 4 '13 at 10:01
    
Does it appears in lspci (given you know its hardware model)? –  Heis Spiter Jan 4 '13 at 10:29
    
@HeisSpiter just one card (see the edited question) –  davids Jan 4 '13 at 10:35
1  
Just sounds like you never added your second NIC. Did you reboot? –  Heis Spiter Jan 4 '13 at 10:47
show 1 more comment

2 Answers

up vote 1 down vote accepted

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

share|improve this answer
add comment

Finally found the solution. Rebooting the machine is not enough, stopping the VM and starting it again is needed.

So simple, so annoying

share|improve this 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, 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" –  dyasny Jan 4 '13 at 12:01
    
@dyasny I agree with you, why don't you post that as an answer and not as a comment? –  davids Jan 4 '13 at 12:05
    
you're probably right, done –  dyasny Jan 4 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.