时间:2023-06-30 01:06:01 | 来源:网站运营
时间:2023-06-30 01:06:01 来源:网站运营
Proxmox VE 使用 Cloud-Init 快速创建虚拟机:传统的虚拟机管理方案中,如果要创建一台新的虚拟机,通常需要手动在 EXSi 或 Proxmox VE(下文简称 PVE) 中手动创建一台新的虚拟机,然后挂载用于安装操作系统的 ISO 光盘镜像,然后启动虚拟机后还需要填写各类信息,包括用户名,密码,磁盘分区,网卡配置等等信息,然后再等待漫长的安装过程后才能开始使用wget http://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.imgVM_ID=1000qm create $VM_ID --memory 2048 --name ubuntu-server-20-template --net0 virtio,bridge=vmbr0qm importdisk $VM_ID ubuntu-20.04-server-cloudimg-amd64-disk-kvm.img local-lvmqm set $VM_ID --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-$VM_ID-disk-0# The next step is to configure a CDROM drive which will be used to pass the Cloud-Init data to the VM.qm set $VM_ID --ide2 local-lvm:cloudinit# To be able to boot directly from the Cloud-Init image, set the bootdisk parameter to scsi0, and restrict BIOS to boot from disk only. This will speed up booting, because VM BIOS skips the testing for a bootable CDROM.qm set $VM_ID --boot c --bootdisk scsi0# Also configure a serial console and use it as a display. Many Cloud-Init images rely on this, as it is an requirement for OpenStack images.qm set $VM_ID --serial0 socket --vga serial0qm template $VM_ID
使用 PVE 模版新建虚拟机的操作如下关键词:创建,虚拟,使用