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

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

On Tue, Jul 18, 2006 at 02:22:40AM -0400, Ligesh wrote:
>  How do we do the same on a windows VM? On a remote hosting setup, it is 
> always preferable to assign static ips to the virtual machines. DHCP is 
> cumbersome method to manage ip addresses.

  Sorry I must have missed the reference to Windows.

  I imagine you could write a small script in VBScrip/JScript and
 place it in the startup directory - or add a registry key to make it
 auto-run once.

  It has been a few years since I had to do that kind of thing on
 Windows, but I think the principle is sound.  Bootup the machine once
 with the script to do the magic, then reboot it afterwards.

  I guess you'd need to organise yourself, so for example, you could
 have a range of IPs to be tested and do something like this:

    base=192.168.1.100

    while( 1 )
    {
        if ( ping( $base ) )
        {
           # Address is "live"
           base += 1;  (Note you can't do that really!)
        }
        else
        {
           # Found an unallocated IP
           setupIP here
           reboot
        }
    }

  I'd recommend you look at AutoIT for your scripting language if you've
 not got a personal preference.  Very nice to use, and free.  (Albeit 
 not "free".)

Steve
-- 

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