2016-05-25 12:21:16 +02:00
|
|
|
---
|
|
|
|
layout: "vsphere"
|
|
|
|
page_title: "VMware vSphere: vsphere_virtual_disk"
|
|
|
|
sidebar_current: "docs-vsphere-resource-virtual-disk"
|
|
|
|
description: |-
|
|
|
|
Provides a VMware virtual disk resource. This can be used to create and delete virtual disks.
|
|
|
|
---
|
|
|
|
|
|
|
|
# vsphere\_virtual\_disk
|
|
|
|
|
|
|
|
Provides a VMware virtual disk resource. This can be used to create and delete virtual disks.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-17 12:17:54 +02:00
|
|
|
```hcl
|
2016-05-25 12:21:16 +02:00
|
|
|
resource "vsphere_virtual_disk" "myDisk" {
|
2017-03-14 21:15:42 +01:00
|
|
|
size = 2
|
|
|
|
vmdk_path = "myDisk.vmdk"
|
|
|
|
datacenter = "Datacenter"
|
|
|
|
datastore = "local"
|
|
|
|
type = "thin"
|
|
|
|
adapter_type = "lsiLogic"
|
2016-05-25 12:21:16 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `size` - (Required) Size of the disk (in GB).
|
|
|
|
* `vmdk_path` - (Required) The path, including filename, of the virtual disk to be created. This should end with '.vmdk'.
|
2017-03-14 21:15:42 +01:00
|
|
|
* `type` - (Optional) 'eagerZeroedThick' (the default), 'lazy', or 'thin' are supported options.
|
|
|
|
* `adapter_type` - (Optional) set adapter type, 'ide' (the default), 'lsiLogic', or 'busLogic' are supported options.
|
2016-05-25 12:21:16 +02:00
|
|
|
* `datacenter` - (Optional) The name of a Datacenter in which to create the disk.
|
2017-03-14 21:15:42 +01:00
|
|
|
* `datastore` - (Required) The name of the Datastore in which to create the disk.
|