您可以使用API的版本2进行此操作,但是您需要先收集有关VM的一些信息。
这将是将带有指定UUID的磁盘附加到SCSI.1接口上的薄条中的指定VM。
您可以以相同的方式将ISO添加到CDROM中,并且用于快照。
- 您必须拥有VM UUID,您可以从/prismgateway/services/rest/v2.0获得此功能/vms/ endpoint {{vm_uuid}}
- 您必须从endpoint/prismgateway/services/rest/v2.0/images/ endpoint {{vmdisk_uuid}}中使用图像服务中的磁盘的vmdisk_uuid。
/prismgateway/services/rest/v2.0/vms/{uuid}/disks/ntact
这是一个示例JSON主体,可以进行休息
代码:
{
“ uuid”:“ {{{vm_uuid}}”,
“ vm_disks”:[
{
“ disk_address”:{
“ device_bus”:“ scsi”,
“ device_index”:1,
“ vmdisk_uuid”:“ {{vmdisk_uuid}}”
},,
“ is_scsi_pass_through”:是的,
“ is_thin_provisioned”:true,
“ vm_disk_clone”:{
“ disk_address”:{
“ device_bus”:“ scsi”,
“ device_index”:1,
“ vmdisk_uuid”:“ {{vmdisk_uuid}}”
}
}
}
这是给予的
}
这将是将带有指定UUID的磁盘附加到SCSI.1接口上的薄条中的指定VM。
您可以以相同的方式将ISO添加到CDROM中,并且用于快照。
+1
您的意思是“ ...相同的快照”?
+1
奏效了。谢谢!
回复
Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">