[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] how to disable DHCP client on qemu
From: |
Medi Montaseri |
Subject: |
Re: [Qemu-discuss] how to disable DHCP client on qemu |
Date: |
Fri, 26 Jan 2018 15:42:55 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
I don't think we are using libvert...here is the actual call to
runqemu(1) and sub-sequent call to qemu-system-x86_64.
FYI, I am requesting two serial devices and two network interface
devices (tap0 and tap1)
=== About to run [runqemu qemux86-64 serial kvm notap qemuparams="-m 256 -device
virtio-serial -chardev socket,path=.//tty0,server,nowait,id=tty0 -device
virtserialport,chardev=tty0,name=tty0 -chardev socket,path=.//tty1,server,nowait,id=tty1
-device virtserialport,chardev=tty1,name=tty1 -net
nic,model=virtio,macaddr=52:54:00:12:34:124 -net tap,ifname=tap0,script=no,downscript=no
-net nic,model=virtio,macaddr=52:54:00:12:34:125 -net
tap,ifname=tap1,script=no,downscript=no "]
Running qemu-system-x86_64...
/home/medim/work3/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/qemu-system-x86_64
-kernel
/home/medim/work3/build/tmp-glibc/deploy/images/qemux86-64/bzImage-qemux86-64.bin
-cpu kvm64 -drive
file=/home/medim/work3/build/tmp-glibc/deploy/images/qemux86-64/og-image-consoleserver-dev-qemux86-64-20180126232855.rootfs.ext4,if=virtio,format=raw
-show-cursor
-usb
-usbdevice tablet
-vga vmware -no-reboot -serial stdio -enable-kvm -m 256
-device virtio-serial
-chardev socket,path=.//tty0,server,nowait,id=tty0 -device
virtserialport,chardev=tty0,name=tty0
-chardev socket,path=.//tty1,server,nowait,id=tty1 -device
virtserialport,chardev=tty1,name=tty1
-net nic,model=virtio,macaddr=52:54:00:12:34:124 -net
tap,ifname=tap0,script=no,downscript=no
-net nic,model=virtio,macaddr=52:54:00:12:34:125 -net
tap,ifname=tap1,script=no,downscript=no
-append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda rw mem=256M ip=off
oprofile.timer=1 rootfstype=ext4 console=ttyS0"
Note how I have set "ip=off" (similar to ip=none) and I am expecting qemu to
stay off of network configuration, I'll do it later in my boot scripts
Thanks
Medi
On 01/23/2018 11:23 PM, Thomas Huth wrote:
Hi,
On 23.01.2018 21:01, Medi Montaseri wrote:
I am using qemu-system-x86_64
(x86_64-linux/qemu-native/2.5.0-r1/qemu-2.5.0 ) and multiple network
interface and in a bridged mode with the host.
[...]
I don't want qemu to run dhcpc as our own boot scripts will do
static/dynamic configurations on the tap devices.
1) Is there a command line option that I can use to instruct qemu not to
run any DHCP client ?
Are you sure that the DHCP service is coming from QEMU? As far as I
know, QEMU only provides DHCP for the "-netdev user" interfaces, but not
for tap / bridge.
Are you using libvirt or something similar on top of QEMU? If so, the
DHCP service might be provided by that layer instead, see for example:
https://wiki.libvirt.org/page/VirtualNetworking#DNS_.26_DHCP
HTH,
Thomas