Windows Azure Configuration implements virtual machine extranet IP binding (cloud service)

Source: Internet
Author: User

Windows Azure Configuration implements virtual machine extranet IP binding (cloud service)

Our previous article describes how to make a connection to an existing virtual network's extranet IP, today mainly introduces the configuration to implement virtual machine extranet binding, the difference is that one already exists, one does not exist, if not, we need to create a new cloud service, and mark the new cloud service, The corresponding virtual machine can be created to complete the network IP binding, see below: First of all, note that the configuration of the reserved virtual machine extranet IP requires the following considerations

First, the precautions before operation:

1. If the virtual machines are using virtual networks, only ReservedIP can be used in the regional vnet, and an affinity-group-based virtual network already deployed cannot be converted directly to a regional vnet

2. This operation can only be done by PowerShell at this time

3. You must set up a reservedip before you create the virtual machine

4. Currently reservedip can be applied to virtual machines mounted under a regional virtual network, for which the public IP is reserved

5. ReservedIP is billed

Shutting down a virtual machine does not release the retained RIP, but when all virtual machines in the cloud service are deleted, RIP is freed, but not removed from the subscription, and you can use it to bind to virtual machines in other cloud services.

Second, create regional Vnet:

Creating a new virtual network in the portal's virtual network is created as a regional virtual network directly in the virtual network because it is now created as a "regional virtual network" by default.

Third, download and import publishsettings File

Iv. creation of ReservedIP

V. Create a new virtual machine in ReservedIP:

5.1 Specifying the current SubID and Storageaccount

Set-azuresubscription-subscriptionname "XXXX"-currentstorageaccountname "

The Huangchu are subid names, which are the name fields that were previously modified in publishsettings

The following is the name of the storage account, if the corresponding region does not have a storage account, you need to create a new

5.2 After listing the current image list, list the current image:

Input:

(get-azurevmimage) | Format-table-property imagename,publisheddate–autosize

This action lists the names of all current images and the release date. By default, select the latest version of the time. Please copy imagename full-text backup first

VI. Verify that the ReservedIP is in force:

Vii. deletion of ReservedIP:

Since ReservedIP is charged, you can delete it if you do not want to use it. Use command: Remove-azurereservedip-reservedipname "FRANKVIP"

Specific operation of the internship:

The first is to download and install PowerShell

We all know that Windows Azure-related operations depend on Windows Azure for PowerShell to manage, so we need to install Azure PowerShell

You can download Windowsazure subscriptions in the following ways

Https://manage.windowsauzre.cn/publishsettings

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C6/wKiom1Wn2aygLgvZAAHD57DOIt4075.jpg "height=" 338 "/>

Then download and install Windowsazure PowerShell, and then import the subscription file under Windowsazure PowerShell;

Access www.windowsazure.cn---> Documents and Resources---> Azure command line interface---->windows installation prompts you to download Windowsazure PowerShell

We can also view related documents for Windows PowerShell above

http://www.windowsazure.cn/documentation/articles/install-configure-powershell/

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C6/wKiom1Wn2ayCAY6sAAFROdt_EY4095.jpg "height=" 318 "/>

Azure PowerShell Download link, select 0.9.3 version when downloading

Https://github.com/Azure/azure-powershell/releases

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C6/wKiom1Wn2azhNQ9IAADXNBRCbuw533.jpg "height=" 310 "/>

Specific methods can be viewed inside the Web page

After the download is installed, according to the prompt installation of PowerShell can be;

(Get-module Azure). Version

The Azure PowerShell version currently used by the check list

Note: Executing the following command requires Azure PowerShell with version 0.9.3 and cannot be used with 0.9.4 Azure PowerShell If the latest uninstall is installed on the version

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C3/wKioL1Wn24jAarGXAACPSQ_zPuQ564.jpg "height=" 244 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C6/wKiom1Wn2a2iDhxSAADJSME-tmg049.jpg "height=" 342 "/>

Import-azurepublishsettingsfile importing. publishsettings files for use by modules

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C6/wKiom1Wn2a2AniZSAADt6NdxCzI501.jpg "height=" 343 "/>

Because I have already imported it, the following information will be prompted for import again

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24ngyNxHAAE8UzCVUbc999.jpg "height=" 319 "/>

If you import multiple subscription files in Windowsazure PowerShell, we need to select the default

We first view the imported subscription files under the current PowerShell via Get-azuresubscrpit

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C3/wKioL1Wn24nBKMAlAAESaswLKRg273.jpg "height=" 309 "/>

We found that there are two, so we need to set the default by the following command

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C3/wKioL1Wn24mS0tGwAACIviFLvCo342.jpg "height="/>

Select-azuresubscript-subsciptionname "xxxxx"-default

Then we can

GET-AZUREVM View all VM information for the current subscription

"ServiceName" for the cloud service name, "name" for the virtual machine name

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn24nwu-BvAABvLxhocD8354.jpg "height="/>

We first need to create a reservedip (it is not possible to specify an IP, this operation azureazure the Azure platform will randomly designate a platform for the customer to randomly designate a VIP) VIP):

$ReservedIP = New-azurereservedip-reservedipname "Rvip"-label "Testvip"-location "China North"

The name of the-reservedipname can be defined arbitrarily; In this I define: RVIP

-label for the description here I despise for TESTVIP

-location is a zone and must be in the same area as the virtual network

Create complete

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C6/wKiom1Wn2a7j1wZ6AACXcIU5D24662.jpg "height="/>

We view the specific reserved IP information through GET-AZURERESERVEDIP, if not yet deployed, Sevicename (on behalf of the cloud service name), Deploymentname (on behalf of the virtual name) will be empty

Get-azurereservedip-reservedipname RVIP

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24rRfNrIAAEDF7RyAGo852.jpg "height=" 267 "/>

We can of course also view all the ReservedIP through Get-azurereservedip

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24qgZbQ_AAFpBbcnlOs634.jpg "height=" 344 "/>

Then we create the virtual machine in the ReservedIP

1 Specify the current SubID and Storageaccount (otherwise create a virtual opportunity error)

Set-azuresubscription-subscriptionname "XXXX"-currentstorageaccountname "YYYY"

The Huangchu are subid names, which are the name fields that were previously modified in publishsettings

The following is the name of the storage account, if the corresponding region does not have a storage account, you need to create a new

View storage accounts and Subscriptionname

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C6/wKiom1Wn2a7TavFPAACvVnIdSjY796.jpg "height=" 303 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn24qAeWGQAACiF7qCnGQ993.jpg "height=" 257 "/>

Set-azuresubscription-subscriptionname "MSDN Ultimate"-currentstorageaccountname "Iternaldata"

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C6/wKiom1Wn2a6wkwoBAABYJq4o5Ac376.jpg "height="/>

2 lists the current image list, recording the number of permutations of the image you need to use: input:

(get-azurevmimage) | Format-table-property label,publisheddate–autosize

This action lists all current image names and release dates. The latest version is selected by default

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24qxCbDhAALWL2h7aKw782.jpg "height=" 328 "/>

(get-azurevmimage) | Format-table-property imagename,publisheddate–autosize

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn24uhc3NHAAK12cmFOho728.jpg "height="/>

We copy and choose the Imasgename of our choice.

55bc2b193643443bb879a78bda516fc8__windows-server-2012-r2-201502.01-zh.cn-127gb.vhd

After confirming the information, start deploying the virtual machine in ReservedIP

If you need to create the Windows virtual machine code as follows:

new-azurevmconfig -name  "Windows" [f4] -instancesize small -imagename  ( Get-azurevmimage) [29]. imagename[f5] | add-azureprovisioningconfig -windows -adminusername gavin - password password2015 | new-azurevm -servicename  "Customcloud" [F6] – reservedipname  "Rvip" [f7] -location  "China north" [f8]commented [f4]:  definition   The new  VM  configuration   File name commented [f5]:  specify    imageimageimageimageimage name,name to use , Name,name,name, paste the previous copy   commented [f6]:  the name of the new   cloud service commented [f7]:  specify   to apply the   reservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipcommented  [F8]:  effective   Position (  before      )) commented [f10]:  definition   The new  VM   Configuration   file name commented [f11]:  new   Cloud service name commented [f12]:  specify   to apply   Reservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipreservedipcommented [f13]:  Effective   Location (  before     consistent  ))

My code is as follows:

New-azurevmconfig-name "Winodws"-instancesize large-imagename "55bc2b193643443bb879a78bda516fc8__ Windows-server-2012-datacenter-201502.01-zh.cn-127gb.vhd "| Add-azureprovisioningconfig-windows-adminusername Gavin-password Password2015 | New-azurevm-servicename "Customcloud" –reservedipname "Rvip"-location "China North"

If you need to build inside your vnet, add –vnetname "vnetname" virtual network name after-location "XXX"

Also add before Add-azureprovisioningconig | Set-azuresubnet-subnetname "Subnetname" | Subnet name under Virtual network

Because we need to specify the internal virtual network, we need to specify the parameters, the specific implementation is as follows:

New-azurevmconfig-name "Winodws"-instancesize large-imagename "55bc2b193643443bb879a78bda516fc8__ Windows-server-2012-r2-201502.01-zh.cn-127gb.vhd "| Set-azuresubnet-subnetname "Subnet-1" | Add-azureprovisioningconfig-windows-adminusername Gavin-password Password2015 | New-azurevm-servicename "Customcloud" –reservedipname "Rvip"-location "China North"-vnetname "Iternal"

If you need to build Linux virtual machine code as follows :

New-azurevmconfig-name "Linux"-instancesize large-imagename "55bc2b193643443bb879a78bda516fc8__ Windows-server-2012-r2-201502.01-zh.cn-127gb.vhd "| Add-azureprovisioningconfig-linux-linuxuser Gavin-password Password2015 | New-azurevm-servicename "Customcloud" –reservedipname "Rvip"-location "China North"

If you need to build inside the vnet, add –vnetname "Vnetname" to the virtual network after-location "XXX"

Also add before Add-azureprovisioningconig | Set-azuresubnet-subnetname "Subnetname" Subnetname is the subnet name under the virtual network

Because we need to specify the internal virtual network, we need to specify the parameters, the specific implementation is as follows:

New-azurevmconfig-name "Linux"-instancesize large-imagename "55bc2b193643443bb879a78bda516fc8__ Windows-server-2012-r2-201502.01-zh.cn-127gb.vhd "| Set-azuresubnet-subnetname "Subnet-1" | Add-azureprovisioningconfig-linux-linuxuser Gavin-password Password2015 | New-azurevm-servicename "Customcloud" –reservedipname "Rvip"-location "China North"-vnetname "Iternal"

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24vSn7PLAAEX5IPXnXs480.jpg "height=" 168 "/>

After the operation, we then pass

Get-azurereservedip

To display the currently configured RESERVEDIP

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C3/wKioL1Wn24ui0O85AAD-h2iGQ9A066.jpg "height=" 229 "/>

And then view it on the portal.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C6/wKiom1Wn2a-CP5KiAADfFZXs9Cg284.jpg "height=" 352 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn24uQuJP0AACiPZikogk286.jpg "height=" 172 "/>

The next step is to verify that RESERVERDIP is effective

The first is to record the current VIP information 139.219.12.75

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn24vSZbRxAAEd97BNnm8954.jpg "height=" 323 "/>

We shut down this VM for 30 minutes and the address will be released after the shutdown

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn24yTR5d0AAEmtiEOOuU015.jpg "height=" 352 "/>

After 30 minutes, we start the VM again and look at the public virtual IP address

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C6/wKiom1Wn2bDCt62ZAAFC7d8s7Wo840.jpg "height=" 357 "/>

How to delete the ReservedIP:

Because the ReservedIP is charged, so do not want to use, can be deleted;

Before deleting, we can see which reservedip are under the current subscription with the following command

Get-azurereservedip

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C6/wKiom1Wn2bDhAsmNAAD4Zw6udwc104.jpg "height=" 237 "/>

Then delete the reservedip named Rvip

Remove-azurereservedip-reservedipname "RVIP"

It is important to note that if a virtual machine exists in the relevant cloud service, the virtual machine needs to be deleted before the ReservedIP can be deleted.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C3/wKioL1Wn26KgO6qOAAEq8XoNpJg304.jpg "height=" 195 "/>

We delete the VM under the ReservedIP

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/C6/wKiom1Wn2caS9Z-WAADqBfXHukk652.jpg "height=" 353 "/>

After deletion, we try again to delete the reservedip named Rvip

Remove-azurereservedip-reservedipname "RVIP"

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/C6/wKiom1Wn2cajBQTcAADsCEoWljE504.jpg "height=" 175 "/>

And then we do it again.

Get-azurereservedip

View all ReservedIP under the current subscription

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/C3/wKioL1Wn26KBcRS0AACB8qqf5pg193.jpg "height="/>

This article is from the "Gao Wenrong" blog, make sure to keep this source http://gaowenlong.blog.51cto.com/451336/1675494

Windows Azure Configuration implements virtual machine extranet IP binding (cloud service)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.