As the title says, for provisioning purposes I need to find out whether the VM is running in digitalocean. In aws, I query 169.254.169.254, but here that is not available, nor is there any information in the environment.
Thanks,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
My thought would be to take the IP assigned to the VM and do a reverse lookup and see if it is registered to Digital Ocean. If I am understanding correctly you want to know if you are running a vm inside a vm. I would expect unless you have a private IP, you should have something off the DO servers. <br> <br>The only question I would have to someone at DO would be if they limit their DHCP server somehow.
Hi BossRyan, I had thought of that, but it seemed a bit convoluted. I hoped there would be an easier way, something that possibly they either would inject in the VM or just a way to ask the infrastructure as it happens in openstack based clouds if my memory serves me well. <br> <br>Also, my idea is not to run a VM within a VM, I was just referring to the actual VM you get when you launch a droplet, as it is running on top of some sort of Virtualization infrastructure, possibly Xen, KVM or something else.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.