0

I'm automating a deployment on a vmware esxi host using some custom shell scripts and I would need to know in advance the IP this VM is going to get from a DHCP prior to it being installed.

I know the MAC address in before hand. Is it possible to issue a request to the dhcp manually using the mac address reserved for the VM in order to figure out what address the DHCP will be offering and if so how?

N.B: DHCP reservation is not the solution I am trying to find, but I understand it's the most reasonable/logic - see why in my comment below.

  • 1
    I'm automating a deployment on a vmware host - VMware is a company. Which VMware product are you using? I would need to know in advance the IP this VM is going to get from a DHCP prior to it being installed - Configure a DHCP reservation for the MAC address in question. – joeqwerty Aug 9 '15 at 21:54
  • Yup, DHCP reservation is the answer. – EEAA Aug 9 '15 at 22:13
1

Yes, create a reservation for the mac on your DHCP server.

| improve this answer | |
  • Let's just say this is not really practical because my network department does not want to be involved in these requests. However, it's also safe to assume that leases have a very long duration – CaseyJones Aug 9 '15 at 23:05
  • Get a new network department. Seriously. This is really basic stuff. If they don't want to do it, have them delegate DHCP responsibilities to you for a segment of the network and then you can do it. Go up the chain of command if needed. – EEAA Aug 10 '15 at 0:40
  • Forge a DHCP request with the MAC of your target VM. Ensure it is ACK'd so the DHCP server activates the lease. – albal Aug 10 '15 at 2:16
  • Thanks @albal - that's the option I was thinking of and was hoping someone would have a quick trick as to how to go about it. – CaseyJones Aug 10 '15 at 7:55
  • I agree with @EEAA . Creating a DHCP reservation is really basic fundamental stuff. It isn't a mission. Chain of command time, departments need to work together instead of closing doors to each other. This is why private cloud deployments with self managed pools of resources is taking off so well for application and dev guys, no waiting for unhelpful network teams. – tomstephens89 Aug 10 '15 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.