×
Community Blog Hướng dẫn chuyển server Linux lên Alibaba Cloud bằng Server Migration Center (SMC) thông qua go2aliyun_client

Hướng dẫn chuyển server Linux lên Alibaba Cloud bằng Server Migration Center (SMC) thông qua go2aliyun_client

Bài viết hướng dẫn chuyển server Linux lên Alibaba Cloud bằng Server Migration Center (SMC) thông qua go2aliyun_client

Bài viết hướng dẫn chuyển server Linux lên Alibaba Cloud bằng Server Migration Center (SMC) thông qua go2aliyun_client

Yêu cầu chung

  • Link dịch vụ: https://smc.console.aliyun.com/
  • Đối với server Linux cần kết nối được ssh từ public internet, disable selinux, trên server phải có wget, rsync
  • Đối với server Windows cần cài OpenSSH cho Windows (tham khảo tại link)

** Lưu ý: Trước khi bạn sử dụng dịch vụ Migrate của SMC, phải đáp ứng các yêu cầu sau:

(1) Đã kích hoạt dịch vụ RAM và cho phép SMC truy cập tài nguyên Cloud

Thao tác này chỉ cần thao tác một lần trong lần đầu sử dụng dịch vụ SMC.

Khi lần đầu sử dụng sẽ nhận được thông báo như hình, bấm vào Authorize sau đó làm theo hướng dẫn để kích hoạt.

migrate_server_vm_tren_alibaba_cloud_su_dung_ssh_1

(2) Đã Active Snapshot Service

migrate_server_vm_tren_alibaba_cloud_su_dung_ssh_2

Tương tự như trên, bạn cần click vào Active Now một lần trong lần đầu sử dụng và làm theo hướng dẫn.

Bước 1: Vào trang SMC console để lấy đường links tải tool

Link có thể lấy như hình ảnh hoặc sử dụng link sau:

https://p2v-tools.oss-cn-hangzhou.aliyuncs.com/smc/Alibaba_Cloud_Migration_Tool.zip

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_3

Hoặc: SSH vào server/VM cần chuyển dùng wget để tải File về

Sử dụng link sau:

https://p2v-tools.oss-cn-hangzhou.aliyuncs.com/smc/Alibaba_Cloud_Migration_Tool.zip

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_4

Bước 2: Unzip các file và tools tùy vào OS của VM

Unzip các file vừa tải về ra

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_5

Sau khi unzip Alibaba_Cloud_Migration_Tool.zip, bạn chọn phần mềm tương ứng với hệ điều hành mà Server/VM đang sử dụng và unzip.

Bước 3: Cấu hình Access ID và Sercet ID

Đầu tiên cần lấy được Access IDSercet ID

Vào Alibaba Cloud Management Console => chọn phần AccessKey Management.

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_6

Chọn Use Curent Access Key

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_7

Tại đây có thể tạo key mới hoặc sử dụng key cũ

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_8

Chọn View Secret để lấy Secret ID
migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_9

Có thể tham khảo cách lấy tại links sau: https://www.alibabacloud.com/help/en/basics-for-beginners/latest/obtain-an-accesskey-pair

Khi thực hiện sẽ có 2 cách:

Cách 1: Chỉnh sửa trực tiếp tại file user_config.json

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_10

Điền Access Key ID và Secret Key ID vào file
migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_11

  • Cách 2: chạy trực tiếp trên script.
./go2aliyun_client --accessid=<AccessKey ID> --secretkey=<AccessKey Secret>

Bước 4: Chạy tool tiến hành import

Tiến hành chạy script go2aliyun_client
migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_12

Khi có thông báo Suscessfully và Go to SMC console to Create New Job, thì truy cập trang web: https://smc.console.aliyun.com/sourceServers để tạo Migrate Jobs.

migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_13

Khi tạo Migrate Jobs thì trên server sẽ thể hiện như sau:
migrate_server_vm_tren_alibaba_cloud_su_dung_tool_go2aliyun_client_14

Khi tạo ESC Instance bạn hãy chọn Images theo như tên mà bạn đã đặt ở bước trước đó.
migrate_server_vm_tren_alibaba_cloud_su_dung_ssh_21

  • Lưu ý:
  • Sau khi tạo và bắt đầu Migrate, hãy đảm bảo rằng Server/VM đang phải online cho đến khi công việc hoàn thành. Nếu không, quá trình Migrate sẽ không thành công.
  • Sau khi công việc Migrate bắt đầu, một phiên bản trung gian sẽ được tạo. Không thực hiện các thao tác trên VM này. Nếu không, lỗi có thể xảy ra.
  • Thời gian Migrate Server, VM phụ thuộc vào dung lượng dữ liệu và băng thông mạng. Nếu khối lượng dữ liệu lớn hoặc băng thông mạng nhỏ, quá trình Migrate có thể mất nhiều thời gian. Trong trường hợp này, bạn có thể đợi hoặc chuyển qua mạng Express Connect.
  • Lúc này nên đợi hệ thống thực hiện xong, bạn không nên thao tác trong thời gian này.

Bài viết liên quan

  • Server Migration Center (SMC) là gì ?
  • Hướng dẫn chuyển server Linux lên Alibaba Cloud bằng Server Migration Center (SMC) thông qua SSH
  • Hướng dẫn chuyển server Windows lên Alibaba Cloud bằng Server Migration Center (SMC)

Tài liệu tham khảo

0 0 0
Share on

Tran Phuc Hau

14 posts | 3 followers

You may also like

Comments

Tran Phuc Hau

14 posts | 3 followers

Related Products