You are not logged in.

#1 2013-06-02 08:32:35

Rachus
Member
Registered: 2012-12-12
Posts: 34

[SOLVED] QEMU networking command line

Hello,

my virtual machine does not have any network devices, when I explicitly give a netdev user,id=... (which is the default, when I remember correctly). This is the commandline which I tried:

qemu-system-x86_64 -enable-kvm -smp 2 -m 384 -netdev user,id=guestnet,restrict=off,net=192.168.1.0/24,dhcpstart=192.168.1.5,hostfwd=tcp::12345-:22 server

But lspci and ip link don't show any devices. This commandline has exactly the same effect (and this should be the default, when no option is given):

qemu-system-x86_64 -enable-kvm -smp 2 -m 384 -netdev user,id=guestnet server

My guest only finds a network device when there are no netdev user,id=... arguments.

What is wrong with the command lines above?

Thanks for your help.

Last edited by Rachus (2013-06-02 10:45:07)

Offline

#2 2013-06-02 10:04:00

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] QEMU networking command line

add

-net nic

Offline

#3 2013-06-02 10:19:00

neilzium
Member
Registered: 2011-12-17
Posts: 41

Re: [SOLVED] QEMU networking command line

IIRC each -netdev argument needs a corresponding -device argument. Here's an example.. This seems to be the newer, preffered method compared to -net and is used by libvirt. There may be no difference for user mode networking though.

Offline

#4 2013-06-02 10:44:53

Rachus
Member
Registered: 2012-12-12
Posts: 34

Re: [SOLVED] QEMU networking command line

65kid wrote:

add

-net nic

Well, then I have a device, but the dhcp server of qemu does not work anymore.

neilzium wrote:

IIRC each -netdev argument needs a corresponding -device argument. Here's an example.. This seems to be the newer, preffered method compared to -net and is used by libvirt. There may be no difference for user mode networking though.

Thanks, works perfectly. Sometimes it is hard to find something in the documentation.

Offline

Board footer

Powered by FluxBB