You have to use the --live (VIR_DUMP_LIVE) flag to not pause the guest while dumping it.
The guest won't be paused again after specify the --live option, however, I doubt that if we have failed to dump the guest why still pause the guest if we didn't specify the --live option, this was a little unreasonable, can't we check that if the dump path didn't exsit then report the error and skip the virsh dump directly. thanks
It would be possible to achieve that in the code. As the situation is happening in a place where the guest would be paused in the success case, pausing it also if the file can't be created doesn't make much difference. There are other cases where the dump would fail and the guest would need to be paused eg. when the dump file is stored on a device that is full.