Hello Freescale team. I have run two Linux guests with virtual eth0 in P4080DS following HOW-TOs in SDK 1.5 (parts KVM-QEMU). Everything works as expected, but i bored to setup network address, hostname, routing table again-and-again when launch guest linux. I was sure that script /root/qemu-ifup will run in guest side and write something looking:
root@p4080ds:/root# cat qemu-ifup_gest1 #!/bin/sh
#/root/qemu-ifup_gest1
# TAP interface will be passed in $1 bridge=br0 guest_device=$1
ifconfig $guest_device up
brctl addif $bridge $guest_device
#ifconfig eth0 192.168.32.33 up
#route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.32.32 metric 0 dev eth0
#hostname gest1
And find that qemu-ifup_gest1 runs on Host side, and commented out lines expected to setup initial network parameters on guest1.
And again my qwestion: How to setup initial ip address, routing ... in guest of QEMU-KVM?
Here is info about networking bridge on Host side: br0 inet addr:192.168.32.32 Bcast:192.168.32.255 Mask:255.255.255.0
已解决! 转到解答。
On the guest side, bridged network interfaces are bought up as ordinary network interfaces. If your guest brings up it's network with
network scripts, which is the SDK default, you should alter /etc/network/interfaces on the guest as required. See man 8 ifup and man 5 interfaces for details.
If your guest uses a virtual disk, you can edit this file directly. If the guest uses an initrd image as it is described in our SDK documentation, you should
alter the SDK package that provides /etc/interfaces and redeploy the guest rootfs image.
The SDK package that is responsible for populating /etc/interfaces in the target root filesystem is 'init-ifupdown'. For a quick solution, you can add your statements directly to
<SDK_INSTALL_PATH>/meta-fsl-networking/recipes-core/init-ifupdown/files/interfaces and rebuild.
Refer to Yocto documentation for more information on working with Yocto:
http://www.freescale.com/infocenter/topic/QORIQSDK/2888160.html
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
On the guest side, bridged network interfaces are bought up as ordinary network interfaces. If your guest brings up it's network with
network scripts, which is the SDK default, you should alter /etc/network/interfaces on the guest as required. See man 8 ifup and man 5 interfaces for details.
If your guest uses a virtual disk, you can edit this file directly. If the guest uses an initrd image as it is described in our SDK documentation, you should
alter the SDK package that provides /etc/interfaces and redeploy the guest rootfs image.
The SDK package that is responsible for populating /etc/interfaces in the target root filesystem is 'init-ifupdown'. For a quick solution, you can add your statements directly to
<SDK_INSTALL_PATH>/meta-fsl-networking/recipes-core/init-ifupdown/files/interfaces and rebuild.
Refer to Yocto documentation for more information on working with Yocto:
http://www.freescale.com/infocenter/topic/QORIQSDK/2888160.html
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------