Skip to content

Commit

Permalink
migration: Fix no xml file issue
Browse files Browse the repository at this point in the history
To fix following issue:
  error: Failed to open file '/tmp/xml_utils_temp_q7dt66ez.xml':
No such file or directory'

Signed-off-by: cliping <[email protected]>
  • Loading branch information
cliping committed Jul 4, 2023
1 parent 94fd119 commit d7c21e9
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import os
import shutil

from avocado.core import data_dir

from virttest import libvirt_version
from virttest import virsh

Expand Down Expand Up @@ -42,7 +47,9 @@ def setup_xml():
migration_obj.setup_connection()
tmp_xml = vm_xml.VMXML.new_from_dumpxml(vm_name, "--security-info --migratable")
tmp_xml.title = update_xml_title
extra = "%s --xml=%s" % (extra, tmp_xml.xml)
new_xml = os.path.join(data_dir.get_tmp_dir(), "migration_xml_option_test.xml")
shutil.copyfile(tmp_xml.xml, new_xml)
extra = "%s --xml=%s" % (extra, new_xml)
params.update({"virsh_migrate_extra": extra})

def verify_test():
Expand Down

0 comments on commit d7c21e9

Please sign in to comment.