Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th April 2006, 00:20
Mito Mito is offline
Junior Member
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default The Perfect Xen 3.0 Setup For Debian - Virtual Networking

Ok, well it looks like I'm not the only one having an issue with this HowTo, but my problem is a bit different than his.

My problem is that I can't get the virtual networking to work at all! There is a slight difference though, I'm not running Debian, I'm running RedHat FC4 as my guest OS (this is due to a requirement of one of the software that I am running on this domU). Everything should be the same on page 6 though, reguardless of what linux distro you're using. No matter what I've done, I can't get it to work. I just posted to the Xen-Users mailing list for help as well, but have only gotten replies from people asking me to tell them how to fix it once I figure out how to fix it myself, which means I'm far from the only one with this problem!

Is there anything anyone can suggest to help me figure out what's going on? The networking was working great until I tried to enable the NAT, and now it doesn't work at all (unless of course I change it back to bridged, which isn't going to be workable for me...).

Thanks in advance for any help you can give!

Mito
Reply With Quote
Sponsored Links
  #2  
Old 25th April 2006, 17:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

What's the output of
Code:
ifconfig
on dom0? Which iptables rules are you using? Can you post one of your vm configuration files here?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 25th April 2006, 17:33
Mito Mito is offline
Junior Member
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ifconfig on dom0
Code:
[root@xendom0 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:B0:D0:EA:49:75
          inet addr:192.168.200.30  Bcast:192.168.200.255  Mask:255.255.255.0
          inet6 addr: fe80::2b0:d0ff:feea:4975/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72235 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2787 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6852932 (6.5 MiB)  TX bytes:477136 (465.9 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:37 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5177 (5.0 KiB)  TX bytes:5177 (5.0 KiB)

vif1.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet addr:10.0.0.129  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:23 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:64804 (63.2 KiB)  TX bytes:2772 (2.7 KiB)
xen domU config file
Code:
name = "mail"
kernel = "/boot/vmlinuz-2.6.16-1.2096_FC5xenU"
ramdisk = "/boot/initrd-2.6.16-1.2096_FC5xenU.img"
memory = 416
root = "/dev/sda1 ro"
disk = ['file:/guests/mail-server.img,sda1,w', 'file:/guests/mail-server.swap,sda2,w']

# Network Configuration
vif=[ 'ip=10.0.0.2' ]
dhcp="off"
ip="10.0.0.2"
netmask="255.0.0.0"
gateway="10.0.0.254"
hostname = "mail.mydomain.com"
You'll note that the vif1.0 IP address on dom0 is not x.254 however, it's x.129. I did try that as the gateway as well, and it still didn't do any good. Also, I'm not sure what happened, but at some point in my troubleshooting, the changes that I made to the network settings in the config file stopped taking effect in the domU, and now I have to keep changing the settings inside the domU instead. Here is the ifcfg-eth0 file in the domU:
Code:
[root@mail ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.0.0
IPADDR=10.0.0.20
GATEWAY=10.0.0.254
Reply With Quote
  #4  
Old 26th April 2006, 15:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Please add
Code:
extra="3"
to the domU configuration file and restart the domU.
extra="3" means runlevel 3. Maybe your domU is now in a runlevel where networking is not available.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 26th April 2006, 16:37
Mito Mito is offline
Junior Member
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just added that line, and it didn't change anything.

Just to note, the domU does apear to have functional networking, as it worked before I change the dom0 config to use the NAT scripts. Also, the domU can ping itself, just not anything else.

Here's the domU's ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 00:16:3E:7B:F0:C3
          inet addr:10.0.0.20  Bcast:10.0.255.255  Mask:255.255.0.0
          inet6 addr: fe80::216:3eff:fe7b:f0c3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:168 (168.0 b)  TX bytes:4695 (4.5 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:888 (888.0 b)  TX bytes:888 (888.0 b)
Notice it's taking it's IP configuration from the ifcfg-eth0 file and not the xen config file. I don't know when that happened, but it happened when troubleshooting this problem.

Thanks for any help you can give, I'm totally confused as to why this isn't working!
Mito
Reply With Quote
  #6  
Old 27th April 2006, 00:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

And when you remove the configuration from ifcfg-eth0, what's the output of
Code:
ifconfig
then on domU?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 27th April 2006, 06:28
Mito Mito is offline
Junior Member
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
And when you remove the configuration from ifcfg-eth0, what's the output of
Code:
ifconfig
then on domU?
Well, when I cleared it and restarted the network service, it gave me this error when starting:
Code:
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Missing config file ifcfg-ifcfg-eth0.
[  OK  ]
But then when I did ifconfig it gave me the same as before. So then I restarted domU and when starting the network services it gave the same error, and this time there was just the loopback device in ifconfig.

So then I thought, maybe it doesn't refresh it's config file if it's rebooted, so instead of rebooting it, I shutdown domU then started it back up again. Yet again, the same errors when starting eth0 and just 'lo' as the network device:
Code:
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
I just don't know what's going on...
Reply With Quote
  #8  
Old 27th April 2006, 13:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Maybe the domU kernel which was compiled on Debian doesn't work for Fedora...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 27th April 2006, 14:42
Mito Mito is offline
Junior Member
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Maybe the domU kernel which was compiled on Debian doesn't work for Fedora...
I'm not using the debian kernel, I'm using the kernel that was supplied when I installed it...

When I installed xen I used yum, by typing:
Code:
yum install xen kernel-xen0 kernel-xenU
a friend of mine suggested that it's possible that the FC4 build of that kernel doesn't support NAT, so last night I started compiling xen from scratch, and then we'll see how that goes.
Reply With Quote
  #10  
Old 27th April 2006, 17:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by Mito
I'm not using the debian kernel, I'm using the kernel that was supplied when I installed it...
I was thinking that you're using Debian on dom0, but obviously that's not the case.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect Xen 3.0 Setup For Debian - virtual network problem rsacon HOWTO-Related Questions 11 21st April 2006 22:24
Ubuntu "the perfect setup with RAID 1" Hans Installation/Configuration 1 16th January 2006 18:50
Fedora Core 4 - The Perfect Setup nandhu HOWTO-Related Questions 27 10th January 2006 13:23
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04
Attempting The Perfect Setup (To Some Extent) PsyVision HOWTO-Related Questions 3 3rd November 2005 12:50


All times are GMT +2. The time now is 11:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.