By default, Gen2 VMs do not have a DVD drive so you cannot manually install an OS from an ISO file. It is envisaged that you’re going to either use PXE (which is supported by a Gen2 synthetic NIC) or use a generalized VHDX file.
You can add a DVD drive by:
- Editing the settings of the Gen2 VM
- Browse to the SCSI controller
- Select DVD Drive from the options on the right
- Click Add
Now you have a DVD drive that can mount an ISO file.