set_agent_channel and new_from_dumpxml both are staticmethod in vm_xml.
So, there is no need to create a virt_xml_obj to call them. Just using vm_xml.VMXML.set_agent_channel and vm_xml.VMXML.new_from_dumpxml will make the code more clear.