You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by David Comerford <da...@gmail.com> on 2012/12/27 03:05:36 UTC

How is hostname set?

Hi guys,

When creating a new instance how does the Display Name make it to the
hostname on Linux VM's?

Thanks,
Dave

Re: How is hostname set?

Posted by 马营 <br...@gmail.com>.
Thk u for replying me!
As far as i know , using sysprep can set the windows instance with same
hostname .
However,it can't reflect the same effect as linux instance.In other words ,
user can't define the instance name by typed in UI.

2012/12/28 Ahmad Emneina <Ah...@citrix.com>

> You might be looking for sysprep.
>
> See here:
> http://technet.microsoft.com/library/Cc961636
> http://support.microsoft.com/kb/298491
>
> On 12/27/12 6:40 PM, "马营" <br...@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 <jl...@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 <da...@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
> >>
> >>
> >>
> >
>
>
> --
> Æ
>
>
>
>

Re: How is hostname set?

Posted by 马营 <br...@gmail.com>.
Seems a little complication...
If there's no advance solution takes out,i'll try Sean's recommendation.

2012/12/28 Sean Hamilton <se...@seanhamilton.co.uk>

> 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, 马营 <br...@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 <jl...@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 <da...@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
> > >
> > >
> > >
> >
>

Re: How is hostname set?

Posted by Sean Hamilton <se...@seanhamilton.co.uk>.
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, 马营 <br...@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 <jl...@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 <da...@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
> >
> >
> >
>

Re: How is hostname set?

Posted by Ahmad Emneina <Ah...@citrix.com>.
You might be looking for sysprep.

See here:
http://technet.microsoft.com/library/Cc961636
http://support.microsoft.com/kb/298491

On 12/27/12 6:40 PM, "马营" <br...@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 <jl...@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 <da...@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
>>
>>
>>
>


-- 
Æ




Re: How is hostname set?

Posted by 马营 <br...@gmail.com>.
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 <jl...@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 <da...@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
>
>
>

Re: How is hostname set?

Posted by John Kinsella <jl...@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 <da...@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