On 28 April 2016 at 14:50, Leo Yan leo.yan@linaro.org wrote:
On Thu, Apr 28, 2016 at 12:22:17PM +0100, Neil Williams wrote:
On 28 April 2016 at 11:43, Leo Yan leo.yan@linaro.org wrote:
I tried to connect KVM from my local laptop, but cannot connect successfully; but I can access KVM from lab.validation.linaro.org. So KVM cannot directly access from LAVA lab's outside.
To connect to a VM running on a local machine - whether that is inside LAVA or not - relies upon the machine having bridged networking configured and having QEMU configured to use -net tap instead of -net user. LAVA device configuration can support -net tap but configuring the bridge in the first place is specific to how you use that laptop. It can be awkward to get it right if the laptop also has to work with one or more VPNs etc. Configuring the bridge on your machine is outside the scope of LAVA itself.
Thanks for this info; Let's simplize this issue :)
On my laptoo, I can try to directly connect KVM without VPN. So how I can set "-net tap"? I searched LAVA's hacking session, it says can specify this by using "context" field. But still don't know where I can add this entry so can get a quick try?
https://validation.linaro.org/static/docs/v2/hacking-session.html?highlight=...
That's the V2 documentation - take care because the docs for V1 and V2 are different and will continue to diverge.
Setting up bridging is beyond the scope of the LAVA documentation. It is entirely down to how you need to do it on your laptop and you'll need to work out the best config for your own machine yourself. It's an admin task and you need to know what you're doing or you can break your network configuration on that machine. This isn't a LAVA topic and setting up a bridge on your own machine is not necessarily a quick change to make. Bridging is not the same as using a VPN - if a VPN is configured, the VPN config needs to be taken into account when creating the bridge.
You won't be able to connect to the VM over the network unless QEMU can use a working bridge configuration - QEMU will simply fail if -net tap is used without a working bridge being available. An unbridged VM will be able to make outbound connections but not inbound connections.
Once you have a bridge device showing up in /sbin/ifconfig -a on your machine, then -net tap itself is set in the device configuration, e.g. https://git.linaro.org/lava/lava-lab.git/blob/HEAD:/validation.linaro.org/la...
I don't use a network bridge for testing my own local LAVA install.