Three nodes cluster with one node quorum

Hello,
I have a three nodes cluster but two nodes are on the same virt and one on another.
I need to set them like three masters and three data nodes. When I am updating the virt I need to shut down two of the cluster nodes and I lost quorum and opensearch stopped, how can I avoid that when discovery.zen.minimum_master_nodes is deprecated since es6 where I last worked.
thank you for help!

I’m not 100% sure this will work, but you might be able to remove the stopped nodes from the voting configuration by using the Voting Exclusions API.

I’m not sure if this will work because you need the cluster up in order to send those commands. Maybe you can exclude nodes from voting before shutting them down.