setting multiple hostnames on a single ip

Hello folks

I’m trying to figure how to assign multiple hostnames to a single ip by configuration mode.

I did the following…
set system host-name ‘test-01 mylocalhost’ no-concatenate
Configuration path: system host-name [test-01 mylocalhost] is not
Set failed

So, is directly adding new host names in /etc/hosts is the only solution?

Anyone help?

it depends what is your actual need.

Why do you need to assign “multiple hostnames” ?

A machine has 1 hostname but can serve different services for any URL / URI / addresses you need.

It’s usually DNS records that point to the IP of the machine.

Please explain the complete case so we can point you to the right solution.

I am trying run my PC-router as a virtual host server, by way of introducing proxmoxVE hyper-visor to vyos.

Following proxmox how-to wiki, several names were given to a host.

to JFL
I’m sorry I don’t have a good answer to your question.
I don’t know in which particular service proxmox servers are needing different names. I’m an at start-level learner for proxmox and sticking to their guide would surely save future troubles.

Anyhow, returning to the vyos configuration mode, is it odd that set no-concatenate doesn’t work for setting multiple hostnames? If someone have already managed, please kindly advice.

This is actually a bad idea to add proxmox on top of vyos.

you will break many things during updates of either system.

Just run vyos in a VM on proxmox, I did it for a long time until I finally got my Edge Router Lite.

PS. You don’t actually need multiple hostnames. The instructions just tell you that you need the ability to RESOLVE by hostname. It does not mean you need multiples.

Thank you for your advise pirateghost.
I will set up a clean proxmox server later.
But for now my motivation is to know what vyos config mode can do and cannot do.

So, is there a way to write multiple hostnames through config mode? or only by way of directly changing /etc/hosts.

You don’t need multiple host names. :wink: