No network on virtual server

Discussion in 'HOWTO-Related Questions' started by ptomblin, Oct 17, 2006.

  1. ptomblin

    ptomblin New Member

    I'm trying to run through the "Perfect Xen 3.0 Setup for Debian". I had to make some changes because Xen now only installs 1 kernel, not separate ones for -xen and -xenU. But now that I've got a virtual machine running in step 4.2, it doesn't have any network.

    Here is my /etc/xen/vm01-config.sxp
    Code:
    name="vm01"
    kernel="/boot/vmlinuz-2.6-xen"
    root="/dev/hda1"
    memory=128
    disk=['file:/home/vmserver/vm_base.img,hda1,w','file:/home/vmserver/vm_base-swap.img,hda2,w']
    
    # network
    vif=[ '' ]
    dhcp="off"
    ip="192.168.1.32"
    netmask="255.255.255.0"
    gateway="192.168.1.254"
    hostname="xen0.xcski.com"
    
    #extra="3"
    
    I'm wondering if it was correct in step 4.1 where it says to only enable the loopback device in /etc/network/interfaces

    After looging into it, I only see the loopback device when I do an ifconfig.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I've just played around with Xen 3.0.3, and in that version you don't need

    Code:
    dhcp="off"
    ip="192.168.1.32"
    netmask="255.255.255.0"
    gateway="192.168.1.254"
    hostname="xen0.xcski.com"
    in /etc/xen/vm01-config.sxp, but you must have

    Code:
    auto lo
    iface lo inet loopback
            address 127.0.0.1
            netmask 255.0.0.0
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 192.168.1.32
            netmask 255.255.255.0
            network 192.168.1.0
            broadcast 192.168.1.255
            gateway 192.168.1.254
    in vm01's /etc/network/interfaces and xen0.xcski.com in vm01's /etc/hostname.
     
  3. ptomblin

    ptomblin New Member

    Yes, that's what I've ended up doing, and it works, but it goes against the intention of the howto. The howto was showing how you could have one basic set-up, and then copy it an instantiate it for several different virtual systems. If you have to edit the copy for each system, that's not as smooth as only having to edit the configuration file for each one.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    The tutorial was written for Xen 3.0.1. If you use Xen 3.0.1, then you won't have problems.
     
  5. cifroes

    cifroes New Member

    Hi,

    I installed Xen 3.0.2 and configured the ips in each VM. I can ping from the VMs to the outside and from the outside to the VMs. I just can't ping from vm01 to vm02, any way to do it?

    How should I setup my networking for that configuration?

    Thanks
     
  6. falko

    falko Super Moderator Howtoforge Staff

Share This Page