> For the complete documentation index, see [llms.txt](https://docs.readyidc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.readyidc.com/gpu-as-a-service/linux/manage-vgpu.md).

# Manage vGPU

#### Prepare the system

* **OS:** Ubuntu24.04
* **GPU:** Nvidia RTX Pro 6000 blackwell Ada(96 GB)
* **Nvidia Driver**: 590.48.01
* **Cuda** **Toolkit:** 13.1
* **Docker**

#### VM Setting

1. ตรวจสอบว่า VM เห็น **GPU**

```
lspci | grep -i nvidia
```

> ต้องเห็น NVIDIA Corporation Device 2bb5 (RTX PRO 6000 Blackwell)

2. ตรวจสอบว่า **Nvidia driver** ทำงานได้

```
nvidia-smi
```

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

3. เปิด **MIG mode**

```
# เปิด persistence mode
nvidia-smi -i 0 -pm 1
# เปิด MIG mode
nvidia-smi -i 0 -mig 1
reboot
```

4. สร้าง **MIG Instance**

```
# สร้าง 4 instances x 1g.24gb (23GB VRAM ต่อตัว)
nvidia-smi mig -i 0 -cgi 1g.24gb,1g.24gb,1g.24gb,1g.24gb -C
# ตรวจสอบ
nvidia-smi mig -lgi
nvidia-smi -L
```

<figure><img src="/files/7qrKEAZHT7ttPkK9dO0x" alt=""><figcaption></figcaption></figure>

5. ตั้งค่า **MIG** ให้ **auto-start** หลัง reboot

```
cat > /etc/systemd/system/nvidia-mig-enable.service << 'EOF'
[Unit]
Description=Enable NVIDIA MIG mode
After=systemd-modules-load.service
[Service]
Type=oneshot
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/nvidia-smi -i 0 -pm 1
ExecStart=/usr/bin/nvidia-smi -i 0 -mig 1
ExecStart=/usr/bin/nvidia-smi mig -i 0 -cgi 1g.24gb,1g.24gb,1g.24gb,1g.24gb -C
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
```

```
systemctl daemon-reload
systemctl enable nvidia-mig-enable.service
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.readyidc.com/gpu-as-a-service/linux/manage-vgpu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
