In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Some users created virtual machines such as A7 and D14 at the beginning to run some applications with high IO requirements, such as Oracle database and MySQL database. After the number of users came up, the performance was not enough and the data disk needed to be upgraded to SSD solid state disk. However, the problem was:
Azure SSD drives are Premium Storage Premium Storage
A Series, D Series VMs cannot use premium storage as data disks
Only DS, DSv2, GS series virtual machines can use SSD as data disk
A Series, D Series VMs cannot be upgraded directly to DS/GS Series
GS series is temporarily unavailable in China
So in this case, is there any other way than to create an advanced storage account, recreate the DS series virtual machine, and guide the database data from scratch? If the answer is yes, you can complete the migration of virtual machines by following these steps:
Depending on your current VM size, choose the VM size of the DS, DSv2 you want to create
Create a premium storage account. Premium storage is now available in Beijing and Shanghai, China.
Stop current VM, copy system VHD of current VM, data VHS to advanced storage account
Create System Disk with Copy Completed VHD
Creating DS, DSv2 Series Virtual Machines from System Disks
Mount the data disk and check data integrity
Recreate endpoint information, test service startup and connectivity
These steps are complicated and error-prone, so I created a VM migration script that can migrate between different vnets of the same subscription, between different cloud services, between different storage accounts, between different subscriptions, and between different VM types. The script has been placed on github. Please download it at the following address:
https://github.com/kingliantop/azurelabs/blob/master/vm/VMCopy.ps1
This article describes how to use the script to migrate between different types of virtual machines:
First, create a Windows Server 2012 virtual machine on Azure. Run the migration tool as a migration virtual machine. Choose a larger virtual machine size, such as A7. The execution performance of azcopy is mainly related to the number of cores of the virtual machine
Create a directory called migvm on disk D of the virtual machine (disk D is a temporary disk, important data should not be placed on it, this example is only used for temporary migration).
Install the corresponding version of Azure Powershell. In this test, please install version 0.9.8. This script currently runs in ASM mode and does not support ARM for the time being. Later versions will support:
Powershell 0.9.8
https://github.com/Azure/azure-powershell/releases? after=v1.0.0-preview-gallery-October2015
4. Install the latest version of azcopy, download link below, please install azcopy under d:\migvm:
Latest version of azcopy:
http://aka.ms/downloadazcopy
5. Download VMcopy.ps1 on Github and place it in the directory D:\migvm
6. Use the new portal or powershell on Azure to create advanced storage. The new portal in China can successfully create advanced storage after testing:
Or create via Powershell:
New-AzureStorageAccount -StorageAccountName "mypremstorage" -Location "China North" -Type "Premium_LRS"
7. In this test, the source VM is an A3 Linux VM with a data disk:
8. Collect information about the source VMs that currently need to be migrated:
Cloud Service Name
VM name
Current subscription ID
Target subscription ID (optional, same as source subscription by default, i.e. same subscription)
Target cloud service name (cloud service name must be unique)
Source storage container name (optional, default is vhds)
Target store name (name of the advanced store you created)
Target storage container name (optional, default vhds)
Target Virtual Network Name
Target region name (optional, default value China East)
Virtual network subnet name (optional, default Subnet-1)
Notes and instructions:
And you can see, for your convenience, most of the values that I have default values for if you don't write them, but you have to be very aware of your environment.
VM will be down during migration, script will be down after you confirm if it is not down
After the migration is complete, nothing changes to the source VM, just a copy of the source VM to the target storage and services
To avoid creating disks under the same subscription, disks are given the suffix "cp" by default to avoid duplication
The script can be used as follows:
.\ VMCopy.ps1 -SourceSubscriptionId SubID
-DestSubscritpionId DesSubID
-SourceCloudServiceName "mycs"
-SourceVMName "myvm"
-DestCloudServiceName "descs"
-DestStorageAccountName "destorage"
-DestLocationName "China East"
-DestVNetName "myvnet"
-DestSubNet "desubnet"
-DestSuffix "new"
9. Log in to your migration tool virtual machine, open Azure Powershell, add feed and target subscriptions:
Add-AzureAccount -Environment AzureChinacloud
10. In Powershell, execute the migration script to migrate, for example:
PS D:\migratevm> .\ VMCopy.ps1 -SourceSubscriptionId IDXXX -DestSubscritpionId IDXXXX -SourceCloudServiceName mydockermaster -SourceVMName mydockermaster -DestCloudServiceName mydo
ckermasterds -DestStorageAccountName myxiostorage -SourceStorageContainerName vhds -DestStorageContainerName vhds -DestVNetName mydsvmnet -DestLocationName "China North"
Continue reading →
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 296
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.