public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Lorenz Stechauner <l.stechauner@proxmox.com>
Subject: Re: [pve-devel] [PATCH v3 qemu-server 1/1] vm_start: check if storages of volumes support content images
Date: Mon, 21 Jun 2021 11:11:42 +0200	[thread overview]
Message-ID: <158f11d6-d8a7-c355-2d4f-3645a66f7ce3@proxmox.com> (raw)
In-Reply-To: <20210527122331.86302-3-l.stechauner@proxmox.com>

On 27.05.21 14:23, Lorenz Stechauner wrote:
> it is now necessary for storages to support the 'images' content in
> order to start vms on them. all native storage plugins already
> report the images content correctly.
> 
> Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
> ---
>  PVE/QemuServer.pm | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 0bfbca4..3b656a1 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5124,6 +5124,13 @@ sub vm_start_nolock {
>      my ($cmd, $vollist, $spice_port) = config_to_command($storecfg, $vmid,
>  	$conf, $defaults, $forcemachine, $forcecpu, $params->{'pbs-backing'});
>  
> +    for my $vol (@$vollist) {
> +	if (my ($storeid, $volname) = PVE::Storage::parse_volume_id($vol, 1)) {
> +	    my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
> +	    die "storage '$storeid' does not support vm disks\n" if !$scfg->{content}->{images};
> +	}
> +    }

we'd already loop overall volumes in cfg2cmd, so why not check there (with a small
helper method to avoid adding to much bloat there)?

Also, are you aware that efidisk and VM state images are included by this check 
ensured that it's consistent regarding the handling of those special "files" elsewhere?




  reply	other threads:[~2021-06-21  9:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 12:23 [pve-devel] [PATCH-SERIES v3 container/qemu-server] fix #3421: allow custom storage plugins to support rootfs Lorenz Stechauner
2021-05-27 12:23 ` [pve-devel] [PATCH v3 container 1/1] " Lorenz Stechauner
2021-06-21  8:52   ` [pve-devel] applied: " Thomas Lamprecht
2021-05-27 12:23 ` [pve-devel] [PATCH v3 qemu-server 1/1] vm_start: check if storages of volumes support content images Lorenz Stechauner
2021-06-21  9:11   ` Thomas Lamprecht [this message]
2021-06-02  7:29 ` [pve-devel] [PATCH-SERIES v3 container/qemu-server] fix #3421: allow custom storage plugins to support rootfs Fabian Ebner
2021-06-02 11:51   ` Fabian Ebner

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=158f11d6-d8a7-c355-2d4f-3645a66f7ce3@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.stechauner@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal