I am using VirtualBox 6.1.36 in macOS 12.6.3 Monterey. My laptop is specifically a “MacBook (Retina, 12-inch, 2017)” with “1.3GHz Dual-Core Intel Core i5”.
I found that I could install Lion (using the official DMG download from Apple's site) without doing anything special. It was just a standard VM with none of the defaults changed. Likewise for Snow Leopard (using an installer disc image).
Leopard (using an installer disc image) was more difficult however. Within a few seconds of starting booting from the disc, it would experience a kernel panic in the “com.apple.driver.AppleIntelCPUPowerManagement” module.
I found a post somewhere on these forums that indicated the problem is the too new host CPU, and that you can fix it by modifying the VM's CPU profile, but the CPU in that post (some Core i7?) must have been too new, because their suggestion didn't work. I kept the idea in mind however.
Then I found viewtopic.php?t=99985. It seems that user was breaking the rules by using non-Apple hardware. However, I could see from their post that “Intel Core2 T7600 2.33GHz” might be a suitable CPU profile. So I tried using this command (”Leoparden” is the name of my VM):
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Leoparden --cpu-profile 'Intel Core2 T7600 2.33GHz'That was all that was necessary to get the installer to boot and work.
After installing, however, I had some trouble where it refused to boot from the hard drive, instead booting from the disc again. I think I got the NVRAM/EFI state into some weird place. I created a new VM with the same disk image and then it booted fine. I suspect this won't be necessary for others.
I hope this helps someone.