The code only waited until one or more IPv4 interfaces came online.
If you only had IPv6 interfaces attached to your machine, then the
machine creation process would completely stall.
* Enables copy of files within vSphere
* Can copy files between different datacenters and datastores
* Update can move uploaded or copied files between datacenters and datastores
* Preserves original functionality for backward compatibility
Govmomi tries to use the 7th slot in a scsi controller, which is not
allowed. This patch will appropriately select the slot to attach a disk
to as well as determine if a scsi controller is full.
The hasBootableFlag logic had a bug where it would only be set properly
if the bootable disk was the last specified. Adding some bool logic
resolves the issue. Also adding check to ensure only one bootable disk
is given, and cleaning up a redundant var.
This patch adds a wait when powering on a vm so setupVirtualMachine does
not return until the vm is actually powered on. This allows other
functions to work off the assumption that the current state of the vm
is not in flux. During resourceVSphereVirtualMachineRead(), the wait for
IP would cause a hang for any VM with no network interfaces or for vms
that had been powered off for any reason. This also means that the user
could not delete a vm with no network interfaces or that is powered off.
Checking power state before trying to check for network interfaces.
Resolves https://github.com/hashicorp/terraform/issues/7168
This allows the user to specify new controller types. Before when
specifying 'scsi', govmomi defaults to lsilogic-parallel. This patch
allows the user to now specify 'scsi-lsi-parallel', 'scsi-buslogic',
scsi-paravirtual', and 'scsi-lsi-sas'. Resolves issue
https://github.com/hashicorp/terraform/issues/7202
The PR that was merged to add `keep_on_destroy` was showing a green
build so was merged but that build happened before another merge adding
another parameter to the tests
FYI @dkalleg - fixes#7169
For both the file and virtual_disk resource, Stat is used during read,
but if Stat returns an error, read() will return that error. In doing
so, if a resource is deleted manually, the TF user would then not be
able to destroy the resource because the read would block the Delete()
call. With this patch, read() will only return an error if that error
is NOT a DatastoreNoSuchFileError.
`virtual_machine`
Fixes#7275 - a state migration was missed when `enable_disk_uuid` was
merged
```
make testacc TEST=./builtin/providers/vsphere
TESTARGS='-run=TestVSphereVirtualMachineMigrateState'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/vsphere -v
-run=TestVSphereVirtualMachineMigrateState -timeout 120m
=== RUN TestVSphereVirtualMachineMigrateState
--- PASS: TestVSphereVirtualMachineMigrateState (0.00s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/vsphere
0.018s
```
Since the custom_configuration_parameters can't take dots, we cannot
set 'disk.EnableUUID'. This adds a parameter for this options that gets
added to a configSpec. This option causes the vm to mount disks by uuid
on the guest OS.
* Adding debug functionality to log debug api calls
* adding debug and refactoring tests
* more tweaks with tests
* updating documentation
* more refactoring of tests
* working through factor for testing
* removing logging that displays username and password
* more work on getting tests stable
Changed schema type for disks to support dynamic non-ordered disk
swapping. All Disk attributes have been made non ForceNew since
any changes should be handled in the upgrade() function.
Added 'name' attribute to disks to act as a unique
identifier for when users request for new disks. It is also used as
the filename for the new disk. Templates are considered immutable.
IPv6 support added.
We support 1 IPv6 address per interface. It seems like the vSphere SDK supports more than one, since it's provided as a list.
I can change it to support more than one address. I decided to stick with one for now since that's how the configuration parameters
had been set up by other developers.
The global gateway configuration option has been removed. Instead the user should specify a gateway on NIC level (ipv4_gateway and ipv6_gateway).
For now, the global gateway will be used as a fallback for every NICs ipv4_gateway.
The global gateway configuration option has been marked as deprecated.
* added update function with support for vcpu and memory
* waiting for vmware tools redundant with WaitForIP
* proper error handling of PowerOn task
* added test cases for update memory and vcpu
* reboot flag
* Adding File Resource for vSphere provider
Allows for file upload to vSphere at specified location. This also
includes update for moving or renaming of file resources.
* Ensuring required parameters are provided
We were passing in a disk path of `[datastore] `, which the createDisk
call would create a file named `.vmdk` on the datastore, which is not
the expected behavior. This make sure that if the user did not pass in
a vmdk path, that we call CreateDisk with an empty string like it
expects.
User may specify a vmdk in their disk definition.
The options size, template, and vmdk are considered
to be mutually exclusive. User may also set whether each disk
associated with the vm should try to boot after creation.
Todo: Enforce mutual exclusivity, validate the bootable_vmdk_path