From adb47bd169d1357bc7e09c7929fada832ceeca45 Mon Sep 17 00:00:00 2001 From: Sai Diliyaer Date: Mon, 16 Dec 2024 15:11:12 -0500 Subject: [PATCH] Fix CD-ROM backing ISO library item size check --- pkg/providers/vsphere/virtualmachine/cdrom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/providers/vsphere/virtualmachine/cdrom.go b/pkg/providers/vsphere/virtualmachine/cdrom.go index bd551d4b0..7177fc963 100644 --- a/pkg/providers/vsphere/virtualmachine/cdrom.go +++ b/pkg/providers/vsphere/virtualmachine/cdrom.go @@ -203,7 +203,7 @@ func getBackingFileNameByImageRef( // Subscribed content library item file may not always be stored in VC. // Sync the item to ensure the file is available for CD-ROM connection. - if syncFile && (!itemStatus.Cached || itemStatus.SizeInBytes.Size() == 0) { + if syncFile && (!itemStatus.Cached || itemStatus.SizeInBytes.IsZero()) { vmCtx.Logger.Info("Syncing content library item", "libItemUUID", libItemUUID) libItem, err := libManager.GetLibraryItem(vmCtx, libItemUUID) if err != nil {