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:
- An Azure supported Java Development Kit (JDK)
- An Eclipse IDE
- The Azure Toolkit for Eclipse, see installation guide for more information
- Be signed in to your Azure account for the Azure Toolkit for Eclipse
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:
Click Window, hover over Show View, and then click Other.
In the Show View dialog box, expand Azure, select Azure Explorer, and then click Open.
Create a virtual machine
Sign in to your Azure account by using the Sign-in instructions for the Azure Toolkit for Eclipse.
In the Azure Explorer view, expand the Azure node, right-click Virtual Machines, and then click Create VM.
In the Choose a Subscription window, select your subscription, and then click Next.
In the Select a Virtual Machine Image window, select your Location (e.g. West US). You'll have the option to proceed with a recommended image or select a custom image. For this quickstart, we will proceed with the recommended image.
If you choose to select a custom image, enter the following information:
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.
Click Next.
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 : Specifies the password for your administrator account. Re-enter your password in the Confirm box to validate the credential.
Click Next.
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 a resource group that is already associated with your Azure account.
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:
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).
Click Finish.
Note
You can check the creation progress on the lower-right corner of your Eclipse workspace.
Restart a virtual machine
To restart a virtual machine by using the Azure Explorer in Eclipse, do the following:
In the Azure Explorer view, right-click the virtual machine, and then select Restart.
In the confirmation window, click OK.
Shut down a virtual machine
To shut down a running virtual machine by using the Azure Explorer in Eclipse, do the following:
In the Azure Explorer view, right-click the virtual machine, and then select Shutdown.
In the confirmation window, click OK.
Delete a virtual machine
To delete a virtual machine by using the Azure Explorer in Eclipse, do the following:
In the Azure Explorer view, right-click the virtual machine, and then select Delete.
In the confirmation window, click ok.
Next steps
For more information about Azure virtual-machine sizes and pricing, see the following resources:
- Azure virtual-machine sizes
- Azure virtual-machine pricing
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: