<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:DengXian;}
pre
{mso-style-priority:99;
mso-style-link:"HTML \9884\8BBE\683C\5F0F \5B57\7B26";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:SimSun;}
span.HTML
{mso-style-name:"HTML \9884\8BBE\683C\5F0F \5B57\7B26";
mso-style-priority:99;
mso-style-link:"HTML \9884\8BBE\683C\5F0F";
font-family:SimSun;}
.MsoChpDefault
{mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2007240264;
mso-list-type:hybrid;
mso-list-template-ids:-1202294276 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:30.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-text:"%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:54.0pt;
text-indent:-21.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:75.0pt;
text-indent:-21.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:96.0pt;
text-indent:-21.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-text:"%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:117.0pt;
text-indent:-21.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:138.0pt;
text-indent:-21.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:159.0pt;
text-indent:-21.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-text:"%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:180.0pt;
text-indent:-21.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:201.0pt;
text-indent:-21.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style>
</head>
<body lang="ZH-CN">
<div class="WordSection1">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:14.0pt;font-family:"Times New Roman",serif">1.<span style="color:black">Description of problem:<o:p></o:p></span></span></b></p>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> It report use migration with shmem device is not supported , when I use the command "virsh migrate --live" to migrate a VM to another host. <o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><b><span lang="EN-US" style="font-size:14.0pt;font-family:"Times New Roman",serif;color:black">2.Version-Release number of selected component (if applicable):<o:p></o:p></span></b></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> libvirt 3.9.0<o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> qemu-kvm 2.8.1<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><b><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></b></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><b><span lang="EN-US" style="font-size:14.0pt;font-family:"Times New Roman",serif;color:black">3.Steps to Reproduce:<o:p></o:p></span></b></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:30.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;background:white"><![if !supportLists]><span lang="EN-US" style="font-family:"Courier New";color:black"><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="font-family:"Courier New";color:black">Add serveral lines below to guest configuration<o:p></o:p></span></pre>
<div>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> <shmem name='my_shmem1'><o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> <model type='ivshmem-plain'/><o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> <size unit='M'>4</size><o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> </shmem><o:p></o:p></span></pre>
</div>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:30.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;background:white"><![if !supportLists]><span lang="EN-US" style="font-family:"Courier New";color:black"><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="font-family:"Courier New";color:black">virsh start guest-1<o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:30.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;background:white"><![if !supportLists]><span lang="EN-US" style="font-family:"Courier New";color:black"><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="font-family:"Courier New";color:black">virsh migrate --live guest-1 qemu+ssh://target/system<o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">Actual results:<o:p></o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> error: Requested operation is not valid: migration with shmem device is not supported<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><b><span lang="EN-US" style="font-size:14.0pt;font-family:"Times New Roman",serif;color:black">4.Code Review<o:p></o:p></span></b></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> When using the command “virsh create guset-1.xml,it produce corresponding command below.<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> “qemu-kvm -device ivshmem-plain, id=shmem0,memdev=shmmem-shmem0,bus=pci.0,addr=0xa”<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> <o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">I read qemu-doc.texi in qemu-2.8.1 source code, which have a explain of migrating ivshmem below <o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> “With device property @option{</span><span lang="EN-US" style="font-family:"Courier New";color:red">master=on</span><span lang="EN-US" style="font-family:"Courier New";color:black">}, the guest will copy the shared<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> memory on migration to the destination host. With @option{master=off},<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> the guest will not be able to migrate with the device attached.” <o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">But libvirt library can not recognize the property “master=on”. When I directly used command "qemu-kvm -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,</span><span lang="EN-US" style="font-family:"Courier New";color:red">master=on</span><span lang="EN-US" style="font-family:"Courier New";color:black">,bus=pci.0,addr=0xa” to launch a guest, it can migrate in live.<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> I review the code about qemu code with branch 2.8.1 and master from</span><span lang="EN-US" style="font-family:"Courier New";color:red"> https://github.com/libvirt/libvirt</span><span lang="EN-US" style="font-family:"Courier New";color:black">, it have no configuration definition for “master=on”<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> The below is the part of source code<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">domain_conf.h<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">struct _virDomainShmemDef {<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> char *name;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> unsigned long long size;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> int model; /* enum virDomainShmemModel */<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> struct {<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> bool enabled;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> virDomainChrSourceDef chr;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> } server;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> struct {<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> bool enabled;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> unsigned vectors;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> virTristateSwitch ioeventfd;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> } msi;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> virDomainDeviceInfo info;<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;text-indent:29.25pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black">};<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"> <o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:12.0pt;margin-right:12.0pt;margin-bottom:12.0pt;margin-left:0cm;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<pre style="margin:12.0pt;background:white"><span lang="EN-US" style="font-family:"Courier New";color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>