all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH/RFC docs 3/3] cloud init: use 'import-from' disk syntax to avoid a step
Date: Thu, 29 Sep 2022 09:52:24 +0200	[thread overview]
Message-ID: <20220929075224.27891-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20220929075224.27891-1-f.ebner@proxmox.com>

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>
---

Not entirely sure about this one, because it does make the commands a
bit more involved.

 qm-cloud-init.adoc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/qm-cloud-init.adoc b/qm-cloud-init.adoc
index 618d0f7..b275d7a 100644
--- a/qm-cloud-init.adoc
+++ b/qm-cloud-init.adoc
@@ -62,14 +62,11 @@ image provided by Ubuntu at https://cloud-images.ubuntu.com.
 # download the image
 wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
 
-# create a new VM
-qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0
+# create a new VM with VirtIO SCSI controller
+qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
 
-# import the downloaded disk to local-lvm storage
-qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
-
-# 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
+# import the downloaded disk to the local-lvm storage, attaching it as a SCSI drive
+qm set 9000 --scsi0 local-lvm:0,import-from=/path/to/bionic-server-cloudimg-amd64.img
 ----
 
 NOTE: Ubuntu Cloud-Init images require the `virtio-scsi-pci`
-- 
2.30.2





  parent reply	other threads:[~2022-09-29  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  7:52 [pve-devel] [PATCH docs 1/3] cloud init: use 'order' variant for 'boot' property Fiona Ebner
2022-09-29  7:52 ` [pve-devel] [PATCH docs 2/3] cloud init: use expected disk number in example Fiona Ebner
2022-09-29  7:52 ` Fiona Ebner [this message]
2022-11-16 19:38 ` [pve-devel] applied-series: [PATCH docs 1/3] cloud init: use 'order' variant for 'boot' property Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220929075224.27891-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal