OSProfile osProfile = createOsProfile(name, template);
<BUG>NetworkProfile networkProfile = NetworkProfile.builder().networkInterfaces(ImmutableList.of(IdReference.create(nic.id()))).build();
VirtualMachineProperties virtualMachineProperties = VirtualMachineProperties.builder()</BUG>
.licenseType(null) // TODO
<BUG>.availabilitySet(null) // TODO
.hardwareProfile(hardwareProfile)
.storageProfile(storageProfile)
.osProfile(osProfile)
.networkProfile(networkProfile)

.build();
VirtualMachine virtualMachine = api.getVirtualMachineApi(azureGroup).create(name, template.getLocation().getId(), virtualMachineProperties);
return new NodeAndInitialCredentials<VirtualMachine>(virtualMachine, name, null);
</BUG>
}

OSProfile osProfile = createOsProfile(name, template);
NetworkProfile networkProfile = NetworkProfile.builder()
.networkInterfaces(ImmutableList.of(IdReference.create(nic.id()))).build();
VirtualMachineProperties virtualMachineProperties = VirtualMachineProperties.builder()
.licenseType(null) // TODO
.availabilitySet(null) // TODO
.hardwareProfile(hardwareProfile).storageProfile(storageProfile).osProfile(osProfile)
.networkProfile(networkProfile).build();
VirtualMachine virtualMachine = api.getVirtualMachineApi(azureGroup).create(name, template.getLocation().getId(),
virtualMachineProperties);
RegionAndId regionAndId = RegionAndId.fromRegionAndId(template.getLocation().getId(), name);
return new NodeAndInitialCredentials<VirtualMachine>(virtualMachine, regionAndId.slashEncode(), null);
}
