<div dir="ltr"><div>Much thanks, Wangpan, very helpful information.<br><br>I knew our "Windows 2008" image has Virtio disk and network interface driver installed, but didn't know about PCI driver. In fact, when I opened "device manager" window, I did see under "Other deivces", "PCI devices" is tagged with a yellow exclamation sysmbol. That seems to be the unrecognised "membaloon" device.<br>
<br></div>I will ask guys making Windows images and see if I could get some good news.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-27 10:21 GMT+08:00 Wangpan <span dir="ltr"><<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="LINE-HEIGHT:1.3;BORDER-RIGHT-WIDTH:0px;MARGIN:12px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px" marginheight="0" marginwidth="0">
<div><font color="#000000" face="宋体" size="3">I have see this same
error on my debian OS(2.6.X kernel) without acpiphp and pci_hotplug
modules,</font></div>
<div>after I insert these two modules, the re-attachment works ok.</div>
<div> </div>
<div>With Windows OS, do you have install the virtio drivers(pci and
disk)?</div>
<div>because in my windows 7 the re-attachment works ok, too.</div>
<div>I thought windows 2008 has the same kernel with windows 7 (may be).</div>
<div> </div>
<div align="left"><font color="#c0c0c0" face="Verdana">2014-02-27</font></div>
<div align="left"><font face="Verdana">
<hr style="WIDTH:122px;min-height:2px" align="left" size="2"><span class="HOEnZb"><font color="#888888">
</font></span></font></div><span class="HOEnZb"><font color="#888888">
<div align="left"><font color="#c0c0c0" face="Verdana"><span>Wangpan</span></font></div>
<div><font face="Verdana">
<hr>
</font></div>
<div><font face="Verdana"><strong>发件人:</strong>Zuo Changqian
<<a href="mailto:dummyhacker85@gmail.com" target="_blank">dummyhacker85@gmail.com</a>></font></div>
<div><font face="Verdana"><strong>发送时间:</strong>2014-02-27 09:53</font></div>
<div><font face="Verdana"><strong>主题:</strong>Re: [Openstack] [Nova] KVM
Windows Guest disk hot plugging support.</font></div>
<div><font face="Verdana"><strong>收件人:</strong>"Zhangleiqiang"<<a href="mailto:zhangleiqiang@huawei.com" target="_blank">zhangleiqiang@huawei.com</a>></font></div>
<div><font face="Verdana"><strong>抄送:</strong>"<a href="mailto:Openstack@lists.openstack.org" target="_blank">Openstack@lists.openstack.org</a>"<<a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a>></font></div>
</font></span><div><div class="h5">
<div><font face="Verdana"></font> </div>
<div><font face="Verdana">
<div dir="ltr">I have tried, it would still fail. <br><br>Also I got something new
this morning, If I first remove the device (attached disk) inside Windows 2008,
and then call detach-volume command, the reattching will succeed.<br><br>I think
this is not a problem of Libvirt of KVM (Linux guest works perfectly), but a
problem of Windows operating system. That's why I asked whether Windows itself
support this disk hot plug in-and-out feature or not, if it can, how.<br>
<div><br></div>
<div>The following "newdisk.img" has been formatted with as a NTFS disk, and
there is some data inside. "instance-0000000d" is a Windows 2008 instance (I
reboot it before every test).<br></div>
<div><br>------------------------------------------------------------<br>[root@nova02
temp]# ll<br>total 1048584<br>-rw-r--r-- 1 root root 1073741824 Feb 27 09:19
newdisk.img<br>-rw-r--r-- 1 root root
120 Feb 25 16:12 newdisk.xml<br><br>[root@nova02 temp]# cat newdisk.xml
<br><disk type='file' device='disk'><br> <source
file='/home/temp/newdisk.img'/><br> <target dev='vdb'
bus='virtio'/><br></disk><br>[root@nova02 temp]# virsh attach-device
instance-0000000d newdisk.xml <br>Device attached
successfully<br><br>[root@nova02 temp]# virsh detach-device instance-0000000d
newdisk.xml <br>Device detached successfully<br><br>[root@nova02 temp]# virsh
attach-device instance-0000000d newdisk.xml <br>error: Failed to attach device
from newdisk.xml<br>error: internal error unable to execute QEMU command
'__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk1' for
drive<br>-----------------------------------------------------------<br><br></div>
<div>I got same result with "virsh attach-disk"
command:<br><br>-----------------------------------------------------------<br>[root@nova02
temp]# virsh attach-disk instance-0000000d /home/temp/newdisk.img vdb<br>Disk
attached successfully<br><br>[root@nova02 temp]# virsh detach-disk
instance-0000000d vdb<br>Disk detached successfully<br><br>[root@nova02 temp]#
virsh attach-disk instance-0000000d /home/temp/newdisk.img vdb<br>error: Failed
to attach disk<br>error: internal error unable to execute QEMU command
'__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk1' for
drive<br>----------------------------------------------------------<br><br><br><br></div></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">2014-02-26 17:40 GMT+08:00 Zhangleiqiang <span dir="ltr"><<a href="mailto:zhangleiqiang@huawei.com" target="_blank">zhangleiqiang@huawei.com</a>></span>:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div vlink="purple" link="blue" lang="ZH-CN">
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d" lang="EN-US">Hi,
Changqian:<u></u><u></u></span></p>
<p style="TEXT-INDENT:21pt" class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d" lang="EN-US"><u></u><u></u></span> </p>
<p style="TEXT-INDENT:21pt" class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d" lang="EN-US">I think
it’s better to try using the corresponding detach command of libvirt (virsh
detach-disk or virsh detach-device) first, and see if the behavior is
expected. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:14pt" lang="EN-US"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US">----------<u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US">Leiqzhang<u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US">Best Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:10.5pt" lang="EN-US"><u></u><u></u></span> </p>
<div style="BORDER-BOTTOM:medium none;BORDER-LEFT:blue 1.5pt solid;PADDING-BOTTOM:0cm;PADDING-LEFT:4pt;PADDING-RIGHT:0cm;BORDER-TOP:medium none;BORDER-RIGHT:medium none;PADDING-TOP:0cm">
<div>
<div style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0cm;PADDING-LEFT:0cm;PADDING-RIGHT:0cm;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt" lang="EN-US">From:</span></b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt" lang="EN-US"> Zuo
Changqian [mailto:<a href="mailto:dummyhacker85@gmail.com" target="_blank">dummyhacker85@gmail.com</a>] <br><b>Sent:</b> Wednesday,
February 26, 2014 3:49 PM<br><b>To:</b> Gangur, Hrushikesh (R & D HP
Cloud)<br><b>Cc:</b> <a href="mailto:Openstack@lists.openstack.org" target="_blank">Openstack@lists.openstack.org</a><br><b>Subject:</b> Re:
[Openstack] [Nova] KVM Windows Guest disk hot plugging
support.<u></u><u></u></span></p></div></div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p>
<div>
<div>
<div>
<div>
<div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">By the way,
it's Havana release.<u></u><u></u></span></p></div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">We first found
this problem in Ubuntu 12.04 LTS guest, after loading "acpiphp" kernel module
at instance boot time, the problem solved.<u></u><u></u></span></p></div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">Then we tested
using CentOS 6.x guest, it seems the code of "acpiphp" module has been
integrated into Linux kernel at compilation time. Nothing needs to been done,
it just works very well. You can freely attach and detach volumes when
instance is running.<u></u><u></u></span></p></div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">But this does
not work for Windows guest, you can attach volumes, and you can detach, but it
seems still some information of disk remain in Windows guest, and you can not
attach a second time.<u></u><u></u></span></p></div>
<p class="MsoNormal"><span lang="EN-US">A reboot do cleanup those remained
infomation, and we know this. I am wondering if this attach/detach can be all
done when Windows guest is running, just like it is done in Linux
guest.<u></u><u></u></span></p>
<div>
<div>
<div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p></div></div></div></div>
<div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p>
<div>
<p class="MsoNormal"><span lang="EN-US">2014-02-26 15:07 GMT+08:00 Gangur,
Hrushikesh (R & D HP Cloud) <<a href="mailto:hrushikesh.gangur@hp.com" target="_blank">hrushikesh.gangur@hp.com</a>>:<u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt" lang="EN-US">I have seen this issue on Linux VMs too. A reboot of the VM
instance helps workaround this.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt" lang="EN-US"></span><span lang="EN-US"><u></u><u></u></span> </p>
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt" lang="EN-US">From:</span></b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt" lang="EN-US"> Zuo
Changqian [mailto:<a href="mailto:dummyhacker85@gmail.com" target="_blank">dummyhacker85@gmail.com</a>] <br><b>Sent:</b> Tuesday, February
25, 2014 10:34 PM<br><b>To:</b> <a href="mailto:Openstack@lists.openstack.org" target="_blank">Openstack@lists.openstack.org</a><br><b>Subject:</b> [Openstack]
[Nova] KVM Windows Guest disk hot plugging support.</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p>
<div>
<div>
<div>
<div>
<div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">Hi<br><br>Currently we use Cpeh RBD as cinder volume. According to
<a href="http://www.linux-kvm.org/page/Hotadd_pci_devices" target="_blank">http://www.linux-kvm.org/page/Hotadd_pci_devices</a>, we have
Linux KVM guest (both CentOS 6.x and Ubuntu 12.04) support disk hot plugging,
it works well.<u></u><u></u></span></p></div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">But there is
problem with Windows 2008 guest (2003 not tested). Described below:<br><br>1)
Launch an Windows 2008 instance (with RedHat Virtio Driver installed), and
attach a volume (newly created with nothing inside) to it, the volume would be
successfully attached to /dev/vdb.<u></u><u></u></span></p></div>
<p class="MsoNormal"><span lang="EN-US">2) In Windows (guest machine), format this
newly added disk. After formatting, it will show up in "My Computer" windows.
Create any file (readme.txt with some text in it for example) inside the new
disk. Then deatch the volume.<br><br>After about one or two minute, a message
box would show up in Windows, saying that the device not properly removed, and
the newly added disk would still show in "My Computer" window. But with
"cinder list" command, we can see that the volume was successfully
detached.<br><br>3) Now reattach to volume to instance, it would
failed.<u></u><u></u></span></p></div>
<p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p></div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">Libvirt log
shows: <u></u><u></u></span></p>
<div>
<div>
<div>
<div>
<p style="MARGIN-BOTTOM:12pt" class="MsoNormal"><span lang="EN-US">error :
qemuMonitorJSONCheckError:357 : internal error unable to execute QEMU command
'__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk1' for
drive<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span lang="EN-US">I googled yesterday afternoon, didn't find
useful information. Would any one tell me whether Windows 2003/2008 as kvm
fully virtualized guest supports disk hot plugging and removing or not? Or any
possibility I have got something wrong?<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>Thanks for
help!<u></u><u></u></span></p></div></div></div></div></div></div></div></div></div></div>
<p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span> </p></div></div></div></div></div></div></blockquote></div><br></div></font></div></div></div></div></blockquote></div><br></div>