VM wont start until after dataset is unlocked

I switched my dataset to passphrase so I can unlock it via script with a specific USB UUID key inserted. Everything works fine, except one of my VM will not start until the dataset is unlocked. I’ve got the unlock task happening POST INIT and I’m wondering if there’s a way to delay the starting of the VM?

Hey @Stux I think you’ve worked on something similar?

My “start_vm_after_host” script waits for the “wait_for_ssh” script to return, then calls the “start_vm” script.

This is run from post-init.

Same approach could be used.

Thank you @stux. I just figured out the issue. I had a CDROM device for VirtIO that was looking on my locked dataset for the ISO. I’ve mapped this to a new location off the dataset. It is odd that a VM would not start just because a CDROM device ISO can’t be accessed.