Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Andreas Steinel
On Fri, Oct 14, 2016 at 9:15 PM, Michael Rasmussen  wrote:

> On Fri, 14 Oct 2016 19:56:04 +0200 Andreas Steinel 
> wrote:
> > Isn't there a chicken and egg problem now? Where is the name defined if I
> > install via PXE in an automatic fashion?
>
> For Debian based distributions preseed exists. For Redhat based
> distributions kickstart exists. Both are capable of configuring the
> hostname.
>

Of course, but then the DHCP entry with the MAC has to be the first to load
the preseed/kickstart file with the correct name. If you already have DHCP,
then you also have DNS and we are at the beginning of the discussion.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Michael Rasmussen
On Fri, 14 Oct 2016 19:56:04 +0200
Andreas Steinel  wrote:

> 
> Isn't there a chicken and egg problem now? Where is the name defined if I
> install via PXE in an automatic fashion?
> 
For Debian based distributions preseed exists. For Redhat based
distributions kickstart exists. Both are capable of configuring the
hostname.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--
/usr/games/fortune -es says:
PENGUINICITY!!


pgpA8qUmOgRXS.pgp
Description: OpenPGP digital signature
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Andreas Steinel
Yes, that's one way to go. We used ddns almost 10 years ago and went for a
"full static" setup.

Isn't there a chicken and egg problem now? Where is the name defined if I
install via PXE in an automatic fashion?

Until now I setup the VM automatically (CLI) and give it a name and
retrieve the mac, insert it into our ldap including PXE options and bootup
the VM. A few minutes later, the VM is installed and configured with a
static IP, given by DHCP (we retrieve via DHCP but set this retrieved IP
statically if it is not a dynamic pool address). This setup works fine for
creating a VM, but we still need to identify it afterwards if you see it in
the GUI. Therefore I add the IP/Hostname to the comment such that I can
find it easily.

On Fri, Oct 14, 2016 at 7:01 PM, Michael Rasmussen  wrote:

> On Fri, 14 Oct 2016 16:59:52 +0200
> Andreas Steinel  wrote:
>
> > On Fri, Oct 14, 2016 at 4:45 PM, Michael Rasmussen 
> wrote:
> >
> > > On Fri, 14 Oct 2016 16:09:48 +0200
> > > Andreas Steinel  wrote:
> > >
> > > >
> > > > How do you guys solve this problem in big environments? Is there a
> > > simpler
> > > > way I don't see right now?
> > > >
> > > You could use DHCP assigned IP and a DNS server which automatically
> > > adds or removes IP from domain. If some VM's needs static IP this can
> > > be handled by DHCP as well.
> > >
> >
> > You mean a "self registering dns name"?
> >
> See here for an example:
> http://askubuntu.com/questions/162265/how-to-setup-
> dhcp-server-and-dynamic-dns-with-bind
> The magic words in DHCP is ddns-updates and ddns-updates on and
> ddns-update-style interim
>
> > I'm currently using a solution based on LDAP-backed DNS and DHCP
> (including
> > PXE options). The problem I have is how to "join" the information based
> on
> > IDs in Proxmox VE with the hostname. I can join based on MAC if all
> > machines are registered, but not otherwise.
> >
> > There was a discussion about getting IP addresses via qemu-agent and
> > display it in the Proxmox VE GUI, but that only helps for VMs running
> with
> > the agent. It would be simpler to add - SQL-technically speaking - a
> > hostname column to the KVM VMs. I need something to join and the VM name
> > can be ambiguous.
> >
> > In the end I want to see on the overview page of a VM what the hostname
> > and/or IP is for logging in. Currently I did it in the comment.
> In the proxmox gui you can assign a MAC yourself which will be the VM's
> layer 2 address. The DHCP server can be configured to hand-out specific
> IP to specific MAC; a bunch of other options is available like
> automatic PXE setup
> (https://debian-administration.org/article/478/Setting_up_a_server_for_
> PXE_network_booting)
>
> --
> Hilsen/Regards
> Michael Rasmussen
>
> Get my public GnuPG keys:
> michael  rasmussen  cc
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
> mir  datanom  net
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
> mir  miras  org
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
> --
> /usr/games/fortune -es says:
> Logic is a systematic method of coming to the wrong conclusion with
> confidence.
>
> ___
> pve-devel mailing list
> pve-devel@pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Michael Rasmussen
On Fri, 14 Oct 2016 16:59:52 +0200
Andreas Steinel  wrote:

> On Fri, Oct 14, 2016 at 4:45 PM, Michael Rasmussen  wrote:
> 
> > On Fri, 14 Oct 2016 16:09:48 +0200
> > Andreas Steinel  wrote:
> >  
> > >
> > > How do you guys solve this problem in big environments? Is there a  
> > simpler  
> > > way I don't see right now?
> > >  
> > You could use DHCP assigned IP and a DNS server which automatically
> > adds or removes IP from domain. If some VM's needs static IP this can
> > be handled by DHCP as well.
> >  
> 
> You mean a "self registering dns name"?
> 
See here for an example:
http://askubuntu.com/questions/162265/how-to-setup-dhcp-server-and-dynamic-dns-with-bind
The magic words in DHCP is ddns-updates and ddns-updates on and
ddns-update-style interim

> I'm currently using a solution based on LDAP-backed DNS and DHCP (including
> PXE options). The problem I have is how to "join" the information based on
> IDs in Proxmox VE with the hostname. I can join based on MAC if all
> machines are registered, but not otherwise.
> 
> There was a discussion about getting IP addresses via qemu-agent and
> display it in the Proxmox VE GUI, but that only helps for VMs running with
> the agent. It would be simpler to add - SQL-technically speaking - a
> hostname column to the KVM VMs. I need something to join and the VM name
> can be ambiguous.
> 
> In the end I want to see on the overview page of a VM what the hostname
> and/or IP is for logging in. Currently I did it in the comment.
In the proxmox gui you can assign a MAC yourself which will be the VM's
layer 2 address. The DHCP server can be configured to hand-out specific
IP to specific MAC; a bunch of other options is available like
automatic PXE setup
(https://debian-administration.org/article/478/Setting_up_a_server_for_PXE_network_booting)

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--
/usr/games/fortune -es says:
Logic is a systematic method of coming to the wrong conclusion with
confidence.


pgpwSv7MWjcyi.pgp
Description: OpenPGP digital signature
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Andreas Steinel
On Fri, Oct 14, 2016 at 4:45 PM, Michael Rasmussen  wrote:

> On Fri, 14 Oct 2016 16:09:48 +0200
> Andreas Steinel  wrote:
>
> >
> > How do you guys solve this problem in big environments? Is there a
> simpler
> > way I don't see right now?
> >
> You could use DHCP assigned IP and a DNS server which automatically
> adds or removes IP from domain. If some VM's needs static IP this can
> be handled by DHCP as well.
>

You mean a "self registering dns name"?

I'm currently using a solution based on LDAP-backed DNS and DHCP (including
PXE options). The problem I have is how to "join" the information based on
IDs in Proxmox VE with the hostname. I can join based on MAC if all
machines are registered, but not otherwise.

There was a discussion about getting IP addresses via qemu-agent and
display it in the Proxmox VE GUI, but that only helps for VMs running with
the agent. It would be simpler to add - SQL-technically speaking - a
hostname column to the KVM VMs. I need something to join and the VM name
can be ambiguous.

In the end I want to see on the overview page of a VM what the hostname
and/or IP is for logging in. Currently I did it in the comment.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Michael Rasmussen
On Fri, 14 Oct 2016 16:09:48 +0200
Andreas Steinel  wrote:

> 
> How do you guys solve this problem in big environments? Is there a simpler
> way I don't see right now?
> 
You could use DHCP assigned IP and a DNS server which automatically
adds or removes IP from domain. If some VM's needs static IP this can
be handled by DHCP as well.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--
/usr/games/fortune -es says:
Kitchen activity is highlighted.  Butter up a friend.


pgp9jsXKTt5Tv.pgp
Description: OpenPGP digital signature
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] Finding VMs by hostname, not id

2016-10-14 Thread Andreas Steinel
Hi,

I'd like to discuss a feature request about having a "real" hostname on KVM
machines or some other mechanism to solve my problem.

I have a rather big environment with over a hundred KVM VMs and also
different networks including different DNS settings. Currently I "encode"
further VM information in the first two lines of the comment of each VM and
then "decode" these on automatic tasks on the command line or via API. With
the advent of LXC, there is an option about hostname and dns settings.
Could it be possible and feasible to introduce such things also into the
KVM world? Having the "real" hostname as the name of the KVM is just too
long. I could use pools for this, but I already use pools to differentiate
the machines by purpose.

How do you guys solve this problem in big environments? Is there a simpler
way I don't see right now?

Best,
Andreas
(LnxBil)
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel