From 72d538305d2122340239dab5cfa10912f35290c6 Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Mon, 22 Jun 2020 11:57:50 +0800 Subject: [PATCH] update known vm images to newest (#12352) * update known vm images to newest * fix compile error * add live test and fix image gen2 --- .../models/KnownLinuxVirtualMachineImage.java | 42 +++++------- .../KnownWindowsVirtualMachineImage.java | 37 +++------- ...irtualMachineExtensionOperationsTests.java | 8 +-- .../VirtualMachineOperationsTests.java | 8 +-- .../VirtualMachinePopularImageTests.java | 67 +++++++++++++++++++ .../resourcemanager/TestLoadBalancer.java | 2 +- .../resourcemanager/TestNetworkWatcher.java | 4 +- .../TestVirtualMachineNics.java | 2 +- .../TestVirtualMachineSsh.java | 2 +- .../ManageVirtualMachineExtension.java | 2 +- .../network/samples/ManageNetworkWatcher.java | 2 +- 11 files changed, 108 insertions(+), 68 deletions(-) create mode 100644 sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownLinuxVirtualMachineImage.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownLinuxVirtualMachineImage.java index 5016e1cad9674..c5fd3aea3fd0b 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownLinuxVirtualMachineImage.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownLinuxVirtualMachineImage.java @@ -4,34 +4,24 @@ /** The popular Azure Linux images. */ public enum KnownLinuxVirtualMachineImage { - /** UbuntuServer 14.04LTS. */ - UBUNTU_SERVER_14_04_LTS("Canonical", "UbuntuServer", "14.04.4-LTS"), /** UbuntuServer 16.04LTS. */ UBUNTU_SERVER_16_04_LTS("Canonical", "UbuntuServer", "16.04.0-LTS"), - /** Debian 8. */ - DEBIAN_8("credativ", "Debian", "8"), - /** CentOS 7.2. */ - CENTOS_7_2("OpenLogic", "CentOS", "7.2"), - /** - * OpenSUSE-Leap 42.1. - * - * @deprecated for virtual machine use {@link VirtualMachine.DefinitionShared#withLatestLinuxImage(String, String, - * String)}(String publisher, String offer, String sku)} and for virtual machine scale set use {@link - * VirtualMachineScaleSet.DefinitionShared#withLatestLinuxImage(String, String, String)}(String publisher, - * String offer, String sku)} with publisher as "SUSE", offer as "openSUSE-Leap" and sku as "42.3")}. - */ - @Deprecated - OPENSUSE_LEAP_42_1("SUSE", "openSUSE-Leap", "42.1"), - /** - * SLES 12-SP1. - * - * @deprecated for virtual machine use {@link VirtualMachine.DefinitionShared#withLatestLinuxImage(String, String, - * String)}(String publisher, String offer, String sku)} and for virtual machine scale set use {@link - * VirtualMachineScaleSet.DefinitionShared#withLatestLinuxImage(String, String, String)}(String publisher, - * String offer, String sku)} with publisher as "SUSE", offer as "SLES" and sku as "12-SP3")}. - */ - @Deprecated - SLES_12_SP1("SUSE", "SLES", "12-SP1"); + /** UbuntuServer 18.04LTS. */ + UBUNTU_SERVER_18_04_LTS("Canonical", "UbuntuServer", "18.04-LTS"), + /** Debian 9. */ + DEBIAN_9("credativ", "Debian", "9"), + /** Debian 10. */ + DEBIAN_10("Debian", "debian-10", "10"), + /** CentOS 8.1. */ + CENTOS_8_1("OpenLogic", "CentOS", "8_1"), + /** OpenSUSE-Leap 15.1. */ + OPENSUSE_LEAP_15_1("SUSE", "openSUSE-Leap", "15-1"), + /** SLES 15-SP1-gen1. */ + SLES_15_SP1("SUSE", "sles-15-sp1", "gen1"), + /** RedHat RHEL 8.2. */ + REDHAT_RHEL_8_2("RedHat", "RHEL", "8.2"), + /** Oracle Linux 8.1. */ + ORACLE_LINUX_8_1("Oracle", "Oracle-Linux", "81"); private final String publisher; private final String offer; diff --git a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownWindowsVirtualMachineImage.java b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownWindowsVirtualMachineImage.java index 006d9421db31b..616fb723f5c20 100644 --- a/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownWindowsVirtualMachineImage.java +++ b/sdk/compute/mgmt/src/main/java/com/azure/resourcemanager/compute/models/KnownWindowsVirtualMachineImage.java @@ -4,34 +4,17 @@ /** The popular Azure Windows images. */ public enum KnownWindowsVirtualMachineImage { - /** Windows Server 2008 R2 SP1. */ - WINDOWS_SERVER_2008_R2_SP1("MicrosoftWindowsServer", "WindowsServer", "2008-R2-SP1"), - /** Windows Server 2012 Data center. */ - WINDOWS_SERVER_2012_DATACENTER("MicrosoftWindowsServer", "WindowsServer", "2012-Datacenter"), + /** Windows 10 2020 H1 Pro */ + WINDOWS_DESKTOP_10_20H1_PRO("MicrosoftWindowsDesktop", "Windows-10", "20h1-pro"), + /** Windows Server 2019 Data center. */ + WINDOWS_SERVER_2019_DATACENTER("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"), + /** Windows Server 2019 Data center with containers. */ + WINDOWS_SERVER_2019_DATACENTER_WITH_CONTAINERS( + "MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter-with-Containers"), + /** Windows Server 2016 Data center. */ + WINDOWS_SERVER_2016_DATACENTER("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"), /** Windows Server 2012 R2 Data center. */ - WINDOWS_SERVER_2012_R2_DATACENTER("MicrosoftWindowsServer", "WindowsServer", "2012-R2-Datacenter"), - /** - * Windows Server 2016 technical preview with container. - * - * @deprecated for virtual machine use {@link VirtualMachine.DefinitionShared#withLatestWindowsImage(String - * publisher, String offer, String sku)} and for virtual machine scale set use {@link - * VirtualMachineScaleSet.DefinitionShared#withLatestWindowsImage(String publisher, String offer, String sku)} - * with publisher as "MicrosoftWindowsServer", offer as "WindowsServer" and sku as - * "2016-Datacenter-with-Containers")}. - */ - @Deprecated - WINDOWS_SERVER_2016_TECHNICAL_PREVIEW_WITH_CONTAINERS( - "MicrosoftWindowsServer", "WindowsServer", "2016-Technical-Preview-with-Containers"), - /** - * Windows Server 2016 technical preview. - * - * @deprecated for virtual machine use {@link VirtualMachine.DefinitionShared#withLatestWindowsImage(String - * publisher, String offer, String sku)} and for virtual machine scale set use {@link - * VirtualMachineScaleSet.DefinitionShared#withLatestWindowsImage(String publisher, String offer, String sku)} - * with publisher as "MicrosoftWindowsServer", offer as "WindowsServer" and sku as "2016-Datacenter")}. - */ - @Deprecated - WINDOWS_SERVER_TECHNICAL_PREVIEW("MicrosoftWindowsServer", "WindowsServer", "Windows-Server-Technical-Preview"); + WINDOWS_SERVER_2012_R2_DATACENTER("MicrosoftWindowsServer", "WindowsServer", "2012-R2-Datacenter"); private final String publisher; private final String offer; diff --git a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java index 0422b9b8d2497..059078e282134 100644 --- a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java +++ b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineExtensionOperationsTests.java @@ -61,7 +61,7 @@ public void canEnableDiagnosticsExtension() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("Foo12") .withRootPassword("BaR@12abc!") .withSize(VirtualMachineSizeTypes.STANDARD_D3) @@ -121,7 +121,7 @@ public void canResetPasswordUsingVMAccessExtension() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS) .withRootUsername("Foo12") .withRootPassword("BaR@12abc!") .withSize(VirtualMachineSizeTypes.STANDARD_D3) @@ -178,7 +178,7 @@ public void canInstallUninstallCustomExtension() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("Foo12") .withRootPassword("BaR@12abc!") .withSize(VirtualMachineSizeTypes.STANDARD_D3) @@ -224,7 +224,7 @@ public void canHandleExtensionReference() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("Foo12") .withRootPassword("BaR@12abc!") .withSize(VirtualMachineSizeTypes.STANDARD_D3) diff --git a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java index 91385e805cb0c..a55cdcd4e2b7b 100644 --- a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java +++ b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachineOperationsTests.java @@ -149,7 +149,7 @@ public void canCreateVirtualMachine() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_DATACENTER) + .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_R2_DATACENTER) .withAdminUsername("Foo12") .withAdminPassword("abc!@#F0orL") .withUnmanagedDisks() @@ -197,7 +197,7 @@ public void canCreateUpdatePriorityAndPrice() throws Exception { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_DATACENTER) + .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2016_DATACENTER) .withAdminUsername("Foo12") .withAdminPassword("abc!@#F0orL") .withUnmanagedDisks() @@ -312,7 +312,7 @@ public void cannotUpdateProximityPlacementGroupForVirtualMachine() throws Except .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() .withProximityPlacementGroup(setCreated.proximityPlacementGroup().id()) - .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_DATACENTER) + .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2019_DATACENTER) .withAdminUsername("Foo12") .withAdminPassword("abc!@#F0orL") .withUnmanagedDisks() @@ -407,7 +407,7 @@ public void canCreateVirtualMachinesAndAvailabilitySetInSameProximityPlacementGr .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() .withProximityPlacementGroup(setCreated.proximityPlacementGroup().id()) - .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2012_DATACENTER) + .withPopularWindowsImage(KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2019_DATACENTER) .withAdminUsername("Foo12") .withAdminPassword("abc!@#F0orL") .withUnmanagedDisks() diff --git a/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java new file mode 100644 index 0000000000000..4bd9b2e4627c1 --- /dev/null +++ b/sdk/compute/mgmt/src/test/java/com/azure/resourcemanager/compute/VirtualMachinePopularImageTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.compute; + +import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage; +import com.azure.resourcemanager.compute.models.KnownWindowsVirtualMachineImage; +import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes; +import com.azure.resourcemanager.resources.core.TestBase; +import com.azure.resourcemanager.resources.fluentcore.arm.Region; +import com.azure.resourcemanager.resources.fluentcore.model.Indexable; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Flux; + +import java.util.ArrayList; +import java.util.List; + +public class VirtualMachinePopularImageTests extends ComputeManagementTest { + private final String rgName = generateRandomResourceName("rg", 10); + + public VirtualMachinePopularImageTests() { + super(TestBase.RunCondition.LIVE_ONLY); + } + + @Test + public void canCreateAllPopularImageVM() { + List> vmFluxes = new ArrayList<>(); + for (KnownWindowsVirtualMachineImage image : KnownWindowsVirtualMachineImage.values()) { + Flux flux = computeManager.virtualMachines() + .define(generateRandomResourceName("vm", 10)) + .withRegion(Region.US_SOUTH_CENTRAL) + .withNewResourceGroup(rgName) + .withNewPrimaryNetwork("10.0.0.0/24") + .withPrimaryPrivateIPAddressDynamic() + .withoutPrimaryPublicIPAddress() + .withPopularWindowsImage(image) + .withAdminUsername("testUser") + .withAdminPassword(password()) + .withSize(VirtualMachineSizeTypes.STANDARD_B1S) + .createAsync(); + vmFluxes.add(flux); + } + + for (KnownLinuxVirtualMachineImage image : KnownLinuxVirtualMachineImage.values()) { + Flux flux = computeManager.virtualMachines() + .define(generateRandomResourceName("vm", 10)) + .withRegion(Region.US_SOUTH_CENTRAL) + .withNewResourceGroup(rgName) + .withNewPrimaryNetwork("10.0.0.0/24") + .withPrimaryPrivateIPAddressDynamic() + .withoutPrimaryPublicIPAddress() + .withPopularLinuxImage(image) + .withRootUsername("testUser") + .withRootPassword(password()) + .withSize(VirtualMachineSizeTypes.STANDARD_B1S) + .createAsync(); + vmFluxes.add(flux); + } + + Flux.merge(vmFluxes).blockLast(); + } + + @Override + protected void cleanUpResources() { + resourceManager.resourceGroups().beginDeleteByName(rgName); + } +} diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestLoadBalancer.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestLoadBalancer.java index 7a110d6f7f3c3..d97a6bc19fbd0 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestLoadBalancer.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestLoadBalancer.java @@ -1064,7 +1064,7 @@ private VirtualMachine[] ensureVMs(Networks networks, ComputeManager computeMana .withSubnet(network.subnets().values().iterator().next().name()) .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername(userName) .withRootPassword("Abcdef.123456") .withNewAvailabilitySet(availabilitySetDefinition) diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestNetworkWatcher.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestNetworkWatcher.java index 5e22b7dacf3f3..72e37e65b84a9 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestNetworkWatcher.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestNetworkWatcher.java @@ -117,7 +117,7 @@ VirtualMachine[] ensureNetwork(Networks networks, VirtualMachines vms, NetworkIn .withRegion(REGION) .withExistingResourceGroup(groupName) .withExistingPrimaryNetworkInterface(nic) - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername(userName) .withRootPassword("Abcdef.123456") .withSize(VirtualMachineSizeTypes.STANDARD_A1) @@ -139,7 +139,7 @@ VirtualMachine[] ensureNetwork(Networks networks, VirtualMachines vms, NetworkIn .withSubnet(network.subnets().values().iterator().next().name()) .withPrimaryPrivateIPAddressDynamic() .withoutPrimaryPublicIPAddress() - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername(userName) .withRootPassword("Abcdef.123456") .withSize(VirtualMachineSizeTypes.STANDARD_A1); diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineNics.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineNics.java index 0c5c2a42f9655..8e098347afd80 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineNics.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineNics.java @@ -84,7 +84,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withNewPrimaryNetwork(networkCreatable) .withPrimaryPrivateIPAddressStatic("10.0.0.4") .withNewPrimaryPublicIPAddress(primaryPipName) - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("testuser") .withRootPassword("12NewPA$$w0rd!") .withSize(VirtualMachineSizeTypes.STANDARD_A9) diff --git a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java index 1c411f56d7e23..bfe28e73dcb7f 100644 --- a/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java +++ b/sdk/management/azure/src/test/java/com/azure/resourcemanager/TestVirtualMachineSsh.java @@ -47,7 +47,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withExistingPrimaryPublicIPAddress(pip) - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername("testuser") .withRootPassword("12NewPA$$w0rd!") .withSsh(sshKey) diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java index 4527d8b81ab9b..66b68150bd334 100644 --- a/sdk/management/samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineExtension.java @@ -111,7 +111,7 @@ public static boolean runSample(Azure azure) { .withNewPrimaryNetwork("10.0.0.0/28") .withPrimaryPrivateIPAddressDynamic() .withNewPrimaryPublicIPAddress(pipDnsLabelLinuxVM) - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername(firstLinuxUserName) .withRootPassword(firstLinuxUserPassword) .withSize(VirtualMachineSizeTypes.STANDARD_D3_V2) diff --git a/sdk/management/samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java b/sdk/management/samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java index f2eb5681d2a7e..7b5cb5c49f010 100644 --- a/sdk/management/samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java +++ b/sdk/management/samples/src/main/java/com/azure/resourcemanager/network/samples/ManageNetworkWatcher.java @@ -135,7 +135,7 @@ public static boolean runSample(Azure azure) { .withNewPrimaryNetwork(virtualNetworkDefinition) .withPrimaryPrivateIPAddressDynamic() .withNewPrimaryPublicIPAddress(dnsLabel) - .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_14_04_LTS) + .withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS) .withRootUsername(userName) .withRootPassword("Abcdef.123456") .withSize(VirtualMachineSizeTypes.STANDARD_A1)