I use the simple networking model. I use a combination of vbs scripts, cmd and curl. Essentially the script runs: ipconfig /all | findstr /C:""DHCP Server"" which gives me the IP address of the VR in my environment (this will change for each region so can't be hardcoded). I then use some regular expressions to strip out that IP address. A curl to http://IPADDRESS/latest/local-hostname will give you the name that the machine is meant to have. Then all you need to do is run: netdom renamecomputer localhost /newname:"& newName &" /Force /reboot 30
It's certainly not as elegant as the linux solution and if anyone else has any ideas I'd love to take them onboard. On 28 December 2012 02:40, 马营 <breeze7...@gmail.com> wrote: > I gotta a extra question.. > The linux instance can obtain the hostname which user has defined in UI > from VR(dhcp),but the windows instance cannot .. > How can i fix this ? > > 2012/12/27 John Kinsella <j...@stratosec.co> > > > Cloudstack configures the domr dnsmasq server to serve out the > appropriate > > guest IP for the instance, and also sets up the reverse DNS between the > > display name and the guest IP. > > > > I'm forgetting the specific details - OS gets it's hostname either from > > DHCP or reverse dns…I can't remember exactly which. :) > > > > John > > > > On Dec 26, 2012, at 6:05 PM, David Comerford <davest...@gmail.com> > > wrote: > > > > > Hi guys, > > > > > > When creating a new instance how does the Display Name make it to the > > > hostname on Linux VM's? > > > > > > Thanks, > > > Dave > > > > > > >