> For the complete documentation index, see [llms.txt](https://docs-epc.gitbook.io/ncs-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-epc.gitbook.io/ncs-documents/migration/migrating-windows-vm-from-vsphere-to-ncs.md).

# Migrating Windows VM from vSphere to NCS

NIPA Cloud Space หรือ NCS เป็น pubilc cloud ที่คุณสามารถย้ายระบบของคุณมาใช้บน NCS ได้ด้วยตนเอง คุณสามารถศึกษาวิธีการย้ายระบบจาก Windows VM บน vSphere มาสู่ NIPA Cloud Space และติดตั้ง instance ได้จากเอกสารนี้ &#x20;

**ระบบ Windows VM ที่สามารถย้ายสู่ NIPA Cloud Space ได้ มีดังนี้** &#x20;

* Windows Server 2022&#x20;
* Windows Server 2019&#x20;
* Windows Server 2016&#x20;
* Windows Server 2012 R2&#x20;
* Windows 8&#x20;
* Windows 8.1&#x20;
* Windows 10&#x20;

การย้ายระบบสู่ NIPA Cloud Space สามารถทำได้ตามขั้นตอนต่อไปนี้ &#x20;

1. [จัดการ Windows ใน VMware ให้พร้อม](#step-1-windows-vmware)
2. [Convert ไฟล์ vmdk เป็น qcow2 เพื่อ Import สู่ NCS](#step-2-convert-vmdk-qcow2-import-ncs)
3. [อัปโหลดขึ้น NIPA Cloud Space](#step-3-nipa-cloud-space)
4. [สร้าง instance จากไฟล์ที่อัปโหลดแล้ว](#step-4-instance)

## Step 1: จัดการ Windows ใน VMware ให้พร้อม&#x20;

1. **Clone VM** ที่ต้องการ migrate

<figure><img src="/files/kVeojK0Phn20gyxevAl4" alt=""><figcaption></figcaption></figure>

2\. ดาวน์โหลด virtio driver ที่เป็น ISO file ที่ <https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso> และเชื่อมต่อ ISO file ไปยัง VM ที่ clone มาในข้อ 1.

<figure><img src="/files/xcbUKiFwrLQQ5BOgqOXV" alt=""><figcaption></figcaption></figure>

3\. เมื่อเชื่อมต่อ virtio file มายัง VM แล้ว จะได้ไฟล์ DVD virtio-win-0.1.215 ดังภาพ ให้คลิกขวาแล้วเลือก Open in new window

<figure><img src="/files/vy8eGQBBbPnk99JJPFZR" alt=""><figcaption></figcaption></figure>

4\. Double click ที่ virtio-win-guest-tools เพื่อติดตั้งทุกอย่างที่จำเป็นในการย้ายไปยัง OpenStack

<figure><img src="/files/Q69sAsMdpIU6hOSAVEuT" alt=""><figcaption></figcaption></figure>

5\. เมื่อคลิกแล้วจะพบหน้าต่างติดตั้ง Virtio-win ให้ติดตั้งโดยคลิก Next >> I accept... >> Next >> Next (ไม่ต้องแก้ไขอะไร) >> Install&#x20;

<figure><img src="/files/xqhY9LVIj4WsTpt9aE40" alt=""><figcaption></figcaption></figure>

6\. คลิก Install เพื่อติดตั้ง

<figure><img src="/files/v7Vx0XU5rgkBpjywfAcC" alt=""><figcaption></figcaption></figure>

7\. เมื่อติดตั้งเสร็จแล้ว คลิก Finish

<figure><img src="/files/sUW9vXW8I1fi8rszGNe2" alt=""><figcaption></figcaption></figure>

8\. เมื่อติดตั้งสำเร็จ จะปรากฏ Installation Successfully ดังภาพ

<figure><img src="/files/JVG5AQrIKYOZI949LtZz" alt=""><figcaption></figcaption></figure>

9\. ตรวจสอบ service การทำงานของ QEMU Guest Agent

<figure><img src="/files/NQflIi4EmxMuGDa3ZX4g" alt=""><figcaption></figcaption></figure>

10\. เปิด remote desktop ที่ server manager

![](/files/Y2pxYvmotpaItCZmXkH8)

11\. ปิด filewall ทุกระดับ

![](/files/vHzSDTtNwi9rdX2eQFqo)

12\. ตรวจสอบอีกครั้งให้แน่ใจว่า remote desktop เปิด และ firewall ปิดอยู่ ดังภาพ

<figure><img src="/files/rsu4IqrRqJxuzUVE3QRV" alt=""><figcaption></figcaption></figure>

13\. Uninstall VMware Tools

<figure><img src="/files/RomnkroAh4EVdUcNCEAa" alt=""><figcaption></figcaption></figure>

14\. ติดตั้ง CloudbaseInit ซึ่งเป็น cloud-init สำหรับ Windows โดยสามารถดาวน์โหลดได้ที่

{% embed url="<https://cloudbase.it/cloudbase-init#download>" %}

15\. เริ่มติดตั้งโดยการคลิกที่ไฟล์ที่ดาวน์โหลดแล้ว จากนั้นคลิก Next >> I accept the terms... >> Next >> Next (ไม่ต้องแก้ไขอะไร) >> Next (ไม่ต้องแก้ไขอะไร) >> Install

![](/files/aIXskcjxNSFSRscy6CpG)

16\. เมื่อติดตั้งเสร็จแล้วให้เลือก&#x20;

1\) Run Sysprep ...&#x20;

2\) Shutdown ...&#x20;

19\. คลิก finish แล้วรอสักครู่เพื่อให้เครื่อง shutdown

![](/files/oNAlKRONbxBLvkF3WAZD)

### Step 2: Convert ไฟล์ vmdk เป็น qcow2 เพื่อ Import สู่ NCS&#x20;

1\. ดาวน์โหลด Disk FIle จาก vCenter

<figure><img src="/files/qB4osoPzk3gkjgHk9dd6" alt=""><figcaption></figcaption></figure>

2\. ไฟล์ที่ดาวน์โหลดมาแล้ว จะเป็นไฟล์ zip ให้ extract file นั้น

![](/files/RIOnXjo3ujvzVtd9T5Oq)

3\. เมื่อ extract file แล้ว จะได้ file ดังภาพ

<figure><img src="/files/dyngz52tWbXyVH00RVfL" alt=""><figcaption></figcaption></figure>

33\. Convert ไฟล์ vmdk เป็น qcow2

<figure><img src="/files/gpGJQ82AMxQ6wdM0RxJN" alt=""><figcaption></figcaption></figure>

34\. เมื่อ convert สำเร็จ จะได้ไฟล์ qcow2 ดังภาพ

<figure><img src="/files/jvQuzsoal2wTj5Humqjt" alt=""><figcaption></figcaption></figure>

###

### Step 3: อัปโหลดขึ้น NIPA Cloud Space (NCS)

1. ฝากไฟล์ qcow2 ที่ได้ บนแพลตฟอร์มออนไลน์ใดก็ได้ ในที่นี้ จะใช้ Onedrive

<figure><img src="/files/brIRtFKy3q2p6aukoGR4" alt=""><figcaption></figcaption></figure>

2\. ล็อกอินเข้า NIPA Cloud Space แล้วคลิกที่ Image ดังภาพ

<figure><img src="/files/GIHKhWn21G9ADqDgaoVl" alt=""><figcaption></figcaption></figure>

3\. ตั้งชื่อ image และ URL ของ image file

<figure><img src="/files/lCKGJoGxrDUajrZtw8R6" alt=""><figcaption></figcaption></figure>

4\. คลิกที่ Advance settings แล้วตั้งค่าดังนี้&#x20;

* Operating System Type: Windows
* Min Disk: 40
* คลิกเลือก Cloud-Init Agent&#x20;
* คลิกเลือก QEMU Agent

<figure><img src="/files/hGmACYVWml8B871wcM6q" alt=""><figcaption></figcaption></figure>

### Step 4: สร้าง instance จากไฟล์ที่อัปโหลดแล้ว

1\. ไปที่ instances แล้วคลิก Instance(s) เพื่อสร้าง instance

<figure><img src="/files/9bpuKIHVzgQK8jVjagCJ" alt=""><figcaption></figcaption></figure>

2\. ไปที่ Images เพื่อเลือก Images ที่ import เข้ามา

<figure><img src="/files/8mdEAeHC5qMEQKCXCJzU" alt=""><figcaption></figcaption></figure>

3\. เลือก Machine Type

<figure><img src="/files/p7x8JvSWP48DZtAwJex3" alt=""><figcaption></figcaption></figure>

3\. ตั้งชื่อ Instance

<figure><img src="/files/GtLBet3sTzJ1a9wRLUcW" alt=""><figcaption></figcaption></figure>

4\. เลือก storage type สำหรับ volume

<figure><img src="/files/z4S1ms3ashDYf2bfvDOP" alt=""><figcaption></figcaption></figure>

5\. ตั้งค่า IP address

<figure><img src="/files/B0N9yBqy80p1RwNShaJ9" alt=""><figcaption></figcaption></figure>

6\. เลือก security group

<figure><img src="/files/bxSa9nwGvPDW8rD2vsc3" alt=""><figcaption></figcaption></figure>

7\. สร้าง instance คลิก LAUNCH

<figure><img src="/files/wwb33t86JJdFipTwM9AB" alt=""><figcaption></figcaption></figure>

8\. ระหว่างสร้าง instance จะปรากฏสถานะ ดังภาพ

<figure><img src="/files/H16zdnp7b0i86nGxMhRi" alt=""><figcaption></figcaption></figure>

9\. เมื่อสร้างเสร็จแล้ว ให้คลิกที่ชื่อ instance

<figure><img src="/files/oL4qwYSAtGZjj2EtuuTE" alt=""><figcaption></figcaption></figure>

10\. คลิก CONSOLE

<figure><img src="/files/Q4NdjaP9T3AdEZStF7AB" alt=""><figcaption></figcaption></figure>

11\. Migrate Windows VM ได้สำเร็จ&#x20;

<figure><img src="/files/BZsU7ZLOh0Eo4JgpjMQC" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-epc.gitbook.io/ncs-documents/migration/migrating-windows-vm-from-vsphere-to-ncs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
