時間:2023-06-30 01:06:01 | 來源:網(wǎng)站運營
時間:2023-06-30 01:06:01 來源:網(wǎng)站運營
Proxmox VE 使用 Cloud-Init 快速創(chuàng)建虛擬機:傳統(tǒng)的虛擬機管理方案中,如果要創(chuàng)建一臺新的虛擬機,通常需要手動在 EXSi 或 Proxmox VE(下文簡稱 PVE) 中手動創(chuàng)建一臺新的虛擬機,然后掛載用于安裝操作系統(tǒng)的 ISO 光盤鏡像,然后啟動虛擬機后還需要填寫各類信息,包括用戶名,密碼,磁盤分區(qū),網(wǎng)卡配置等等信息,然后再等待漫長的安裝過程后才能開始使用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 模版新建虛擬機的操作如下關(guān)鍵詞:創(chuàng)建,虛擬,使用
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。