lorried82's Posts

can you advise what version you upgraded to? Thank you
vphere version 7.0.3.00700 VMware ESXi, 7.0.3, 19482537 We use content manager that has out ovf files and use a powershell script to clone our vms (these variables are passed in file a yml file) t... See more...
vphere version 7.0.3.00700 VMware ESXi, 7.0.3, 19482537 We use content manager that has out ovf files and use a powershell script to clone our vms (these variables are passed in file a yml file) the command for the new-vm is Get-ContentLibraryItem -Name $vmtemplate | ` New-VM ` -Name $vmname ` -ResourcePool $vmcluster ` -Location $folders[0] ` -Datastore $datastore ` -DiskStorageFormat $vmstorageformat ` -Confirm:$False we are seeing that if we build 25 servers at 1 time, we might see 2-6 servers fail with the below message, while all the others succeed  1mNew-VM: \n\u001b[96mLine |\n\u001b[96m 128 | \u001b[0m \u001b[96mNew-VM `\u001b[0m\n\u001b[96m | \u001b[91m ~~~~~~~~\n\u001b[91m\u001b[96m | \u001b[91m02/17/2023 15:57:56\tNew-VM\t\tcom.vmware.vapi.std.errors.invalid_argument {'messages': [com.vmware.vapi.std.localizable_message {'id': com.vmware.vdcs.util.unhandled_error, 'default_message': An error occurred: future must be done, 'args': [future must be done], 'params': , 'localized':}], 'data': , 'error_type': INVALID_ARGUMENT}\t\u001b[0m", "stderr_lines": ["\u001b[91mNew-VM: ", "\u001b[96mLine |", "\u001b[96m 128 | \u001b[0m \u001b[96mNew-VM `\u001b[0m", "\u001b[96m | \u001b[91m ~~~~~~~~", "\u001b[91m\u001b[96m | \u001b[91m02/17/2023 15:57:56\tNew-VM\t\tcom.vmware.vapi.std.errors.invalid_argument {'messages': [com.vmware.vapi.std.localizable_message {'id': com.vmware.vdcs.util.unhandled_error, 'default_message': An error occurred: future must be done, 'args': [future must be done], 'params': , 'localized':}], 'data': , 'error_type': INVALID_ARGUMENT} com.vmware.vdcs.util.unhandled_error, 'default_message': An error occurred: future must be done, 'args': [future must be done]
ok thanks LucD. So when I run that command it comes back as False. However, when I an provisioning servers to that DataStore Cluster, the VMDKs are being kept together. Do you have any thoughts o... See more...
ok thanks LucD. So when I run that command it comes back as False. However, when I an provisioning servers to that DataStore Cluster, the VMDKs are being kept together. Do you have any thoughts on what cold be happening of have any suggestions?
this looks great thank you - how would I first just check the setting to see what it is set to then run it after to confirm? Also LucD should we be setting the VM storage policy with every build... See more...
this looks great thank you - how would I first just check the setting to see what it is set to then run it after to confirm? Also LucD should we be setting the VM storage policy with every build? Or should this set it to no longer manage it at the VM level? Thanks so much.
I am trying to find out how I can set the default VM affinity rule for a DataStore Cluster to not keep VMDKs together. The version of vSphere is 6.0 When I look in the Web Client this setting is... See more...
I am trying to find out how I can set the default VM affinity rule for a DataStore Cluster to not keep VMDKs together. The version of vSphere is 6.0 When I look in the Web Client this setting is unchecked. When I am provisioning servers however, the VMDKs are being kept together. When I look in the fat client, I can see the newly provisioned servers have a check mark to keep the VMDKs together. The issue with this is I am not able to get multiple disks provisioned when the server is being built due to size constraints. All I can find if how to remediate servers that are already built, nothing about how this setting can be permanently changed. Any advice? Thanks
ah ok that makes sense. I update the txt to reflect that and now I am able to exclude both specific names as well as ones starting with a certain name. thanks so much
Thanks so much LucD. I am using a wildcard if I want to exclude datastores that start with a certain name, like snap* rather than have to maintain a full list I am getting an error with your cod... See more...
Thanks so much LucD. I am using a wildcard if I want to exclude datastores that start with a certain name, like snap* rather than have to maintain a full list I am getting an error with your code missing statement block after if ( condition ) - any thoughts on that?
Hi - Looking to do a query against all my datastores to find out what is at 90% used space but exclude a list of datastores from the output. I can't seem to get the content read in to exclude  my... See more...
Hi - Looking to do a query against all my datastores to find out what is at 90% used space but exclude a list of datastores from the output. I can't seem to get the content read in to exclude  my list and not sure what I am doing wrong. It seems like it should be a fairly easy script - any help is appreciated. ------------------------------------------------------------------------------ #powershell script to output the datastores that over over 90%used #add datastores to be excluded $exceptiondatastores = Get-Content C:\exceptiondatastores.txt <<this file contains a list of datastores as well as * at the end for wildcard Get-Datastore | Select Name, @{N='UsedPerc';E={($_.CapacityGB - $_.FreeSpaceGB)/$_.CapacityGB}} | where{$_.'UsedPerc' -ge 0.90  -and $_.Name -notmatch $exceptiondatastores} | Select Name -expandproperty Name |Sort-Object -Property Name | out-file  C:\diskusage90.txt Disconnect-VIServer -Server xxxx -Confirm:$false ------------------------------------------------------------------------------
yes the datastore name is reused since it is an NFS mount ok that makes sense thank you!
Yes to a vCenter. There are 30+ ESXi servers that are connected to the vCenter but now that you say that I think the issue is that the datastore is in 7 different dataCenters so maybe that is my... See more...
Yes to a vCenter. There are 30+ ESXi servers that are connected to the vCenter but now that you say that I think the issue is that the datastore is in 7 different dataCenters so maybe that is my issue? I need to add the -Location attribute would that make sense?
when I run that command I am just seeing the one server connection.
ok so I just ran the command again and let it run through and it did complete successfully one time out of 7 tires. so the issue must be the weirdness on why it returns 7 results - any thoughts o... See more...
ok so I just ran the command again and let it run through and it did complete successfully one time out of 7 tires. so the issue must be the weirdness on why it returns 7 results - any thoughts on that?
I should note when I do get-datastore -name datastore it does return it 7 times - is that odd?
yes - I was able to add it just fine but when I try and remove I get that error.
I am running the command below Remove-Datastore -Datastore datastore -VMHost host -Confirm:$False the error gets thrown Remove-Datastore A specified parameter was not correct - full erro... See more...
I am running the command below Remove-Datastore -Datastore datastore -VMHost host -Confirm:$False the error gets thrown Remove-Datastore A specified parameter was not correct - full error output attached (hostname has been blacked out) am I missing something obvious? Any help appreciated.
thanks so much!
ok thank you. So is there an easy way to know if there is enough space or what happens if a disk is chosen without enough space?
Thanks so much LucD - this works great. So it will only provision to a datastore that has enough space - right? I see all my disks are provisioned to the same datastore.
Ok thanks LucD. Is there a way to randomly pick a datastore?
so the issue with that is since I want to just use a datastore cluster - when I add -DiskFromatType it errors out that it is missing the required property datastore So basically I added belo... See more...
so the issue with that is since I want to just use a datastore cluster - when I add -DiskFromatType it errors out that it is missing the required property datastore So basically I added below - is there a way I can achieve this? {New-VM -Name $var.vmname -Template $var.template -ResourcePool $var.cluster -OSCustomizationSpec $var.spec -Description $var.notes -datastore $var.datastore -DiskStorageFormat 'thick'