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

updating tizen-2.1 on test device
Server of VMWare virtual machines [closed]
Gwan dies every day and consume a lot of ressources
How to WaitForUpdates from VMs in a cluster?
Getting VMWare DataStore inventory data (inventory traversal)
Vmware Powecli Alarm trigger
powercli set-networkadapter object reference not set to an instance of an object
Race condition for USB devices with Multiple VMs
Automated Send Keys Failing When No RDP
Free VM with management API that runs on windows?
Access Internet from BB10 simulator
CPU ID in VMware environment
How do I run disconnect-viserver with no prompt in PowerCLI
PowerCLI to schedule VM Hardware update?
Interaction of host and guest virtual machine
Using RubyMine 5 with a Virtual Machine

Categories

HOME
ibm-bluemix
mockito
nullpointerexception
alfresco
xmpp
sqlite-net-extensions
twitter-bootstrap-4
installshield
ebean
wamp
convolution
iggrid
google-translate
adobe-analytics
node-pdfkit
row
nstableview
google-cloud-ml
moonmail
iolanguage
highlight.js
sms-gateway
lldb
telerik-reporting
hammerspoon
elasticsearch-ruby
webkitspeechrecognition
librato
yadcf
preg-match-all
data-manipulation
noraui
pim
mapbox-gl
mmenu
bytecode-manipulation
overlap
vxworks
starteam
streamreader
optix
hp-ux
mapzen
ncalc
password-encryption
mime
modelmapper
thin
segment
wptoolkit
worksheet
clean-architecture
darcs
forever
knockout-components
pearson
dynamics-sl
crosswalk-runtime
quartz-composer
migradoc
root-framework
angular-cache
gridpane
probability-density
multiple-regression
hill-climbing
captivenetwork
javax.sound.midi
cannon.js
simple-framework
wordml
iis-arr
cakephp-3.1
operator-precedence
android-nested-fragment
gulp-less
openexr
eol
uv-mapping
geos
dir
tidy
spring-io
back-stack
http-unit
mt
ticoredatasync
chrono
propagation
iphone-web-app
mozilla-prism
xsdobjectgen
filtered-index
nhibernate.search
compiler-specific
nintendo-ds
ti-dsp
avatar
simpletest
private-members
mdac
rtml
ajax-forms

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