如何使用Java SDK创建具有许可证类型的Azure ARM虚拟机?

如何使用Java SDK创建具有许可证类型的Azure ARM虚拟机?,java,azure,azure-resource-manager,Java,Azure,Azure Resource Manager,是否可以在Azure(ARM)中创建指定许可证类型的虚拟机?我在下面的链接中引用了我的参考示例 我正在使用JDK1.8和Azure SDK版本1.0.0-beta2进行测试 VirtualMachine windowsVM = azure.virtualMachines().define(windowsVMName) .withRegion(Region.US_EAST) .withNewResourceGroup(rgName) // .withExistingResourceGr

是否可以在Azure(ARM)中创建指定许可证类型的虚拟机?我在下面的链接中引用了我的参考示例

我正在使用JDK1.8和Azure SDK版本1.0.0-beta2进行测试

 VirtualMachine windowsVM = azure.virtualMachines().define(windowsVMName)
 .withRegion(Region.US_EAST)
 .withNewResourceGroup(rgName)
 //  .withExistingResourceGroup(rgName)
 .withNewPrimaryNetwork("10.0.0.0/28")
 .withPrimaryPrivateIpAddressDynamic()
 .withoutPrimaryPublicIpAddress()
 //.withStoredWindowsImage("imgUrl")
 .withPopularWindowsImage(KnownWindowsVirtualMachineImage.
                                 WINDOWS_SERVER_2012_R2_DATACENTER)
 .withAdminUserName(userName)
 .withPassword(password)
 .withSize(VirtualMachineSizeTypes.STANDARD_D3_V2)
 .create();

至于技术上的可能性,您可以使用自己的映像在ARM中创建Azure VM,但您需要这样做

关于许可证的可能性,请参阅Windows Server许可证常见问题解答中的详细信息