diff --git a/content/post/incus-install.md b/content/post/incus-install.md index 4f73217..356f958 100644 --- a/content/post/incus-install.md +++ b/content/post/incus-install.md @@ -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 存储卷的名字 ``` -- 创建一个空的虚拟机,并设置系统盘大小和 boot 优先级 +- 创建一个空的虚拟机,并设置 cpu、内存和系统盘大小和 boot 优先级 ```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:虚拟机名字 + # limits.cpu=2:虚拟机占用 2 核 + # limits.memory:虚拟机占用 4G 内存 # root,size=6GiB:虚拟机中的系统盘设备名是 root,大小是 6G # pool1: 存储池 incus config device set vm1 root boot.priority=20 # boot.priority=20:boot 优先级,数字越大,优先级越高 + + # 修改虚拟机配置 + #incus config set vm1 limits.cpu=4 + #incus config edit vm1 ``` - 为虚拟机增加 iso 存储卷,并设置 boot 优先级