Migrate Linux VM from vSphere to NCS
- centos8
- centos7
- ubuntu18.04
- ubuntu20.04
- non LVM partition (all Linux Distro)
- 1.ทำการ disable NetworkManager service และ enable network service
systemctl disable NetoworkManager

systemctl enable network

systemctl restart network
systemctl status network
systemctl status NetworkManager

2. แก้ไข fstab file เพื่อทำการปิด swap
vim /etc/fstab

3. ติดตั้ง cloud-init สำหรับ centos7
yum install cloud-utils-growpart cloud-init cloud-utils
rpm -qa | grep cloud

4. ทำการ remove interface configuration

rm -rf /etc/sysconfig/network-scripts/ifcfg-ens192
poweroff
- 1.ทำการแก้ไข fstab file
vim /etc/fstab

2. ทำการ clear configuration file ของ cloud-init (เฉพาะ ubuntu20.04 ขึ้นไป)
rm -rf /var/lib/cloud/instances/*
rm -rf /etc/netplan/00-installer-config.yaml
touch /etc/netplan/50-cloud-init.yaml
1. ทำการลบ vmware-tools โดยการ mout iso ของ vmware-tools

2. ทำการ run command
./vmware-uninstall-tools.pl

1. ทำการ Download Disk FIle จาก vCenter

2. รอการ download โดยจะได้ file เป็น zip

3. เมื่อ download เสร็จแล้วให้ทำการ extract file

4. เมื่อทำการ extract file จะได้ file ดังรูป

5. ทำการ convert vmdk file ไปยัง qcow2
qemu-img convert -O qcow2 centos7-migrate1.vmdk centos7-migrate1.qcow2

- 1.ทำการ upload ขึ้นที่ฝาก file โดยจากตัวอย่างจะใช้ Onedrive

2. เข้าไปที่ nipa space คลิ๊กที่ Image ดังรูป

3. ทำการใส่ตั้งชื่อ image และ URL ของ image file

4. เลือก Advance settings ทำการเลือก
- Operating System Type เป็น Windows โดยตั้ง Min Disk เป็น 40
- Cloud-Init Agent
- QEMU Agent

5. ไปที่หน้า instance เพื่อทำการสร้าง instance จาก image ที่ upload ขึ้นไป
