mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-06-14 19:48:03 +00:00
cloud init: use 'import-from' disk syntax to avoid a step
Put the 'scsihw' part into the previous command, so that the rather complicated import command can stand on its own. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
593bdd7d58
commit
e33a118acc
@ -62,14 +62,11 @@ image provided by Ubuntu at https://cloud-images.ubuntu.com.
|
|||||||
# download the image
|
# download the image
|
||||||
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
|
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
|
||||||
|
|
||||||
# create a new VM
|
# create a new VM with VirtIO SCSI controller
|
||||||
qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0
|
qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
|
||||||
|
|
||||||
# import the downloaded disk to local-lvm storage
|
# import the downloaded disk to the local-lvm storage, attaching it as a SCSI drive
|
||||||
qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
|
qm set 9000 --scsi0 local-lvm:0,import-from=/path/to/bionic-server-cloudimg-amd64.img
|
||||||
|
|
||||||
# finally attach the new disk to the VM as scsi drive
|
|
||||||
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
|
|
||||||
----
|
----
|
||||||
|
|
||||||
NOTE: Ubuntu Cloud-Init images require the `virtio-scsi-pci`
|
NOTE: Ubuntu Cloud-Init images require the `virtio-scsi-pci`
|
||||||
|
Loading…
Reference in New Issue
Block a user