-
Notifications
You must be signed in to change notification settings - Fork 18
Provide identifying information in udhcpc requests #13
Comments
Hi Maxim TransferVM is a hidden VM inside XenServer, its hostname is statically set during build. i.e. buildroot.config:BR2_HOSTNAME="transfervm". TVM uses DHCP to get IP address as you mentioned. Regarding this case, could you pls help us to understand what is the customer’s real user cases to want a dynamic TVM hostname with a prefix? Regards Zheng Chai From: Maxim Khitrov [mailto:notifications@github.com] I run dnsmasq as my DHCP server and it's configured to provide static leases to known MAC addresses. I don't want it handing out leases to unknown clients. Each Transfer VM instance has a unique local MAC, so no prefix that I can match, and no other identifying information (hostname, client id, enterprise vendor classes, etc.). It provides udhcp 1.12.4 as the vendor class, but that could match other hosts as well. This makes it impossible for me to configure dnsmasq to hand out dynamic IPs to Transfer VMs without also doing the same for all other hosts. Configuring a static IP for each import/export operation is a bit annoying. Would it be possible to have each Transfer VM generate a dynamic hostname with a fixed prefix (e.g. transfervm-) and provide some other unique identifier in the DHCP request? As a workaround, is there some easy way for me to modify /sbin/hotplug on the Transfer VM template, which is where I think this change needs to be made? I tried poking around a running Transfer VM, but couldn't quite figure out what's stored where. — |
Right now the DHCP client doesn't send the hostname in the request at all, so it makes no difference. If you were to change that, I think it would make sense for different VMs to have different hostnames, especially since multiple transfer VMs can run in parallel. The thing that I'm more interested in is having some identifying information in the request that would allow me to distinguish transfer VMs from other DHCP clients. |
Hi Maxim I believe what you need is to configure the dhcpclient in transfer VM to get the hostname – this shall be supported according to the DHCP protocol see https://tools.ietf.org/html/rfc1533#section-3.14 I believe you can get it. One example could also be found here: http://askubuntu.com/questions/104918/how-to-get-the-hostname-from-a-dhcp-server Regards Zheng Chai From: Maxim Khitrov [mailto:notifications@github.com] Right now the DHCP client doesn't send the hostname in the request at all, so it makes no difference. If you were to change that, I think it would make sense for different VMs to have different hostnames, especially since multiple transfer VMs can run in parallel. The thing that I'm more interested in is having some identifying information in the request that would allow me to distinguish transfer VMs from other DHCP clients. — |
I run dnsmasq as my DHCP server and it's configured to provide static leases to known MAC addresses. I don't want it handing out leases to unknown clients. Each Transfer VM instance has a unique local MAC, so no prefix that I can match, and no other identifying information (hostname, client id, enterprise vendor classes, etc.). It provides
udhcp 1.12.4
as the vendor class, but that could match other hosts as well. This makes it impossible for me to configure dnsmasq to hand out dynamic IPs to Transfer VMs without also doing the same for all other hosts. Configuring a static IP for each import/export operation is a bit annoying.Would it be possible to have each Transfer VM generate a dynamic hostname with a fixed prefix (e.g.
transfervm-<random>
) and provide some other unique identifier in the DHCP request?As a workaround, is there some easy way for me to modify /sbin/hotplug on the Transfer VM template, which is where I think this change needs to be made? I tried poking around a running Transfer VM, but couldn't quite figure out what's stored where.
The text was updated successfully, but these errors were encountered: