Ligesh
2006-Jul-18 11:54 UTC
[Xen-devel] Communicating with the Guest Os before the network comes up.
Hi folks, I would like to know if it is possible to add a mechanism to send a simple string into the Virtual Machine. For instance, in the case of Vmware, we can define a variable called as machine.id in the config file, and this can be accessed from inside the VM using the /etc/vmware/vmware-guestd on linux or VmwareService.exe on Windows. The main purpose of this is to setup static ip address for the Virtual Machine. What you do is: In the config file you define the variable: ---------- machine.id = "Mtx <ipaddress>" ---------- Now from inside the VM you can acess this machine.id by executing vmware-guestd ---------------- $string = `vmware-guestd --cmd machine.id.get` $ip = `echo $string | cut -f 1` ifconfig eth0 $ip ---------------- This is portable across platforms, and would actually help a lot in the management of the VM. Now, as far as remote management is concerned, we have to depend on the network to have any type of interaction with the VM, which is a serious limitation. With this mode, it becomes sort of a backup, since a wide variety of commands can be passed to a daemon that will start at the bootup. For instance, you can ask it to execute an arbitrary command at the bootup using this method, which can help in recovering the machine in case one of the network services fails. Thanks. -- :: Ligesh :: http://lxlabs.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jacob Gorm Hansen
2006-Jul-18 20:02 UTC
Re: [Xen-devel] Communicating with the Guest Os before the network comes up.
On 7/18/06, Ligesh <xen@lxlabs.com> wrote:> > Hi folks, > > I would like to know if it is possible to add a mechanism to send a simple string into the Virtual Machine. For instance, in the case of Vmware, we can define a variable called as machine.id in the config file, and this can be accessed from inside the VM using the /etc/vmware/vmware-guestd on linux or VmwareService.exe on Windows. The main purpose of this is to setup static ip address for the Virtual Machine. What you do is:There is no need for a special mechanism, In linux you can set the static IP on the kernel command line, see this link for more info. http://www.faqs.org/docs/Linux-mini/NFS-Root.html#ss4.5 good luck, Jacob _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ligesh
2006-Jul-19 05:45 UTC
[Xen-devel] Re: Communicating with the Guest Os before the network comes up.
On Tue, Jul 18, 2006 at 01:02:05PM -0700, Jacob Gorm Hansen wrote:> > There is no need for a special mechanism, In linux you can set the > static IP on the kernel command line, see this link for more info. > > http://www.faqs.org/docs/Linux-mini/NFS-Root.html#ss4.5 >Yes, on linux you can pass arguments to the kernel commandline which can be read from the /proc/cmdline. But I needed a cross platform generic method by which to bootstrap the network of the guest OS, and currently it appears there isn''t one. In fact, when it comes to Xen, my primary aim is to run Windows. Thanks. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2006-Jul-19 06:45 UTC
Re: [Xen-devel] Re: Communicating with the Guest Os before the network comes up.
> Yes, on linux you can pass arguments to the kernel commandline which > can be read from the /proc/cmdline. But I needed a cross platform > generic method by which to bootstrap the network of the guest OS, and > currently it appears there isn''t one. In fact, when it comes to Xen, > my primary aim is to run Windows.I still can''t see what is wrong with the DHCP approach ... * You can give every virtual machine a fixed MAC address. * DHCP can be configured to hand out fixed IP address (based on the machines MAC address). * You can even invent some scheme to map mac addresses to ip addresses (something like aa:bb:01:02:03:04 => 1.2.3.4), then you can easily script-generate the dhcp config file entries. That will "just work" with almost every OS on the planet ;) cheers, Gerd -- Gerd Hoffmann <kraxel@suse.de> http://www.suse.de/~kraxel/julika-dora.jpeg _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel