I want change my vm boot os to EFI and use secure boot but after change it my OS cannot boot . Also I checked it on different type of OS such as windows server 2019 , Linux 7 , Linux 8 and cannot boot OS . Is there any solution or we have to reinstall our OS with EFI and secure boot ?
No, the change from BIOS to EFI boot is a fundamental change for a OS, requiring the OS to be installed to support the method of boot. SecureBoot is a bit tricky to switch to, would definitely only do that on a new install.
But For windows is possible . Before change to UEFI we had to change partition to GPT and the OS will boot after this change but for Linux could not find any solution.