在自己的云服务中创建vm时出错

时间:2014-12-08 04:40:40

标签: azure virtual-machine

尝试在我们位于中南部和美国西部地区的中心使用rest api创建iaas vms。

vms在他们自己的云服务中。一次创建一个vm。

已经有3-4个小时,gui显示部署正在进行中。

来自操作ID的错误消息如下:

Failed409 ConflictEr ror Windows Azure目前正在对此进行操作 需要独占访问的部署。

奇怪的是,使用powershell或gui我可以成功创建vms。

其他信息: 我正在使用Create VM Deployment API。

创建虚拟机的工作流程为:

1)创建cloudservice

2)使用Create VM Deployment API在上述云服务中创建vm。我正在使用制作插槽。

我做了以下测试:

1)使用azure gui创建云服务 - 成功

2)使用curl命令创建vm。 curl的输出具有请求ID。运行另一个curl命令以获取在步骤1中创建的cloudservice中创建vm的状态。

3)获取操作状态的curl命令显示Inprogress几次,然后出现冲突错误。

4)此外,我检查了gui,它已经差不多30分钟,没有创建vm的迹象。 Cloud服务显示正在进行的部署"

C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" -H "Content-Type: application/xml" -X POST -d @makevm.xml https://m
anagement.core.windows.net/<subscriptionid>/services/hosteds
ervices/testvmcs/deployments
HTTP/1.1 100 Continue

HTTP/1.1 202 Accepted
Cache-Control: no-cache
Content-Length: 0
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: 997a9dadcac53e43a926b36481fc8f53
Date: Mon, 08 Dec 2014 01:47:47 GMT


C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" https://management.core.windows.net/04dc0d13-8d80-4781-b4b9-603708c
e871c/operations/997a9dadcac53e43a926b36481fc8f53
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 197
Content-Type: application/xml; charset=utf-8
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: 0a170e4e3f393e8aaadb8a82399d2ee3
Date: Mon, 08 Dec 2014 01:48:07 GMT

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www
.w3.org/2001/XMLSchema-instance"><ID>997a9dad-cac5-3e43-a926-b36481fc8f53</ID><S
tatus>InProgress</Status></Operation>
C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" https://management.core.windows.net/04dc0d13-8d80-4781-b4b9-603708c
e871c/operations/997a9dadcac53e43a926b36481fc8f53
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 197
Content-Type: application/xml; charset=utf-8
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: e78866b1e3c53bfc8d5313d4078f4f5f
Date: Mon, 08 Dec 2014 01:48:13 GMT

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www
.w3.org/2001/XMLSchema-instance"><ID>997a9dad-cac5-3e43-a926-b36481fc8f53</ID><S
tatus>InProgress</Status></Operation>
C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" https://management.core.windows.net/04dc0d13-8d80-4781-b4b9-603708c
e871c/operations/997a9dadcac53e43a926b36481fc8f53
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 390
Content-Type: application/xml; charset=utf-8
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: 8e552b9140ec34be90ab9c20e061d810
Date: Mon, 08 Dec 2014 01:49:45 GMT

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www
.w3.org/2001/XMLSchema-instance"><ID>997a9dad-cac5-3e43-a926-b36481fc8f53</ID><S
tatus>Failed</Status><HttpStatusCode>409</HttpStatusCode><Error><Code>ConflictEr
ror</Code><Message>Windows Azure is currently performing an operation on this de
ployment that requires exclusive access.</Message></Error></Operation>
C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" https://management.core.windows.net/04dc0d13-8d80-4781-b4b9-603708c
e871c/operations/997a9dadcac53e43a926b36481fc8f53
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 390
Content-Type: application/xml; charset=utf-8
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: 1efb6dc33c09374484f06550cb31661b
Date: Mon, 08 Dec 2014 01:50:03 GMT

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www
.w3.org/2001/XMLSchema-instance"><ID>997a9dad-cac5-3e43-a926-b36481fc8f53</ID><S
tatus>Failed</Status><HttpStatusCode>409</HttpStatusCode><Error><Code>ConflictEr
ror</Code><Message>Windows Azure is currently performing an operation on this de
ployment that requires exclusive access.</Message></Error></Operation>
C:\Users\gardam\preprodmgmtcert>curl -D - -E preprodazcert.pem -H "x-ms-version:
 2014-10-01" https://management.core.windows.net/04dc0d13-8d80-4781-b4b9-603708c
e871c/operations/997a9dadcac53e43a926b36481fc8f53
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 390
Content-Type: application/xml; charset=utf-8
Server: 1.0.6198.167 (rd_rdfe_stable.141203-1417) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
x-ms-request-id: 2d7a2cf3b043322083067519133d8e9d
Date: Mon, 08 Dec 2014 01:50:09 GMT

<Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www
.w3.org/2001/XMLSchema-instance"><ID>997a9dad-cac5-3e43-a926-b36481fc8f53</ID><S
tatus>Failed</Status><HttpStatusCode>409</HttpStatusCode><Error><Code>ConflictEr
ror</Code><Message>Windows Azure is currently performing an operation on this de
ployment that requires exclusive access.</Message></Error></Operation>

makevm.xml如下:

<?xml version="1.0"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Name>testmevm1</Name>
  <DeploymentSlot>Production</DeploymentSlot>
  <Label>dGVzdG1ldm0x</Label>
  <RoleList>
    <Role>
      <RoleName>testmevm1</RoleName>
      <RoleType>PersistentVMRole</RoleType>
      <ConfigurationSets>
  <ConfigurationSet i:type="LinuxProvisioningConfigurationSet">
    <ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType>
    <HostName>testmevm1</HostName>
    <UserName>devuser</UserName>
    <UserPassword>examplepassword</UserPassword>
    <DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication>
  </ConfigurationSet>
  <ConfigurationSet>
    <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
    <InputEndpoints>
      <InputEndpoint>
        <LocalPort>22</LocalPort>
        <Name>SSH</Name>
        <Port>2222</Port>
        <Protocol>TCP</Protocol>
      </InputEndpoint>
      <InputEndpoint>
        <LocalPort>80</LocalPort>
        <Name>TCP-PORT-8080</Name>
        <Port>8080</Port>
        <Protocol>TCP</Protocol>
      </InputEndpoint>
      <InputEndpoint>
        <LocalPort>3389</LocalPort>
        <Name>TCP-PORT-3390</Name>
        <Port>3390</Port>
        <Protocol>TCP</Protocol>
      </InputEndpoint>
    </InputEndpoints>
    <SubnetNames>
      <SubnetName>us1-int-nb-app</SubnetName>
    </SubnetNames>
  </ConfigurationSet>
</ConfigurationSets>
      <AvailabilitySetName>us1-int-nb-app-avset1</AvailabilitySetName>
      <OSVirtualHardDisk>
  <HostCaching>ReadWrite</HostCaching>
  <DiskLabel>testmevm1-osdisk</DiskLabel>
  <DiskName>testmevm1-osdisk</DiskName>
  <MediaLink>http://demostg5.blob.core.windows.net/osdisk/disk_2014_12_07_17_08.vhd</MediaLink>
  <OS>Linux</OS>
  <RemoteSourceImageLink>https://us1preprodall.blob.core.windows.net/images/central-baseimage-os-2014-11-24.vhd</RemoteSourceImageLink>
</OSVirtualHardDisk>
      <RoleSize>Small</RoleSize>
    </Role>
  </RoleList>
  <VirtualNetworkName>us1-int</VirtualNetworkName>
</Deployment>

我还向msdn azure论坛提交了我的qs,但没有任何线索/建议来帮助解决我面临的问题

有人可以帮忙吗?

问候

1 个答案:

答案 0 :(得分:1)

看起来你正在提供自己的形象。我相信图像和操作系统磁盘必须位于同一存储帐户中,这似乎不是这种情况。