Hi Erwan,
I'm happy to read you. I try to write without bing translator. But i'm sure you can read a french man writing in english ;-))
What is your base O.S? win10?
My Winpe is actually based on a Winpe ADK for 20H2. In hyperV ( into this winpe host), i launch a same winpe version in a VM (i don't get other os).
Yes, i use intensively Procmon.exe, windbg.exe since many years. And it's not easy to get a first "handler" to get the "one" who initiates the vmswtich destroy.
I play also with WindowsSandBox (WSL2 more later) FOD. With Sandbox, i get the same issue with vmswitch.
...a package or how to later on
Actually, adding a FOD ( Feature On Deman with OptionalFeatures.exe) is not too complex.
But there is no futur for this feature itself and also for the creating method.
I use a VHD ( files and keys persistence ( as i described in an other place about FullFlat )
As i said, it needs a long wait to create a Winbuilder script ( i can't and i prefer my horrible PS script ).
Only for people who want to challenge with winpe and want to research the origine of the issue, i can put my VHD in a share ( ask me in a PM, and i'll be happy).
For the fun...
next challenge would be to run the MS cluster service in WinPE
If one day if i understand the concept but i can't without a french documentation. You know that my english is not good.
Have a good day.