First, you have to enable the feature from /etc/libvirt/qemu.conf (or whatever configuration file you're using for qemu). Search for the line
#set_process_name = 1
and uncomment it (or make sure it is set to 1):set_process_name = 1
Then you should restart the libvirt daemon (or reboot your system).You can then simply give the additional following option:
$> qemu [options] -name vm_name,process="process_name"
to QEMU to set the name of the process to "process_name".If you omit to provide the process="process_name" option to qemu, the process's name will be set to qemu:vm_name. You have to know that the name of a process can only be 15 characters long, so with this method you've already lost 5 characters. The rest of the name will be truncated.
$> top
or$> pgrep -l process_name
Follow @mogeb88