Installing Ubuntu in a Hyper-V Virtual Machine is very easy and it is beyond the scope of this post. But how do we get it to report its IP address back to Hyper-V manager? Based on Microsoft documentation all recent versions of Ubuntu 13.xx and newer includes the LIS (Linux Integration Services) packages build into it.
So why can we see the IP address?
Here is why?
There is a daemon and a couple of tools missing and we need to install them. You will need to install the following packages
- hv-kvp-daemon-init
- linux-tools
- linux-cloud tools
Here is a one line to install the packages
sudo apt-get update && sudo apt-get install hv-kvp-daemon-init linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) -y
After you install the packages execute the following commands in order to test the new daemons
- hv_fcopy_daemon
- hv_kvp_daemon
- hv_set_ifconfig
- hv_vss_daemon
- hv_get_dns_info
Then shutdown your VM. (This is important you need to shut it down not reboot. For some strange reason reboot will not work)
- sudo shutdown -h now
Power On your VM via PowerShell or the Hyper-V Manager and you will see your IP Address in the Networking Tab
Hope this helps you. If you have any questions leave me a comment.