[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] Re: Communicating with VM before Network is configured.
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |