How to retain fixed IP Address upon VM Recompose?

Morning All,

I was wondering how it's possible to retain the fixed IP Address that I entered in a deployed VM when I would complete a recompose of the VM's in the desktop pool?  

For Example, I assigned, to the VM; however, when I recompose it I get 169.xx.xx.x.  I'm deploying desktops by the linked-clone method.  

Any help on this would be greatly appreciated.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi Anthony6890

I wouldn’t have thought the system would allow you to clone machines with a static IP address, this would cause issues both for the routing and arpa tables.
The 169.254.x.x address means the NIC is connected to a device and is configured to receive and address automatically but isn't so APIPA is doing its bit to work.
What is your reason for cloning a machine with a static IP address (assuming you are rolling out multiples and not just replacing one duff VM)?
If you are looking to replace just one machine cause its duff and this is for a DR project let me know and I’ll run an idea past you.

Anthony6890Author Commented:
Thanks for responding Stolsie.

That's a valid point, about that static IP and cloning the machine; however, the system does allow me to clone a VM with a static IP and deploy VM's from the snapshot that is taken.  

I'm not necessarily cloning the virtual machine, I'm really deploying linked clones from a template within the view admin portal.  

I currently have a Desktop Pool that uses a VM snapshot to deploy x nubmer of desktops.  In testing, I just had it deploy 1 desktop and it then assigned it that 169.254 address.  

The reason for wanting the static IP is based on some firewall rules that my consultants are putting in place.  We've created separated VLAN for different VM pools.  The environment that we are creating will be our new production environment, not our DR site.

Ahhh I see, is it possible the snap shot was taken before the static IP address was set?
Our vSphere only allows cloning and static setting of MAC addresses the IP addressing is down to the network so unfortunately I’ll have to tap out of the original question, apologies for that.
If I could make a recommendation, why not have your VM get an IP via DHCP but manage the addresses at that level through fixing addresses based on MAC address and having the DHCP range not have a pool of addresses?
That would still give you the control of what get what address and no need to keep records of what machine has what address and how many you have left.
Any way good luck I’m sure s VM bod will be around sooner or later :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Anthony6890Author Commented:
The snapshot was definitley taken before the the static IP was set.  For me to get the VM to join the network, I had to set up the IP Address, subnet, and gateway otherwise it wouldn't connect to the internet or any network drives.  

If I do the suggestion you have, would I have to get another server to handle the DHCP or can this happen right through vCenter itself?
Anthony6890Author Commented:

I figured out how to do it with the DHCP method you mentioned above.  Basically I will filter by MAC address to get an IP address allocated from a specific range, which is great.

Do you happen to know how I can get a mass listing of all the MAC addresses for the VM's I deploy once I've created more link clones within my different Pools?

Hi Anthony

You might need a scripting parson’s head for that as I’m not sure.
As its your device you have full control of what MAC addresses it has you could make life easy but just copy pasting the MACs initial 5 byte's or 40 bites.
"00:0C:29:24:1c:" then start with 00 for the last bites and work your way up (excel will more than likely be able to help).
Our VM brain will be in soon he is also a bit of a power shell wiz I’ll rack his brain if there is a command or script that can be run

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.