Bug 1437775 - MIGRATE_PARAM_PERSIST_XML doesn't take effect
Summary: MIGRATE_PARAM_PERSIST_XML doesn't take effect
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl-Sys-Virt
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-31 07:16 UTC by Dan Zheng
Modified: 2017-05-26 07:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-26 07:51:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
xml specified by Sys::Virt::Domain::MIGRATE_PARAM_PERSIST_XML (1.76 KB, text/plain)
2017-03-31 07:20 UTC, Dan Zheng
no flags Details

Description Dan Zheng 2017-03-31 07:16:56 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Prepare the perl script using below part:

  my $migflags = Sys::Virt::Domain::MIGRATE_LIVE |
                 Sys::Virt::Domain::MIGRATE_UNSAFE |
                 Sys::Virt::Domain::MIGRATE_PERSIST_DEST;

  my $persist_xml = "/tmp/persist_tck.xml";

  my %params = {Sys::Virt::Domain::MIGRATE_PARAM_PERSIST_XML=>$persist_xml};
  ok_domain(sub { $srcvm = $conn->define_domain($xml) }, "defined initial domain");
  lives_ok(sub { $srcvm->create() } , "started initial domain");

  lives_ok(sub { $srcvm->migrate($otherconn, \%params, $migflags); $failed = 0;}, "migrated domain");

  my $srcvm = $conn->get_domain_by_name("tck");
  ok(!$srcvm->is_active, "source VM is not still active");
  ok($srcvm->is_persistent, "source VM config still exists");
  lives_ok(sub { $dstvm = $otherconn->get_domain_by_name("tck")}, "target VM exists");
  ok($dstvm->is_active, "target VM is running");

Note: '/tmp/persist_tck.xml' has vcpu 4 configured which is different from vcpu 1 in the default xml.

2. Configure the NFS on both hosts and run the script
# libvirt-tck --testdir persist_xml_migration_new.t -v --force

ok 1 - defined initial domain
ok 2 - started initial domain
ok 3 - migrated domain
ok 4 - source VM is not still active
ok 5 - source VM config still exists
ok 6 - target VM exists
ok 7 - target VM is running

# Please destroy guest on target and check the xml is updated with specified xml.

3. When the guest running on target machine, execute dumpxml on target machine
# virsh dumpxml tck |grep vcpu -A3
<vcpu placement='static'>1</vcpu>
4. Destroy the guest on target host and the XML should be same as specified by /tmp/persist_tck.xml
# virsh destroy tck
# virsh dumpxml tck |grep vcpu -A3
<vcpu placement='static'>1</vcpu>             <==== This is wrong, should be 4


Actual results:
See above

Expected results:
The xml specified by MIGRATE_PARAM_PERSIST_XML should take effect

Additional info:

Comment 2 Dan Zheng 2017-03-31 07:20:51 UTC
Created attachment 1267762 [details]
xml specified by Sys::Virt::Domain::MIGRATE_PARAM_PERSIST_XML

Comment 3 Dan Zheng 2017-05-26 07:51:45 UTC
Script error. So close it.


Note You need to log in before you can comment on or make changes to this bug.