创建虚拟机
自行创建群晖虚拟机(基本默认设置)
上传镜像
上传完后获得文件路径
/var/lib/vz/template/iso/rr_4GB.img/var/lib/vz/template/iso/rr_4GB.img/var/lib/vz/template/iso/rr_4GB.img
进入虚拟机配置文件
nano /etc/pve/qemu-server/101.confnano /etc/pve/qemu-server/101.confnano /etc/pve/qemu-server/101.conf
以上代码中101对应群晖虚拟机ID
代码中 /var/lib/vz/template/iso/rr_4GB.img 对应的是上传的路径
添加以下代码把群晖引导转换为虚拟U盘
代码:
args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'
或者运行命令直接输入到文件101.conf
echo "args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'">>/etc/pve/qemu-server/101.confecho "args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'">>/etc/pve/qemu-server/101.confecho "args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'">>/etc/pve/qemu-server/101.conf
然后启动虚拟机即可
以下是我自己修改好的虚拟机配置文件,仅供参考
boot: order=ide2;net0 cores: 4 cpu: host ide2: none,media=cdrom memory: 2048 meta: creation-qemu=8.1.2,ctime=1702061642 name: DSMSA6400 net0: virtio=DC:24:11:CE:A6:8D,bridge=vmbr0,firewall=1 numa: 0 ostype: l26 scsihw: virtio-scsi-single smbios1: uuid=8b8cecf1-48a6-4574-9667-82694c10d4ba sockets: 1 vmgenid: b00d6244-a6ca-4396-99af-d0eb0463e87 args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'boot: order=ide2;net0 cores: 4 cpu: host ide2: none,media=cdrom memory: 2048 meta: creation-qemu=8.1.2,ctime=1702061642 name: DSMSA6400 net0: virtio=DC:24:11:CE:A6:8D,bridge=vmbr0,firewall=1 numa: 0 ostype: l26 scsihw: virtio-scsi-single smbios1: uuid=8b8cecf1-48a6-4574-9667-82694c10d4ba sockets: 1 vmgenid: b00d6244-a6ca-4396-99af-d0eb0463e87 args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'boot: order=ide2;net0 cores: 4 cpu: host ide2: none,media=cdrom memory: 2048 meta: creation-qemu=8.1.2,ctime=1702061642 name: DSMSA6400 net0: virtio=DC:24:11:CE:A6:8D,bridge=vmbr0,firewall=1 numa: 0 ostype: l26 scsihw: virtio-scsi-single smbios1: uuid=8b8cecf1-48a6-4574-9667-82694c10d4ba sockets: 1 vmgenid: b00d6244-a6ca-4396-99af-d0eb0463e87 args: -device 'qemu-xhci,addr=0x18' -drive 'id=synoboot,file=/var/lib/vz/template/iso/rr_4GB.img,if=none,format=raw' -device 'usb-storage,id=synoboot,drive=synoboot,bootindex=1'
参考
https://post.smzdm.com/p/a2036n3n/
HelloZhing
pve上黑群晖,建议把引导img文件挂载为虚拟U盘,这样可以做到最完美的隐藏,并且不会影响系统更新和硬盘休眠。事实上现在dsm7引导默认vid和pid就是pve的虚拟U盘。非必要的情况下i440fx磁盘顺序上比q35方便很多。另外如果有条件建议直通sata控制器而不是做磁盘映射。
PVE 安装群晖转换img镜像引导_群辉pat转img-CSDN博客
原文链接:https://www.jianshu.com/p/85767b70a0cd
© 版权声明
声明📢本站内容均来自互联网,归原创作者所有,如有侵权必删除。
本站文章皆由CC-4.0协议发布,如无来源则为原创,转载请注明出处。
THE END