From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 888081FF15E for <inbox@lore.proxmox.com>; Tue, 8 Apr 2025 11:17:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 17DD0F53E; Tue, 8 Apr 2025 11:17:45 +0200 (CEST) Date: Tue, 8 Apr 2025 11:17:12 +0200 From: Wolfgang Bumiller <w.bumiller@proxmox.com> To: Daniel Herzig <d.herzig@proxmox.com> Message-ID: <rf464d4lpsr6gbpgcrv6233yq56r3fgjvxzfcv6seslqt7wk6h@kdp6jnu7sylc> References: <20250407150422.293994-1-d.herzig@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250407150422.293994-1-d.herzig@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.081 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [listvms.py, proxmox.com, broadcom.com] Subject: Re: [pve-devel] [PATCH esxi-import-tools] listvms: exclude VMs without datastore_name from manifest.json. X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Cc: pve-devel@lists.proxmox.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> On Mon, Apr 07, 2025 at 05:04:22PM +0200, Daniel Herzig wrote: > On newer ESXI-8.x.y versions, the diskless vCLS machines in an > ESXI-cluster are not stored on a datastore anymore. > > Instead, they are placed under `/var/run/crx` on the ESXI-hosts' > filesystem. This can lead to issues with the ESXI-storage not being > activated on the PVE-side [0]. > > This commit changes the default behaviour of `manifest.json` creation by > excluding any machine that has an empty datastore-string in its config > and by that prevents querying a file that we cannot reach anyway. > > [0] https://forum.proxmox.com/threads/new-import-wizard-available-for-migrating-vmware-esxi-based-virtual-machines.144023/post-759288 > > Signed-off-by: Daniel Herzig <d.herzig@proxmox.com> > --- > This acts silently for now, if we'd prefer logging exclusion > of these VMs, please drop an idea! > > listvms.py | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/listvms.py b/listvms.py > index a2fb2a5..7a4aa06 100755 > --- a/listvms.py > +++ b/listvms.py > @@ -265,6 +265,12 @@ def main(): > with connect_to_esxi_host(connection_args) as connection: > data = {} > for vm in list_vms(connection): > + # skip vms with empty datastore_name > + datastore_name, relative_vmx_path = parse_file_path( > + vm.config.files.vmPathName > + ) > + if not datastore_name: While this works as a stop-gap, I think we should use the example code here[1] to test if this is such an embedded(?) vCLS VM, and if it is *not* such a VM, print a warning to stderr that we're skipping this VM, so that in the future, if VMs magically disappear, we should see log messages about this. [1] https://knowledge.broadcom.com/external/article/370219/script-identification-for-embedded-vcls.html > + continue > try: > fetch_and_update_vm_data(vm, data) > except Exception as err: > -- > 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel