Bug 1295405

Summary: Unable to change target guest XML during migration
Product: [Community] Virtualization Tools Reporter: Michael Liu <ztehypervisor>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jtomko, rbalakri, yafu
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-05 14:08:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
dommigrate.c none

Description Michael Liu 2016-01-04 11:33:13 UTC
Description of problem:
Unable to change target guest XML during migration, the argument dxml in virDomainMigrateToURI2 is not used in libvirt 1.2.21

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

How reproducible:


Steps to Reproduce:
1.start the virtual machine
2.migrate the virtual machine with a new xml, the xml specifies the new config for the guest
3.

Actual results:
the config of guest keeps the original domain configuration

Expected results:


Additional info:

Comment 1 Ján Tomko 2016-01-05 12:47:11 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2016-January/msg00058.html

Comment 2 Ján Tomko 2016-01-05 14:08:14 UTC
Pushed as:
commit 488222800ee6bf3b4f86bcc1aff4b1e8c7526635
Author:     Ján Tomko <jtomko>
CommitDate: 2016-01-05 15:00:03 +0100

    libvirt-domain: fix dxml passing in virDomainMigrateToURI2
    
    The refactoring in commit a26669d silently ignored the dxml
    parameter of virDomainMigrateToURI2.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1295405

git describe: v1.3.0-164-g4882228

Comment 3 yafu 2016-03-03 08:28:27 UTC
Passed with libvirt-1.3.1-1.el7.x86_64.

steps:
1.Prepare p2p migration environment;

2.Start the guest on the source host;

3.Dump the guest xml:
  #virsh dumpxml rhel7.2 > rhel72.xml 

4.Add the following line in rhel72.xml:
  <title>test</title>

5.Compile the c program in the attachment:
  #gcc dommigrate.c -o dommigrate  -lvirt

6.Execute the program on the source host:
  #./dommigrate qemu+ssh:///system qemu+ssh://10.73.196.125/system rhel7.2 "`cat rhel72.xml`"

7.After the migration completed, check the guest xml on the target host and can see the line added in step 4:
  #virsh dumpxml rhel7.2
   ...
   <title>test</title>
   ...

Comment 4 yafu 2016-03-03 08:35:15 UTC
Created attachment 1132685 [details]
dommigrate.c