WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Re: Communicating with VM before Network is configured.

To: tbrown@xxxxxxxxxxxxx
Subject: [Xen-users] Re: Communicating with VM before Network is configured.
From: Ligesh <myself@xxxxxxxxxx>
Date: Tue, 18 Jul 2006 04:25:07 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 17 Jul 2006 15:58:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.44.0607171509100.5814-100000@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20060718071115.GA11356@xxxxxxxxxx> <Pine.LNX.4.44.0607171509100.5814-100000@xxxxxxxxxxxxxxxxxx>
Reply-to: Ligesh <myself@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Mon, Jul 17, 2006 at 03:16:52PM -0700, tbrown@xxxxxxxxxxxxx wrote:
> On Tue, 18 Jul 2006, Ligesh wrote:
> 
> >  I have a specific requirement to assign static ips to a VM. My question
> > is: is there a way to accomplish this. In Vmware you can do it by
> > defining a variable machine.id in the config file variable, which can be
> > accessed from inside VM using the the vmware-guestd on linux or
> > vmwareservice.exe on linux. This is generally a good idea, and I want to
> > know if Xen supports something like this, or what I should do to get
> > this implemented etc etc.
> 
> I expect vmware does this by controlling both the MAC address and the DHCP
> server, that certainly seems like the simplest way ... you could impliment
> the same functionality yourself.

 Sorry, I guess my statement wasn't clear. The machine.id doesn't set the ip 
address or anything. It is just a method to send a string to the Virtual 
Machine without using the network communication. If you want to use it to set 
the ip address, you have to do the work yourself, that is, you have write an 
init script for both linux and windows that will use the vmwareService to get 
the machine.id, and inside this machine.id you can put the ipaddress.

 So in the config file you define like this:

 --------
 machine.id = "myMachine 68.55.56.89"
 ------

 In the VM, you have to write a script

 --------------
 $string=/etc/vmware/vmware-guestd --cmd 'machine.id.get'
 $ip=`echo $string | cut -d 1 `
 ifconfig eth0 $ip
 -------------

 You can do whatever you want actually. Vmware just provides you a mechanism to 
transfer a string to the VM without the help any of the higher level 
transportation services that's all.  It is an internal mechanism. Most likely 
the vmware-guestd executes a trapped instruction recognized by the Vmware VM 
Monitor, which then supplies it with the variable.

 It would just be nice to have this feature in Xen.



> 
> Failing that, you can pass info to the domU kernel "command line" the
> same way the root device is passed in. I use this method with my
> initrd to pass in nbd boot parameters:
> 


Yes. But what to do with Windows? On linux it is really possible. But we need a 
mechanism so that everything transparently works cross platform. Running 
Windows side by side is the greatest advantage of Xen. Quite frankly, I think 
for linux only virtualization, openVz is a slightly better idea, since it is so 
easy to manage. You can just manage everything inside the VM by using the vzctl 
command.

vzctl set 50 --ipadd 192.168.1.1
or generally
vzctl exec 50 "cmd"


 Thanks for your response.


--
:: Ligesh :: http://ligesh.com 



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

<Prev in Thread] Current Thread [Next in Thread>