From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3B5531FF16B for ; Tue, 1 Jul 2025 12:04:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9992F3AE2F; Tue, 1 Jul 2025 12:05:06 +0200 (CEST) Message-ID: Date: Tue, 1 Jul 2025 12:05:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion References: <20250627155737.162083-1-f.ebner@proxmox.com> <20250627155737.162083-19-f.ebner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL -0.179 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH qemu-server 18/31] blockdev: add change_medium() helper X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 30.06.25 um 16:42 schrieb DERUMIER, Alexandre via pve-devel: >>> After a cloudinit regenerate, or if I swap a cdrom image to a new >>> cdrom >>> image, >>> >>> the old format && file blockdev are not removed, and the new >>> blockdevs >>> have autogenerated nodenames I cannot reproduce this here, could you share the exact commands and machine configuration? For medium change: > [I] root@pve9a1 ~# qm create 500 --ide0 sani:iso/virtio-win-0.1.271.iso,media=cdrom > [I] root@pve9a1 ~# qm start 500 > [I] root@pve9a1 ~# echo '{"execute": "qmp_capabilities"}{"execute": "query-named-block-nodes"}' | socat - /var/run/qemu-server/500.qmp | jq | grep \"node-name > "node-name": "drive-ide0", > "node-name": "f549bd09aa572d2ae134301979d01b3", > "node-name": "e549bd09aa572d2ae134301979d01b3", > [I] root@pve9a1 ~# qm set 500 --ide0 sani:iso/virtio-win-0.1.266.iso,media=cdrom > update VM 500: -ide0 sani:iso/virtio-win-0.1.266.iso,media=cdrom > [I] root@pve9a1 ~# echo '{"execute": "qmp_capabilities"}{"execute": "query-named-block-nodes"}' | socat - /var/run/qemu-server/500.qmp | jq | grep \"node-name > "node-name": "drive-ide0", > "node-name": "ffb79807a199dd8817137fa5e247d9d", > "node-name": "efb79807a199dd8817137fa5e247d9d", For cloudinit regenerate: > [I] root@pve9a1 ~# qm create 500 --ide0 dir:cloudinit > Formatting '/mnt/pve/dir/images/500/vm-500-cloudinit.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=4194304 lazy_refcounts=off refcount_bits=16 > ide0: successfully created disk 'dir:500/vm-500-cloudinit.qcow2,media=cdrom' > [I] root@pve9a1 ~# qm start 500 > Use of uninitialized value in split at /usr/share/perl5/PVE/QemuServer/Cloudinit.pm line 115. > generating cloud-init ISO > [I] root@pve9a1 ~# echo '{"execute": "qmp_capabilities"}{"execute": "query-named-block-nodes"}' | socat - /var/run/qemu-server/500.qmp | jq | grep \"node-name > "node-name": "drive-ide0", > "node-name": "fc72045ad74e7732964db954986226f", > "node-name": "ec72045ad74e7732964db954986226f", > [I] root@pve9a1 ~# qm set 500 --ciuser foobar > update VM 500: -ciuser foobar > [I] root@pve9a1 ~# pvesh create /nodes/pve9a1/qemu/500/cloudinit > No 'create' handler defined for '/nodes/pve9a1/qemu/500/cloudinit' > [I] root@pve9a1 ~ [1]# pvesh set /nodes/pve9a1/qemu/500/cloudinit > Use of uninitialized value in split at /usr/share/perl5/PVE/QemuServer/Cloudinit.pm line 115. > generating cloud-init ISO > [I] root@pve9a1 ~# echo '{"execute": "qmp_capabilities"}{"execute": "query-named-block-nodes"}' | socat - /var/run/qemu-server/500.qmp | jq | grep \"node-name > "node-name": "drive-ide0", > "node-name": "fc72045ad74e7732964db954986226f", > "node-name": "ec72045ad74e7732964db954986226f", For me, it replaces and regenerates just fine. Is the issue somehow in combination with file=none like you reported in the other mail? > not sure if it's a qemu bug, but I think this is why I have use open- > tray, remove-medium, inser-medium, close-tray > > https://lists.proxmox.com/pipermail/pve-devel/2025-April/070595.html See the next patch, the blockdev_change_medium() helper is adapted from yours :) _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel