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_PATHlogger: /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? -- Regards, David Shen http://about.me/davidshen https://twitter.com/#!/davidshen84 _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Fajar A. Nugraha
2012-Apr-14 10:07 UTC
Re: vif-bridge script is called even configured to use NAT
On Sat, Apr 14, 2012 at 10:12 AM, Xi Shen <davidshen84@gmail.com> 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
err...I followed this guide<http://wiki.kartbuilding.net/index.php/Xen_Networking#Routed_Networking_with_NAT_2>, 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@gmail.com<javascript:;>> > 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 _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
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<http://wiki.kartbuilding.net/index.php/Xen_Networking#Routed_Networking_with_NAT_2>, > 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@gmail.com> 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@lists.xen.org http://lists.xen.org/xen-users
Fajar A. Nugraha
2012-Apr-14 22:03 UTC
Re: vif-bridge script is called even configured to use NAT
On Sat, Apr 14, 2012 at 7:10 PM, Xi Shen <davidshen84@gmail.com> wrote:> 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?Did you read the link I sent earlier? Use that, and then setup xen to use that bridge. -- Fajar
Yes, I read. Except I do not use Ubuntu, but Gentoo. Anyway, I figured it out myself. Thanks. On Sunday, April 15, 2012, Fajar A. Nugraha wrote:> On Sat, Apr 14, 2012 at 7:10 PM, Xi Shen <davidshen84@gmail.com<javascript:;>> > wrote: > > 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? > > Did you read the link I sent earlier? > > Use that, and then setup xen to use that bridge. > > -- > Fajar >-- Regards, David Shen http://about.me/davidshen https://twitter.com/#!/davidshen84 _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users