Forums

Resolved
0 votes
Hi,

I'm trying to setup a new Virtual Machine for testing, and I keep getting stuck on the setup. When it comes up to set the hostname and internet hostname, the setup just tells me the that the hostname is invalid, no matter what I type in. I tried the setup a few times already.

During the instalation setup, in the network config, I set the name of the host to "vm1", now after the reboot, it starts the regular, setup, regitration, updates and configuration, its at this point that I cant get passed the hostname setup. I used the same hostname "vm1" and the internet hostname is "vm1.domain.local" so I dont know what I'm missing, seems to me its the same steps I've done before.

I'm I missing something and running in circles or is there something broken after the initial updates during setup?

Link to image of error : http://imgur.com/a/AJmWP

TIA,
Rodrigo.
Friday, February 03 2017, 01:05 PM
Share this post:

Accepted Answer

Friday, February 03 2017, 02:07 PM - #Permalink
Resolved
0 votes
The difference between the Hostname and Internet hostname is not clearly explained, but have a look at this doc. I'd set your hostname to "vm1.domain.local" and either leave the Internet Hostname as the same or change it to a poweredbyclear.com hostname.

[edit]
The specific error is because the hostname must have at least one period (".") in it.
[/edit]
The reply is currently minimized Show
Responses (2)
  • Accepted Answer

    Friday, February 03 2017, 02:46 PM - #Permalink
    Resolved
    0 votes
    Ha! was looking for the code that does the checking when you posted Nick...
    Here's the actual check... from /usr/clearos/apps/network/libraries/Network_Utils.php

    public static function is_valid_hostname_alias($alias)
    {
    clearos_profile(__METHOD__, __LINE__);

    if (! preg_match('/^([0-9a-zA-Z\.\-_]+)$/', $alias))
    return FALSE;

    return TRUE;
    }

    you can also use a "-" i.e. in the OP's case vm-1 should have worked

    I installed my 7.x system using "alex-1" and "alex.sraellis.com" - then when the install was completed went in and manually changed the alex-1 to just alex
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 06 2017, 03:02 PM - #Permalink
    Resolved
    0 votes
    Thanks for the help guys.

    Fixed by naming it vm1.domain.local.
    The reply is currently minimized Show
Your Reply