use of com.microsoft.azure.management.compute.LinuxConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineScaleSetImpl method withStoredLinuxImage.
@Override
public VirtualMachineScaleSetImpl withStoredLinuxImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner().virtualMachineProfile().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().virtualMachineProfile().storageProfile().osDisk().withImage(userImageVhd);
// For platform image osType will be null, azure will pick it from the image metadata.
this.inner().virtualMachineProfile().storageProfile().osDisk().withOsType(OperatingSystemTypes.LINUX);
this.inner().virtualMachineProfile().osProfile().withLinuxConfiguration(new LinuxConfiguration());
return this;
}
use of com.microsoft.azure.management.compute.LinuxConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineImpl method withSpecificLinuxImageVersion.
@Override
public VirtualMachineImpl withSpecificLinuxImageVersion(ImageReference imageReference) {
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().withImageReference(imageReference.inner());
this.inner().osProfile().withLinuxConfiguration(new LinuxConfiguration());
this.isMarketplaceLinuxImage = true;
return this;
}
use of com.microsoft.azure.management.compute.LinuxConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineImpl method withStoredLinuxImage.
@Override
public VirtualMachineImpl withStoredLinuxImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().osDisk().withImage(userImageVhd);
// For platform | custom image osType will be null, azure will pick it from the image metadata.
// But for stored image, osType needs to be specified explicitly
//
this.inner().storageProfile().osDisk().withOsType(OperatingSystemTypes.LINUX);
this.inner().osProfile().withLinuxConfiguration(new LinuxConfiguration());
return this;
}
Aggregations