Okay, I found out the solution myself.
I found the --state flag to the vmmigrate.pl script.
This is how I run the script
./vmmigrate.pl --server <ip-address> --username <name> --password <pass> --sourcehost <source-host> --targetdatastore <datastore> --targethost <target-host> --vmname <vm-name> --targetpool <pool-name> --state poweredOn
So specifying that the --state is poweredOn solved the problem for me.