版本:1.1.0
我正在使用市场映像创建 VM。我的代码看起来像这样
VirtualMachine linuxVM = azure.virtualMachines().define(name)
.withRegion(Region.US_WEST)
.withExistingResourceGroup(myRg)
.withExistingPrimaryNetwork(network)
.withSubnet("subnet1")
.withPrimaryPrivateIPAddressDynamic()
.withNewPrimaryPublicIPAddress("ip-" + name)
.withLatestLinuxImage("publisher", "offer", "sku")
.withRootUsername("root")
.withRootPassword("some password")
.withSize(VirtualMachineSizeTypes.BASIC_A0)
.create();
我收到如下错误。
Async operation failed with provisioning state: Failed: Creating a virtual machine from Marketplace image requires Plan information in the request. OS disk name is '<name>'
如何添加计划信息?