You mentioned you've been using "global variables to track if [a VDB] was stopped or not". I just wanted to point out that using global variables is not a safe solution. The Python interpreter that we use to execute your Python code is stored in memory. It is not guaranteed that the same Python interpreter is used across plugin operations. The Python interpreter can get recreated due to many reasons like a Delphix Engine restart etc. Additionally, the same Python interpreter is used for executing all Delphix operations for given plugin which means that your plugin might end up writing to the same global variables from different threads. That might result in data races unless the access to global variables is synchronized.
If you want to determine if a VDB is running, it's always safer to run a bash script on the host where the VDB is running. It might be a little slower but certainly a safer solution.