How to identify Hyper-V guest IP addresses?

9,805

Solution 1

look at this link it will do what you want

http://blogs.technet.com/b/m2/archive/2010/07/29/how-to-get-the-ip-address-of-a-virtual-machine-from-hyper-v.aspx

Solution 2

Why not just use the Hyper-V Manager to open the VM's Console? It works remotely if you have Remote Management enabled in the Firewall Settings, and you don't have to do any look-ups in the DHCP Server. Otherwise, no, Hyper-V does not track it's VMs IPs, just their MAC addresses.

Share:
9,805

Related videos on Youtube

Justin Grant
Author by

Justin Grant

I'm working on a brand-new consumer mobile startup. My dev skills are admittedly a bit rusty after many years as a product manager when the only software development I did was for side projects. Now I'm having fun getting up to speed on React, AWS, and TypeScript. Previously, I was VP Product at Cantaloupe Systems, the largest SaaS provider for the vending industry. We put cellular modems inside vending machines, collected data about every sale as well as machine status and alerts, and then crunched the resulting data to help vending operators know which machines need to be refilled and when, what's selling and what's not, who's stealing, which machines are broken, and much more. I led a small team responsible for product roadmap, user experience, and agile project management while trying to keep customers happy and revenue growing.

Updated on September 17, 2022

Comments

  • Justin Grant
    Justin Grant over 1 year

    Is there a way to find out, using Win2008 R2 Hyper-V manager or a command-line tool, the externally-accessible IP Address(es) of Windows XP Hyper-V guests?

    I'd like to be able to connect to my guests by IP address via Remote Desktop (for cases where name resolution is not working properly) but without combing through the DHCP server it's been challenging to know which IP address corresponds to which host.

    Any ideas?

    Assigning static IPs to each guest is possible but is something I'd like to avoid.

  • Justin Grant
    Justin Grant almost 14 years
    I'm having a separate problem where the video for local connections to VMs is not working correctly, and I haven't had time to figure out how to fix it. So I've been relying on remote desktop to connect directly to clients until I can fix the console issue. Since I'll know the MAC address, is there a good way to map from MAC to IP?
  • Philip
    Philip almost 14 years
    Using the DHCP Server's list of leases is the most reliable way. The ARP table on the hyper-v host might have the IP as well, though it could just as easily not.
  • Philip
    Philip almost 14 years
    +1, Learn something new every day.
  • tony roth
    tony roth almost 14 years
    obviously me too since this was just posted on the technet blogs!
  • Justin Grant
    Justin Grant over 13 years
    hi Kara - unfortunately I'd need to know the IP address to connect to WMI. And it's an ISP-provided router, not a Microsoft DHCP server, so that option won't work. Next I am going to try screen-scraping the DHCP page on the router's web-based control panel.
  • Kara Marfia
    Kara Marfia over 13 years
    Aw dang, it had looked like the script was using the hostname to get the IP from the DHCP server, but I could've misread. Looks like Tony's answer should do it though?