This commit is contained in:
colben 2025-02-11 17:57:27 +08:00
parent 2a05e3e2f8
commit f46aff8c20

View File

@ -281,15 +281,21 @@ incus3 | eth0: 192.168.1.3 | 10.10.10.3 | Rocky9 | /dev/sdb | 10.10.10.3 incus
# rocky8-iso-volume创建的 iso 存储卷的名字 # rocky8-iso-volume创建的 iso 存储卷的名字
``` ```
- 创建一个空的虚拟机,并设置系统盘大小和 boot 优先级 - 创建一个空的虚拟机,并设置 cpu、内存和系统盘大小和 boot 优先级
```BASH ```BASH
incus create vm1 --empty --vm -d root,size=6GiB -s pool1 incus create vm1 --empty --vm -c limits.cpu=2 -c limits.memory=4GiB -d root,size=6GiB -s pool1
# vm1虚拟机名字 # vm1虚拟机名字
# limits.cpu=2虚拟机占用 2 核
# limits.memory虚拟机占用 4G 内存
# root,size=6GiB虚拟机中的系统盘设备名是 root大小是 6G # root,size=6GiB虚拟机中的系统盘设备名是 root大小是 6G
# pool1: 存储池 # pool1: 存储池
incus config device set vm1 root boot.priority=20 incus config device set vm1 root boot.priority=20
# boot.priority=20boot 优先级,数字越大,优先级越高 # boot.priority=20boot 优先级,数字越大,优先级越高
# 修改虚拟机配置
#incus config set vm1 limits.cpu=4
#incus config edit vm1
``` ```
- 为虚拟机增加 iso 存储卷,并设置 boot 优先级 - 为虚拟机增加 iso 存储卷,并设置 boot 优先级