KDDIクラウドプラットフォームサービス ナレッジサイト

  • HOME
  • 提供API一覧
  • createVMSnapshot

createVMSnapshot

処理概要

VMスナップショットの作成

 

注意事項

・deployValueVirtualMachine、deployPremiumVirtualMachineなどでインスタンスを作成した後にcreateVMSnapshotを実行する場合は、
必ずqueryExAsyncJobResultでJOBの実行結果を取得し、インスタンスのステータスが”Running”になっていることを確認してから実行してください。
ステータスが”Runnnig”になる前にcreateVMSnapshotを実施すると正常に処理されない場合があります。

・VMスナップショットは、取得後、24時間以内に必ず削除または切り戻しの実行をしてください。
24時間以内であっても、VMスナップショットを取得した後のデータ書き込みが多い場合、データが破損する恐れがあります。
また、VMスナップショットの削除または切り戻しをするまでは、ディスクの追加はできません。

 

リクエスト

・リクエストパラメータ

Parameter Name Description Required
virtualmachineid The ID of the vm true
name The display name of the snapshot false
quiescevm quiesce vm if true false

 

・リクエストサンプル

$ ./kick_api.sh command=createVMSnapshot virtualmachineid=85a02372-43da-4778-af44-bfb9e96ff532 name=testapi quiescevm=true

 

レスポンス

・レスポンスボディ

Response Name Description
id the ID of the vm snapshot
account the account associated with the disk volume
created the create date of the vm snapshot
current indiates if this is current snapshot
description the description of the vm snapshot
displayname the display name of the vm snapshot
domain the domain associated with the disk volume
domainid the ID of the domain associated with the disk volume
name the name of the vm snapshot
parent the parent ID of the vm snapshot
parentName the parent displayName of the vm snapshot
project the project name of the vpn
projectid the project id of the vpn
state the state of the vm snapshot
type VM Snapshot type
virtualmachineid the vm ID of the vm snapshot
zoneid the Zone ID of the vm snapshot

 

・レスポンスサンプル

【コマンド実行結果】

<?xml version=”1.0″ encoding=”UTF-8″?>
<createvmsnapshotresponse cloud-stack-version=”4.3.0.2″>
<id>761</id>
<jobid>6a15456a-0b92-4a70-aaca-b01f7b363bdb</jobid>
</createvmsnapshotresponse>

 
【queryAsyncJobResultでの確認結果】

<?xml version=”1.0″ encoding=”UTF-8″?>
<queryasyncjobresultresponse cloud-stack-version=”4.3.0.2″>
<accountid>d344caf5-24dc-4194-ac5f-2d78d5e38039</accountid>
<userid>0212ea46-0529-4250-9e3e-bcb03c114002</userid>
<cmd>org.apache.cloudstack.api.command.user.vmsnapshot.CreateVMSnapshotCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<vmsnapshot>
<id>1caa2744-6ea6-42c8-aa6b-38f2ef3c92ce</id>
<name>i-5-354563-VM_VS_20160925112348</name>
<state>Ready</state>
<displayname>testapi</displayname>
<virtualmachineid>85a02372-43da-4778-af44-bfb9e96ff532</virtualmachineid>
<current>true</current>
<type>Disk</type>
<created>2016-09-25T20:23:48+0900</created>
</vmsnapshot>
</jobresult>
<created>2016-09-25T20:23:48+0900</created>
<jobid>6a15456a-0b92-4a70-aaca-b01f7b363bdb</jobid>
</queryasyncjobresultresponse>

提供API一覧

2024/04/23 2024/04/23