Manage virtual machines by using the Azure Explorer for IntelliJ

The Azure Explorer, which is part of the Azure Toolkit for IntelliJ, provides Java developers with an easy-to-use solution for managing virtual machines in their Azure account from inside the IntelliJ integrated development environment (IDE).

Prerequisites

The Azure Toolkit for IntelliJ requires the following software components:

  • IntelliJ IDEA Ultimate Edition, which can be downloaded from the JetBrains website.

  • A Java Developer Kit (JDK), version 1.8 or later.

  • An operating system. The Azure Toolkit for IntelliJ has been tested on the following operating systems:

    • Windows 10, Windows 8.1, Windows 8, and Windows 7
    • Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, and Windows Server 2008
    • Mac OS X version "Yosemite" or later
    • Ubuntu Linux version 14, 15, and 16

For more information, see the Azure Toolkit for IntelliJ page at the JetBrains Plugin Repository.

Displaying the Azure Explorer Tool Window

If the Azure Explorer tool window is not visible in IntelliJ, click View, then click Tool Windows, and then click Azure Explorer.

Show Azure Explorer Tool Window

Create a virtual machine in IntelliJ

To create a virtual machine by using the Azure Explorer, do the following:

  1. Sign in to your Azure account by using the steps in the Sign-in instructions for the Azure Toolkit for IntelliJ article.

  2. In the Azure Explorer view, expand the Azure node, right-click Virtual Machines, and then click Create VM.

    The Create VM command
    The Create new Virtual Machine wizard opens.

  3. In the Choose a Subscription window, select your subscription, and then click Next.

    The Choose a Subscription window

  4. In the Select a Virtual Machine Image window, enter the following information:

    • Location: Specifies where your virtual machine will be created (for example, West US).

    • Recommended image: Specifies that you will choose an image from an abbreviated list of commonly used images.

    • Custom image: Specifies that you will choose a custom image by providing the following information:

      • Publisher: Specifies the publisher that created the image that you will use for your virtual machine (for example, Microsoft).

      • Offer: Specifies the virtual machine offering to use from the selected publisher (for example, JDK).

      • Sku: Specifies the stockkeeping unit (SKU) to use from the selected offering (for example, JDK_8).

      • Version #: Specifies which version of the selected SKU to use.

    The Select a Virtual Machine Image window

  5. Click Next.

  6. In the Virtual Machine Basic Settings window, enter the following information:

    • Virtual machine name: Specifies the name for your new virtual machine, which must start with a letter and contain only letters, numbers, and hyphens.

    • Size: Specifies the number of cores and memory to allocate for your virtual machine.

    • User name: Specifies the administrator account to create for managing your virtual machine.

    • Password and Confirm: Specifies the password for your administrator account.

    The Virtual Machine Basic Settings window

  7. Click Next.

  8. In the Associated Resources window, enter the following information:

    • Resource group: Specifies the resource group for your virtual machine. Select one of the following options:

      • Create new: Specifies that you want to create a new resource group.
      • Use existing: Specifies that you want to select from a list of resource groups that are associated with your Azure account.

        The Associated Resources window

    • Storage account: Specifies the storage account to use for storing your virtual machine. You can choose an existing storage account or create a new account. If you choose Create New, the following dialog box appears:

      The Create Storage Account dialog box

    • Virtual Network and Subnet: Specifies the virtual network and subnet that your virtual machine will connect to. You can use an existing network and subnet, or you can create a new network and subnet. If you select Create new, the following dialog box appears:

      The Create Virtual Network dialog box

    • Public IP address: Specifies an external-facing IP address for your virtual machine. You can choose to create a new IP address or, if your virtual machine will not have a public IP address, you can select (None).

    • Network security group: Specifies an optional networking firewall for your virtual machine. You can select an existing firewall or, if your virtual machine will not use a network firewall, you can select (None).

    • Availability set: Specifies an optional availability set that your virtual machine can belong to. You can select an existing availability set, create a new availability set or, if your virtual machine will not belong to an availability set, select (None).

  9. Click Finish.
    Your new virtual machine appears in the Azure Explorer tool window.

    New virtual machine in the Azure Explorer view

Restart a virtual machine in IntelliJ

To restart a virtual machine by using the Azure Explorer in IntelliJ, do the following:

  1. In the Azure Explorer view, right-click the virtual machine, and then select Restart.

    The virtual-machine Restart command

  2. In the confirmation window, click Yes.

    The restart virtual machine confirmation window

Shut down a virtual machine in IntelliJ

To shut down a running virtual machine by using the Azure Explorer in IntelliJ, do the following:

  1. In the Azure Explorer view, right-click the virtual machine, and then select Shutdown.

    The virtual-machine Shutdown command

  2. In the confirmation window, click Yes.

    The shut down virtual machine confirmation window

Delete a virtual machine in IntelliJ

To delete a virtual machine by using the Azure Explorer in IntelliJ, do the following:

  1. In the Azure Explorer view, right-click the virtual machine, and then select Delete.

    The virtual-machine Delete command

  2. In the confirmation window, click Yes.

    The delete virtual machine confirmation window

Next steps

For more information about Azure virtual-machine sizes and pricing, see the following resources:

For more information about the Azure toolkits for Java IDEs, see the following links:

For more information about using Java with Azure, see the Azure Java Developer Center and the Java Tools for Visual Studio Team Services.