Manage virtual machines by using the Azure Explorer for Eclipse

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

Prerequisites

To complete the steps in this article, you will need to install the Azure Toolkit for Eclipse, which requires the following software components:

Note

The Azure Toolkit for Eclipse page at the Eclipse Marketplace lists the builds that are compatible with the toolkit.

Displaying the Azure Explorer view

If the Azure Explorer view is not visible in Eclipse, display it by doing the following:

  1. Click Window, click Show View, and then click Other.

    Show View command

  2. In the Show View dialog box, select Azure Explorer, and then click OK.

    Show View dialog box

Create a virtual machine in Eclipse

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

  1. Sign in to your Azure account by using the Sign-in instructions for the Azure Toolkit for Eclipse.

  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).

    • Publisher: Specifies the publisher that created the image you'll use to create 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 Create New Storage Account 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 a resource group that is already associated with your Azure account.

        The Create New Storage Account dialog box

    • Storage account: Specifies the storage account to use for storing your virtual machine. You can use an existing storage account or create a new account.

    • 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 is displayed:

      The Create New Virtual Network dialog box

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

    • 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 or create a new availability set or, if your virtual machine will not belong to an availability set, you can select (None).

    The Associated Resources window

  10. Click Finish.

    Your new virtual machine is displayed in the Azure Explorer tool window.

    New Virtual Machine

Restart a virtual machine in Eclipse

To restart a virtual machine by using the Azure Explorer in Eclipse, 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 confirmation window

Shut down a virtual machine in Eclipse

To shut down a running virtual machine by using the Azure Explorer in Eclipse, 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 virtual-machine shutdown confirmation window

Delete a virtual machine in Eclipse

To delete a virtual machine by using the Azure Explorer in Eclipse, 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 virtual-machine deletion confirmation window

Next steps

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

To report bugs or request new features, create issues on our GitHub repository. Or, ask questions on Stack Overflow with tag azure-java-tools.

For more information about using Java with Azure, see the following links: