{"id":575,"date":"2021-07-23T12:33:14","date_gmt":"2021-07-23T12:33:14","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/azure-virtual-machine-management\/"},"modified":"2021-07-23T12:33:14","modified_gmt":"2021-07-23T12:33:14","slug":"azure-virtual-machine-management","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/azure-virtual-machine-management\/","title":{"rendered":"Azure Virtual Machine Management"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>After you launch a virtual machine with cPanel &#038; WHM on Azure\u00ae, you can manage it from the Azure portal. This document describes common tasks that your Azure virtual machine with cPanel &#038; WHM may require.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>For more information, read Azure\u2019s Documentation.<\/p>\n<\/p><\/div>\n<\/div>\n<h2 id=\"accessing-your-virtual-machine\">Accessing your virtual machine<\/h2>\n<p>You can access your virtual machine using one of the following options:<\/p>\n<ul>\n<li>At the bottom of the <em>Your deployment is complete<\/em> message, click <em>Go to resource<\/em>.<\/li>\n<li>Enter <code>Virtual Machines<\/code> in the search bar, then select your machine.<\/li>\n<li>Your Azure portal home page.<\/li>\n<\/ul>\n<h2 id=\"logging-in-to-whm-for-the-first-time\">Logging in to WHM for the first time<\/h2>\n<p>Logging in to WHM for the first time differs based on your administrator account\u2019s authentication method.<\/p>\n<h3 id=\"using-a-password\">Using a password<\/h3>\n<p>If you use a password for your administrator account, you can log into WHM using your administrator username and password. In a web browser, connect to your virtual machine\u2019s public IP address using HTTPS on port <code>2087<\/code>. For example: <code>https:\/\/192.0.2.0:2087<\/code>. The cPanel &#038; WHM installation process creates a limited version of a reseller account using that username and password.<\/p>\n<p>If you need to access your virtual machine\u2019s <code>root<\/code> account, perform the following steps:<\/p>\n<ol>\n<li>Log in to WHM.<\/li>\n<li>Navigate to WHM\u2019s <em>Change Root Password<\/em> interface (<em>WHM &gt;&gt; Server Configuration &gt;&gt; Change Root Password<\/em>).<\/li>\n<\/ol>\n<h3 id=\"using-an-ssh-key\">Using an SSH key<\/h3>\n<p>If you choose to use an SSH key rather than a password, you <strong>must<\/strong> perform the following extra steps before you can log in to WHM for the first time:<\/p>\n<ol>\n<li>\n<p>If using a new key pair, add your key to your computer.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>If you did not download your key while launching your virtual machine, you can access it from Azure\u2019s <em>Resource groups<\/em> interface. Click the name of your virtual machine\u2019s resource group then the name of the key.<\/p>\n<\/p><\/div>\n<\/div>\n<div class=\"tabs-main-wrapper\">\n<ul class=\"nav nav-pills mb-3\" id=\"pills-tab\" role=\"tablist\">\n<li class=\"nav-item\">\n    macOS\n<\/li>\n<li class=\"nav-item\">\n    Windows\n<\/li>\n<\/ul>\n<div class=\"tab-content\" id=\"pills-tabContent\">\n<div class=\"tab-pane fade show active\" id=\"tab-title-1\" role=\"tabpanel\" aria-labelledby=\"pills-home-tab\">\n<p>On an macOS\u00ae computer that uses the default download folder:<\/p>\n<ol>\n<li>\n<p>Run the following command, where <code>example<\/code> represents the key pair\u2019s name:<\/p>\n<pre><code>mv ~\/Downloads\/example.pem ~\/.ssh\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Run the following command to modify the permissions for the <code>.pem<\/code> file, where <code>example<\/code> represents the key pair\u2019s name:<\/p>\n<pre><code>chmod 600 ~\/.ssh\/example.pem\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Run the following command to add the key pair, where <code>example<\/code> represents the key pair\u2019s name:<\/p>\n<pre><code>ssh-add ~\/.ssh\/example.pem\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<\/div>\n<div class=\"tab-pane fade \" id=\"tab-title-2\" role=\"tabpanel\" aria-labelledby=\"pills-home-tab\">\n<p>On a Windows\u00ae computer that runs the PuTTY client and uses the default download folder, perform the following steps:<\/p>\n<ol>\n<li>\n<p>From the Windows <em>Start<\/em> menu, open <em>PuttyGen<\/em>.<\/p>\n<\/li>\n<li>\n<p>Under the <em>Conversions<\/em> heading, click <em>Import<\/em>.<\/p>\n<\/li>\n<li>\n<p>Navigate to the <em>PuTTY Key Generator<\/em> interface and select the <code>.pem<\/code> key you downloaded. Click <em>Open<\/em>.<\/p>\n<\/li>\n<li>\n<p>Enter a passphrase in the <em>Key passphrase<\/em> and <em>Confirm passphrase<\/em> text boxes.<\/p>\n<\/li>\n<li>\n<p>Click <em>Save private key<\/em> and save the key as a <code>.ppk<\/code> file.<\/p>\n<\/li>\n<li>\n<p>From the Windows <em>Start<\/em> menu, open <em>PuTTY<\/em>.<\/p>\n<\/li>\n<li>\n<p>In the <em>Session<\/em> interface, enter the following information:<\/p>\n<ul>\n<li><em>Hostname (or IP address)<\/em> \u2014 You virtual machine\u2019s IP address.<\/li>\n<li><em>Port<\/em> \u2014 Enter <code>22<\/code>.<\/li>\n<li><em>Connection type<\/em> \u2014 Select <em>SSH<\/em>.<\/li>\n<li><em>Saved sessions<\/em> \u2014 Enter a name for your session. Then click <em>Save<\/em>.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Navigate to the <em>Auth<\/em> interface under the <em>SSH<\/em> category.<\/p>\n<\/li>\n<li>\n<p>Click <em>Browse<\/em>, select the <code>.ppk<\/code> file you created, and click <em>Open<\/em>.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>After completing the installation of WHM on your virtual machine, log in as your virtual machine\u2019s administrator user over SSH. Use the following command, where <code>key<\/code> represents the file path of your SSH key, <code>user<\/code> represents the user you created with your virtual machine and <code>IP<\/code> represents your virtual machine\u2019s IP address:<\/p>\n<pre><code>ssh -i key user@IP\n<\/code><\/pre>\n<\/li>\n<li>\n<p>To get a temporary WHM login URL, run the following command:<\/p>\n<pre><code>sudo whmlogin\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Use that login URL to add a password to the <code>root<\/code> user.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"manage-virtual-machines\">Manage virtual machines<\/h2>\n<p>To manage an Azure virtual machine, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Access your virtual machine from your Azure portal.<\/p>\n<\/li>\n<li>\n<p>Select the desired action from the menu bar below your virtual machine\u2019s name:<\/p>\n<ul>\n<li>\n<p><em>Connect<\/em> \u2014 This action will help you connect your virtual machine with SSH clients.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>While Remote Desktop Protocols (RDP) and Azure\u2019s Bastion service are listed as other options, these do <strong>not<\/strong> work with cPanel &#038; WHM.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p><em>Start<\/em> \u2014 This action will start a stopped virtual machine. This is <strong>not<\/strong> available for virtual machines that are already running.<\/p>\n<\/li>\n<li>\n<p><em>Restart<\/em> \u2014 This action will restart the instance. This is <strong>not<\/strong> available for stopped virtual machines.<\/p>\n<ul>\n<li>You will be asked to confirm you want to restart your virtual machine.<\/li>\n<li>Click <em>Yes<\/em>.<\/li>\n<li>A progress message will appear. It will inform you when your virtual machine finishes restarting.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><em>Stop<\/em> \u2014 This action will stop your virtual machine.<\/p>\n<ul>\n<li>You will be asked if you want to reserve the public IP address your machine is currently using.\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>Your cPanel &#038; WHM license is tied to your IP address. You <strong>must<\/strong> select this to avoid issues when restarting your instance.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>You will be asked to confirm you want to stop your virtual machine.<\/li>\n<li>Click <em>OK<\/em>.<\/li>\n<li>If you selected to save the public IP address, a progress message confirming that will appear.<\/li>\n<li>A progress message confirming your virtual machine is stopped will appear.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><em>Capture<\/em> \u2014 This action will create an image based on your virtual machine.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>We <strong>strongly<\/strong> recommend you do <strong>not<\/strong> capture images of your cPanel &#038; WHM virtual machines. Capturing images can result in privacy and data issues for you and your users.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p><em>Delete<\/em> \u2014 This action will delete the virtual machine.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>This will <strong>only<\/strong> delete the virtual machine. This will <strong>not<\/strong> delete any of the resources associated with the virtual machine. Read the Delete a virtual machine section below for more information.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p><em>Refresh<\/em> \u2014 This action refreshes the page you are currently on. This is useful after you stop or restart your virtual machine as the menu might not automatically update.<\/p>\n<\/li>\n<li>\n<p><em>Share to mobile<\/em> \u2014 This action will provide you with a QR code and a direct link to the Azure interface of your virtual machine.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2 id=\"delete-a-virtual-machine-or-resource-group\">Delete a virtual machine or resource group<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>Azure will bill you for all active resources on your account. We recommend that you delete unused resource groups rather than <strong>only<\/strong> deleting unused virtual machines.<\/p>\n<\/p><\/div>\n<\/div>\n<p>Running a virtual machine on Azure requires more resources than the virtual machine itself. These resources are grouped together in a resource group. If you only delete the virtual machine, the other resources will remain. If no other virtual machines are using the same resource group, we recommend deleting not only the virtual machine but the entire resource group.<\/p>\n<p>It may take a few minutes for a deleted virtual machine or resource group to disappear from the Azure interface.<\/p>\n<p>For more information, read Microsoft\u2019s Azure Resource Manager resource group and resource deletion documentation.<\/p>\n<h3 id=\"delete-a-virtual-machine\">Delete a virtual machine<\/h3>\n<p>To delete <strong>only<\/strong> a virtual machine, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Access your virtual machine from your Azure portal.<\/p>\n<\/li>\n<li>\n<p>Click <em>Delete<\/em> on the menu bar below your virtual machine\u2019s name.<\/p>\n<\/li>\n<li>\n<p>A message will warn you that your virtual machine will be permanently deleted. It will also tell you that the associated resources will not be deleted.<\/p>\n<\/li>\n<li>\n<p>Click <em>Yes<\/em>.<\/p>\n<\/li>\n<li>\n<p>A progress message will appear. It will inform you when your virtual machine is deleted.<\/p>\n<\/li>\n<\/ol><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview After you launch a virtual machine with cPanel &#038; WHM on Azure\u00ae, you can manage it from the Azure portal. This document describes common tasks that your Azure virtual machine with cPanel &#038; WHM may require. Note: For more information, read Azure\u2019s Documentation. Accessing your virtual machine You can access your virtual machine using &hellip;<\/p>\n","protected":false},"author":1,"featured_media":576,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/575"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/576"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}