[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] vif-bridge script is called even configured to use NAT



I have just tried the 'script' option, it does no work at all.

I am going to take your advice and set up my network bridge myself. But I do not have much knowledge with bridging. I used KVM before, and you need to set up KVM network by manual. This is how I set up a NAT network for my KVM vm:

  tunctl -u user
  ip link set promisc on dev tap0
  ip addr add 10.0.0.1/24 dev tap0
  ip link set up dev tap0

kvm -net nic,macaddr=mac -net tap,ifname=tap0,script=no,downscript=no /path/to/kvm.img

KVM uses TAP, instead Xen uses bridge. Can you be kind to help me translate above script so it works with Xen?

Thank you.


On Saturday, April 14, 2012, Xi Shen wrote:
err...I followed this guide, and it did not mention the 'script' option. I will give it a try.

Thanks.


On Saturday, April 14, 2012, Fajar A. Nugraha wrote:
On Sat, Apr 14, 2012 at 10:12 AM, Xi Shen <davidshen84@xxxxxxxxx> wrote:
> Hi,
>
> In my /etc/xen/xend-config.sxp file, I configured to use NAT-network:
>
> (network-script 'network-nat netdev=wlan0')
> (vif-script   vif-nat)
>
>
> In my VM configure file, I added:
>
> vif = ['ip=10.0.0.1' ]
>
>
> My xend service started fine. But when I start my VM (Windows 7), I got
> following messages:
>
> logger: /etc/xen/scripts/vif-bridge: online type_if=vif
> XENBUS_PATH=backend/vif/5/0
> logger: /etc/xen/scripts/vif-bridge: add type_if=tap XENBUS_PATH=
> logger: /etc/xen/scripts/vif-bridge: Writing backend/vif/5/0/hotplug-error
> Could not find bridge device xenbr0 backend/vif/5/0/hotplug-status error to
> xenstore.
> logger: /etc/xen/scripts/vif-bridge: Could not find bridge device xenbr0
> logger: /etc/xen/scripts/vif-bridge: Writing
> /local/domain/0/backend/vif/5/0/hotplug-error Could not find bridge device
> xenbr0 /local/domain/0/backend/vif/5/0/hotplug-status error to xenstore.
> logger: /etc/xen/scripts/vif-bridge: Could not find bridge device xenbr0
>
>
> It seems it is trying to use the bridge network, since the xend service is
> configured to use NAT script, it cannot find the bridge device. How to fix
> this?

I'm pretty sure that if you use network-script, you also need to put
something like

vif = ['ip=10.0.0.1' , script='vif-nat']

Plus, instead of using xen's vif-bridge/vif-nat script, it's better to:
- leave network-script in xend-config.sxp commented out
- create your OWN bridge
- add necessary iptables rules if you want to use NAT

Several bridging examples for ubuntu/debian:
http://wiki.1tux.org/wiki/Ubuntu/Bridge

--
Fajar


--
Regardsï
David Shen

http://about.me/davidshen
https://twitter.com/#!/davidshen84


--
Regardsï
David Shen

http://about.me/davidshen
https://twitter.com/#!/davidshen84
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.