Join us for a virtual Nutanix User Group meeting with Jarian Gibson as he covers Nutanix Cloud Clusters (NC2) on Azure and AWS with Citrix. <\/span><\/p>

Jarian will take a deep dive into NC2 on Azure architecture and Citrix on NC2 on Azure\u00a0that helps you strengthen your business continuity and disaster recovery position. He\u2019ll also provide the latest updates for NC2 on AWS.<\/span><\/p>

Plus, we're\u00a0giving away a Nutanix suitcase to one lucky winner!\u00a0Opt-in when you register\u00a0to be entered to win.\u00a0<\/p>","author":{"id":113632,"url":"\/members\/karlie-beil-113632","name":"Karlie Beil","avatar":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/icon\/200x200\/1581aab3-bcf6-49f4-b2fb-3d11e8c010dc.png","userTitle":"Community Manager","rank":{"isBold":false,"isItalic":false,"isUnderline":false,"name":"Community Manager","color":"#0873ba"},"userLevel":4},"type":"Webinar","url":"https:\/\/next.nutanix.com\/events\/global-nug-nc2-on-azure-and-aws-with-citrix-151","image":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/f9693b5b-436b-427a-9b98-531b4040ff24_thumb.png","location":"","startsAt":1678298400,"endsAt":1678302000,"contentType":"event","attendees":[],"attendeeCount":0,"isLoggedInUserAttendee":false,"createdAt":"1675974969"},"phrases":{"Forum":{"{n} year|{n} years":"{n} year|{n} years","{n} month|{n} months":"{n} month|{n} months","{n} day|{n} days":"{n} day|{n} days","{n} hour|{n} hours":"{n} hour|{n} hours","{n} minute|{n} minutes":"{n} minute|{n} minutes","just":"just now","{plural} ago":"{plural} ago"}}}">

解决了

在特定容器中创建VM


徽章

你好,

我找不到如何指定应创建磁盘的哪个容器,

你能帮助我吗?
这是我的JSON。

{“ spec”:{
“名称”:“ test-api”,
“资源”: {
“ power_state”:“关闭”,
“ num_vcpus_per_socket”:1,
“ num_sockets”:1,
“ memory_size_mib”:8192,
“ disk_list”:[
{
“ device_properties”:{
“ disk_address”:{
“ device_index”:0,
“ adapter_type”:“ scsi”
},,
“ device_type”:“磁盘”
},,
“ disk_size_mib”:8192
},,
{
“ device_properties”:{
“ disk_address”:{
“ device_index”:0,
“ adapter_type”:“ IDE”
},,
“ device_type”:“ cdrom”
}
}
],,
“ nic_list”:[
{
“ nic_type”:“ normal_nic”,
“ is_connected”:true,
“ ip_endpoint_list”:[
{
“ ip_type”:“ DHCP”
}
],,
“ subnet_reference”:{
“ ank”:“子网”,
“名称”:“ VLAN-130”,
“ uuid”:“ 002E2B71-A8CA-4360-86E1-0934AA9035F5”
}
}
],,
“ Guest_tools”:{
“ nutanix_guest_tools”:{
“状态”:“启用”,
“ iso_mount_state”:“已安装”
}
}
},,
“ cluster_reference”:{
“ ank”:“群集”,
“名称”:“ aa01cluahv001”,
“ uuid”:“ 0005A425-7396-E383-451D-246E960FB6D0”
}
},,
“ api_version”:“ 3.1.0”,
“元数据”:{
“善良”:“ VM”
}
}

谢谢,

Cirvent

图标

最好的答案阿罗纳2020年11月5日,06:09

You have at least two places to look for the specs when it comes to APIs:<\/p>

Nutanix Dev portal (as UPX pointed out earlier)\u00a0 and<\/p>

Prism REST API Explorer (only PC has option to browse API v3)<\/p>

For example:<\/p>

Nutanix Dev portal:<\/p>

\"//www.jhbzcj.com/next/how-it-works-22/\"<\/figure>

\u00a0<\/p>

REST API Explorer:<\/p>

\"//www.jhbzcj.com/next/how-it-works-22/\"<\/figure>

\u00a0<\/p>","className":"post__content__best_answer"}">

查看原件

该主题已关闭以供评论

8个答复

UserLevel 2
徽章 +4

嗨,Cirvent,

不确定我是否理解您的问题,但是您应该能够通过CVM上的SSH轻松使用ACLI

acli vm.disk_create container = <容器 - 名称> create_size =

希望能帮助到你

徽章

你好 @upx

我的问题是,当我创建VM时,磁盘存储在错误的容器中。

UserLevel 2
徽章 +4

嗨,Upx,
我的问题是,当我创建VM时,磁盘存储在错误的容器中。

问候,

如果磁盘上没有数据,您可以简单地删除原始数据并在所需的容器上创建新的数据

否则,如果您在磁盘上有数据,则可以创建新的,以克隆旧的旧,但这次在右侧的容器上

徽章

不可能在正确的容器上使用磁盘创建VM?

UserLevel 2
徽章 +4

当然可以。

当您通过GUI向VM添加新磁盘时,您可以选择存储磁盘的容器。

或者您可以通过ACLI或API进行相同的操作

徽章

我在GUI中没有问题,只有通过API,我应该在JSON文件中添加什么来指示正确的容器?

UserLevel 2
徽章 +4

好的,通过API,现在很清楚。

您将在此处找到所有身体内容规格:https://www.nutanix.dev/reference/prism_central/v3/api/vms/postvms/或在这里https://www.nutanix.dev/reference/prism_element/v2/api/vms/post-vms-createvm/

希望能帮助到你

UserLevel 6
徽章 +5

在API方面,您至少有两个地方可以寻找规格:

Nutanix Dev Portal(UPX之前指出)和

Prism Rest API Explorer(只有PC可以选择浏览API V3)

例如:

Nutanix Dev Portal:

REST API Explorer:

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"}}}">
Baidu