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

Re: [Xen-users] switch to static ip


  • To: "Marco Mandl" <marco.mandl@xxxxxx>
  • From: "Henning Sprang" <henning_sprang@xxxxxx>
  • Date: Sun, 22 Apr 2007 18:59:32 +0200
  • Cc: xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Sun, 22 Apr 2007 09:58:25 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Twrf7E4ya0ZGtsYr2MsEmgLvH3tqmpiQY0IjfvlJwhabviKelLqQpDPahQCx18FOkwHqADJ5/uIA3wU6R39g5PDNABEXzN89LP5hRNNQ+WwoxOfHffRfWU80MTVpo94+3fnci+sP3ALnPvv6CadddVSxnv+582XoZjsOVyWp3WY=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

On 4/20/07, Marco Mandl <marco.mandl@xxxxxx> wrote:
Hello,

I migrated a sarge installation into a domU. I did this using dhcp. That
worked fine.

Dhcp makes migrating domU's from real hardware to a Xen domU?
Interesting, I thought it's just delivering IP configurations :)


But now I want to switch to static ip address.

In the corresponding xmdomain.cfg I change:
#dhcp = 'dhcp'
#vif  = [ '' ]
dhcp = "off"
ip = "192.168.17.16"
netmask = "255.255.255.0"
#broadcast = "192.168.17.255"
#network = "192.168.17.0"
gateway = "192.168.17.1"

The "ip", "gateway" and "netmask" settings only affect the Xen
networking scripts, mainly in routed, but probably also in nated mode
(never used natted mode myself). They do not actually change the
configuration of your DomU's interfaces.

I even tried to changed the /etc/network/interfaces of the domU:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
name Ethernet LAN card
address 192.168.17.16
netmask 255.255.255.0
broadcast 192.168.17.255
network 192.168.17.0
gateway 192.168.17.1

That is the way to go - configure a static IP in the domU itself.

But there is no eth0 in domU:
$ sudo ifconfig -s
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
lo    16436 0      1461      0      0      0    1461      0      0      0 LRU

Network of dom0 seems to be ok:

What am I doing wrong?

Apart from the things said, look at the "vif" config line - why did
you comment it out?
If you tell Xen that your VM shouldn't have a network interface, it
will not have one.

Read the Xen manual about configuring network cards, and look at the
example configs to correct this  (hint: try just  commenting the vif
line back in).

Henning

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

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