
Add the linux-cloud-tools-generic package to the image (this has the Hyper-V client daemons).Īn (mostly) automated solution Prerequisites for automation. Obtain a generic Ubuntu cloud image such as the daily Ubuntu LTS 20.04 (Focal Fossa) generic cloud image. The page I found that helped the most ( Enable Hyper-V Integration Services for your Ubuntu guest VMs) involves ‘manually’ modifying a generic Ubuntu cloud image, and I haven’t seen automated solutions for this, so I experimented, and now document my solution here. This means you cannot set a password or SSH key and therefore cannot login to the resulting instance. The Hyper-V images do not work with local / on-premises (Windows 10 / Windows Server 20xx) Hyper-V setups due to the included cloud-init only being configured to use the Azure datasource. There is a solution, and this page describes using it a mostly automated way using Packer. The official Ubuntu images that are built for Azure/Hyper-V really are only compatible with Hyper-V on Azure, despite Canonical (the company behind Ubuntu) offering Azure/Hyper-V disk images at Ubuntu Daily cloud images - Focal. Data files used with those cloud-init files. An update note on generating the ‘cloud-init’ ISO/CD. Create the required HCL2 template and files. Option2: Using vbox-img and Convert-VHD. Convert the generic Ubuntu cloud image to VHDX. TX packets:252 errors:0 dropped:0 overruns:0 carrier:0 RX packets:530 errors:0 dropped:0 overruns:0 frame:0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
ping statistics -Ĥ packets transmitted, 4 received, 0% packet loss, time 3005ms I am trying to make a base box for vagrant, so I need networking to actually report the IP address.Ĭonsole output for ping, ifconfig, and lsmod: ping -c 4
Networking is working just fine, but the IP address isn't getting picked up by the Hyper-V manager. I just installed a new ISO downloaded from today, just installed it to a new machine.