The VirtualBox driver provides a read_state() method that you'd be better off using here than a straight execute() call.  Try this instead:
```
if ! read_state != :poweroff
```
I'll need to check whether this logic needs adding to the VMWare driver too.