vmware


Unable to create a VM in Terraform


Terraform says vm 'test' not found while trying to create a virtual machine in VMware
This is my configuration:
provider "vsphere" {
allow_unverified_ssl = true
}
# Create a virtual machine within the folder
resource "vsphere_virtual_machine" "web" {
name = "test"
vcpu = 2
memory = 4096
network_interface {
label = "test"
}
disk {
template = "templates/slave-test2"
}
}
And this is the result of the terraform run:
# terraform apply
vsphere_virtual_machine.web: Creating...
detach_unknown_disks_on_delete: "" => "false"
disk.#: "" => "1"
disk.4244515509.bootable: "" => ""
disk.4244515509.controller_type: "" => "scsi"
disk.4244515509.datastore: "" => ""
disk.4244515509.iops: "" => ""
disk.4244515509.keep_on_remove: "" => ""
disk.4244515509.key: "" => "<computed>"
disk.4244515509.name: "" => ""
disk.4244515509.size: "" => ""
disk.4244515509.template: "" => "templates/slave-test2"
disk.4244515509.type: "" => "eager_zeroed"
disk.4244515509.uuid: "" => "<computed>"
disk.4244515509.vmdk: "" => ""
domain: "" => "vsphere.local"
enable_disk_uuid: "" => "false"
linked_clone: "" => "false"
memory: "" => "4096"
memory_reservation: "" => "0"
name: "" => "test"
network_interface.#: "" => "1"
network_interface.0.ip_address: "" => "<computed>"
network_interface.0.ipv4_address: "" => "<computed>"
network_interface.0.ipv4_gateway: "" => "<computed>"
network_interface.0.ipv4_prefix_length: "" => "<computed>"
network_interface.0.ipv6_address: "" => "<computed>"
network_interface.0.ipv6_gateway: "" => "<computed>"
network_interface.0.ipv6_prefix_length: "" => "<computed>"
network_interface.0.label: "" => "test"
network_interface.0.mac_address: "" => "<computed>"
network_interface.0.subnet_mask: "" => "<computed>"
skip_customization: "" => "false"
time_zone: "" => "Etc/UTC"
uuid: "" => "<computed>"
vcpu: "" => "2"
Error applying plan:
1 error(s) occurred:
* vsphere_virtual_machine.web: vm 'test' not found
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
I was expecting Terraform to create a new virtual machine, not give me the error:
* vsphere_virtual_machine.web: vm 'test' not found
My idea was to create a VM called 'test'... as per the example in https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html.

Related Links

not able to rename computer at windows OS level using Invoke-VMScript command
vmware disk activity (read) never stop, after start read file inside Virtual Machine(ubuntu)
Unable to create a VM in Terraform
Deployment ESXi VM Machine in Google Cloud Platform without migration
Do I need to install VMWare drivers to create a VMWare image using packe vmware-isor?
How to clone a VM when working with vSAN insead of local disks
How to install mac OS X EICapitan on windows 10
vmware esxi 5.5 iscsi gpt repair
VMware Fusion multiple static IPs
I need to create to Redundant VMs (both on 2 different datastores) via function
Attribute error while using vim.VimVsanReconfigSpec in pyvmomi
vmware not open .vmdk file mac os x
Multiple variable declarations [closed]
Is possible automated login Guest OS by powercli api 6.5?
How to auto sync html folder from vmware - ubuntu 16.04 LTS to windows folder
how to migrate esxi vmware(windows vm's) to macmini vmfusion

Categories

HOME
multithreading
osgi
view
hp-exstream
cakephp-2.5
alpha
ios-charts
upload
iggrid
kentor-authservices
floating-action-button
row
static-libraries
try-catch
progressive-web-apps
pythonanywhere
code-review
contextmenu
django-cms
nas
physics-engine
mmap
icloud-api
phpfox
greendao
assistant
elasticsearch-net
libssl
gsoap
r-raster
yadcf
semantic-versioning
oracle-fusion-middleware
http-get
fog
serverside-rendering
hue
optix
ruby-on-rails-3.1
reportingservices-2005
janrain
eigenvalue
turbogears
pango
qsslsocket
worksheet
typescript1.8
winscp-net
idisposable
svmlight
blacklist
pintos
grails-tomcat-plugin
clang-static-analyzer
nsviewcontroller
qcustomplot
superstack
ipconfig
netmq
rtbkit
ios8-today-widget
r-tree
endeca-workbench
security-testing
mmc
bigbluebutton
website-monitoring
dd
qpainter
flask-cors
mbr
jmapviewer
spring-validator
wsdl-2.0
clipper
free-variable
angularjs-controller
chuck
newtonscript
labwindows
netbeans-6.9
semantic-diff
subscript
xmemcached
calling-convention
infrastructure
gamma
mirah
vc90
exchange-server-2003
boost-smart-ptr
phonon
post-build

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App