<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii">
<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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:SimSun;
        mso-fareast-language:ZH-CN;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Helen,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Make sure that VHD you are using is VHD and not VHDx.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">This is something that you will have to select during the creation of your vm to be used in glance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">I believe the default for 2012 is vhdx.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Peter J. Pouliot, CISSP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Senior SDET, OpenStack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Microsoft
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">New England Research & Development Center<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">One Memorial Drive,Cambridge, MA 02142<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><a href="mailto:PPOULIOT@microsoft.com"><span style="color:blue">PPOULIOT@microsoft.com</span></a> | Tel: +1(857) 453 6436<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> openstack-bounces+ppouliot=microsoft.com@lists.launchpad.net [mailto:openstack-bounces+ppouliot=microsoft.com@lists.launchpad.net]
<b>On Behalf Of </b>Helen<br>
<b>Sent:</b> Tuesday, October 23, 2012 11:46 PM<br>
<b>To:</b> openstack@lists.launchpad.net<br>
<b>Subject:</b> [Openstack] VM provisioning error on Hyper-V<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> I have issues trying to deploy instance in OpenStack using Hyper-V driver.<br>
Here is my environment information:<br>
Openstack controller node: installed on Compute Host A, using OpenStack Folsom RC1 code.<br>
Openstack compute node: Windows server 2012 with Hyper-V Role enabled installed on Compute Host B, with Nova-Compute Service installed using the installer here
<a href="http://www.cloudbase.it/openstack/openstack-compute-installer/">http://www.cloudbase.it/openstack/openstack-compute-installer/</a> for Folsom release.<br>
<br>
When I tried to launch an instance to the compute node, it failed in spawning, here is the error log found in nova-compute.log(detailed log information is attached):<br>
2012-10-19 18:57:06 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Creating difference disk: JobID=\\WIN<br>
-KSKERE5KU31\root\virtualization:Msvm_StorageJob.InstanceID="A34DF87A-EF9D-4007-B04F-C932D4E76399", Source=c:\Hyper-V\instances\_base\64d0ffeb-cc13-4c03-9c3b-56cbc132e482.vhd, Target=c:\Hyper-<br>
V\instances\instance-00000001\instance-00000001.vhd from (pid=7840) _cache_image C:\openstack-nova\nova\virt\hyperv\vmops.py:616<br>
2012-10-19 18:57:09 ERROR nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] cache image failed: This object does<br>
not support enumeration<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops Traceback (most recent call last):<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmops.py", line 133, in spawn<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops cow=FLAGS.use_cow_images)<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmops.py", line 618, in _cache_image<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops success = self._vmutils.check_job_status(job)<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmutils.py", line 69, in check_job_status<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops "%(ErrorDescription)s - %(ErrorCode)s") % job)<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 246, in __getitem__<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops raise TypeError("This object does not support enumeration")<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops TypeError: This object does not support enumeration<br>
2012-10-19 18:57:09 TRACE nova.virt.hyperv.vmops<br>
2012-10-19 18:57:09 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Got request to destroy vm instance-<br>
00000001 from (pid=7840) destroy C:\openstack-nova\nova\virt\hyperv\vmops.py:374<br>
2012-10-19 18:57:09 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Created VM instance-00000001... from<br>
(pid=7840) _create_vm C:\openstack-nova\nova\virt\hyperv\vmops.py:180<br>
2012-10-19 18:57:09 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Set memory for vm instance-00000001...<br>
from (pid=7840) _create_vm C:\openstack-nova\nova\virt\hyperv\vmops.py:197<br>
2012-10-19 18:57:09 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Set vcpus for vm instance-00000001...<br>
from (pid=7840) _create_vm C:\openstack-nova\nova\virt\hyperv\vmops.py:210<br>
2012-10-19 18:57:09 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] Creating disk for instance-00000001 by<br>
attaching disk file c:\Hyper-V\instances\instance-00000001\instance-00000001.vhd from (pid=7840) _create_disk C:\openstack-nova\nova\virt\hyperv\vmops.py:237<br>
2012-10-19 18:57:10 DEBUG nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] New disk drive path is
<a href="file:///\\WIN-">\\WIN-</a><br>
KSKERE5KU31\root\virtualization:Msvm_ResourceAllocationSettingData.InstanceID="Microsoft:CC6BAD8D-EC33-4F14-87FE-203C4547522C\\83F8638B-8DCA-4152-9EDA-2CA8B33039B4\\0\\0\\D" from (pid=7840)<br>
_create_disk C:\openstack-nova\nova\virt\hyperv\vmops.py:266<br>
2012-10-19 18:57:11 ERROR nova.virt.hyperv.vmops [req-2da7f0d5-7ba5-47cc-85ea-02a00ed6aa66 990dae0e5620447ea684809063ee27a4 d3e88c95b9d54ba4b8ec6c3c358559bc] spawn vm failed: This object does not<br>
support enumeration<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops Traceback (most recent call last):<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmops.py", line 142, in spawn<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops self._create_disk(instance['name'], vhdfile)<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmops.py", line 282, in _create_disk<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops vhddisk, vm)<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmutils.py", line 123, in add_virt_resource<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops success = self.check_job_status(job)<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops File "C:\openstack-nova\nova\virt\hyperv\vmutils.py", line 69, in check_job_status<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops "%(ErrorDescription)s - %(ErrorCode)s") % job)<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 246, in __getitem__<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops raise TypeError("This object does not support enumeration")<br>
2012-10-19 18:57:11 TRACE nova.virt.hyperv.vmops TypeError: This object does not support enumeration<br>
I debug the code and found that it failed at line 609-613 in virt\hyper-v\vmops.py.<br>
                 image_service = self._conn.query(<br>
                    "Select * from Msvm_ImageManagementService")[0]<br>
                (job, ret_val) = \<br>
                    image_service.CreateDifferencingVirtualHardDisk(<br>
                        Path=target, ParentPath=base)<br>
The WMI job state for this WMI operation is 10 (Exception). Then I tried to create Differencing VHD using WMI in Powershell on Windows Server 2012. Here is the script I used:<br>
$parentVhdFn = "c:\Hyper-V\instances\_base\64d0ffeb-cc13-4c03-9c3b-56cbc132e482.vhd"<br>
$newVhdFn = "c:\Hyper-V\instances\\instance-test.vhd"<br>
$ims = Get-WmiObject -computername "." -namespace "root\virtualization" -class "Msvm_ImageManagementService"<br>
$result=[WMI]$ims.CreateDifferencingVirtualHardDisk($newVhdFn, $parentVhdFn).Job<br>
The job also failed.<br>
Have anyone tried this? Could you help? Thank you very much.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
</body>
</html>