emmoon1981's Posts

hello everyone I have installed ESXi 6 on a host and after a time system power fault and server power off  and then I power on the server and start the VMs . one of my VM has failed to start a... See more...
hello everyone I have installed ESXi 6 on a host and after a time system power fault and server power off  and then I power on the server and start the VMs . one of my VM has failed to start and I  see this error: " Failed to start the virtual machine. Cannot open the disk 'VMname.vmdk' or one of the snapshot disks it depends on. The system cannot find the file specified VMware ESX cannot find the virtual disk "VMname.vmdk". Verify the path is valid and try again. Module Disk power on failed. Cannot open the disk 'VMname.vmdk' or one of the snapshot disks it depends on. The system cannot find the file specified VMware ESX cannot find the virtual disk "VMname.vmdk". Verify the path is valid and try again. " I check my datastore and there is no such this file "VMname.vmdk" instead there is "VMname.flat.vmdk" Is there any way to recover my VM ? Please help Thank you
   hello when I try to turn on a VM  on  ESXi5.5, I encounter with this virtual machine question "the redo log of Microsoft Windows Server 2012(64bit).vmdk is corrupted. if problem persists , di... See more...
   hello when I try to turn on a VM  on  ESXi5.5, I encounter with this virtual machine question "the redo log of Microsoft Windows Server 2012(64bit).vmdk is corrupted. if problem persists , discard the redo log" and I press OK and nothing happen and VM turned off .in addition  VM has no snap shot . Thanks
when I'm trying to upload an OVA  after Selecting the Storage  its failed and    the unhandled exception (Attached Error windows) Screen pops up and  close host client and in details show: Caus... See more...
when I'm trying to upload an OVA  after Selecting the Storage  its failed and    the unhandled exception (Attached Error windows) Screen pops up and  close host client and in details show: Cause: EncodingError Version: 2016.03.02 Build: 3617585 ESXi: 6.0.0 Is there anyone who knows how can I fix this issue ? Best Regard
Hi Mr LUCD Is there any chance ?
actually this script has strange behavior I try it in VMware online lab and see this error but for one hosts its ok but another host didn't change any things so I got confused . I see more than... See more...
actually this script has strange behavior I try it in VMware online lab and see this error but for one hosts its ok but another host didn't change any things so I got confused . I see more than one error plz check attached files .
so I got confused and just did what you told me and your script and try your script you mean there is no chance to figure out my problem ? what is wrong ?
I again  check  my VMs name files.txt    and  correct  the  duplicate Again  I try  your last  scrip And  see this  error PowerCLI C:\> $vihosts= Get-Content "c:\hosts.txt" Power... See more...
I again  check  my VMs name files.txt    and  correct  the  duplicate Again  I try  your last  scrip And  see this  error PowerCLI C:\> $vihosts= Get-Content "c:\hosts.txt" PowerCLI C:\> PowerCLI C:\> PowerCLI C:\> PowerCLI C:\> foreach ($singleViserver in $vihosts){ >> >>     Connect-VIServer $singleViserver -User root -Password mypass >> >> >> >>     # Read order from file (<hostname>.txt) >> >>     $order = 1 >> >>     $vmTab = @{} >> >>     Get-Content "C:\$($singleViserver).txt" | %{ >> >>         Write-Host "Looking at VM $($_), will have order# $($order)" >> >>         $vm = Get-VM -Name $_ -ErrorAction SilentlyContinue >> >>         if($vm){ >> >>             Write-Host "Found $($vm.Name)" >> >>             $vmTab.Add($vm.ExtensionData.MoRef,$order) >> >>             $order++ >> >>         } >> >>     } >> >> >> >>     $esx = Get-VMHost -Name $singleViserver >> >> >> >>     $autoMgr = Get-view $esx.ExtensionData.ConfigManager.AutoStartManager >> >> >> >>     $spec = New-Object VMware.Vim.HostAutoStartManagerConfig >> >>     $spec.Defaults = New-Object VMware.Vim.AutoStartDefaults >> >>     $spec.Defaults.enabled = $true >> >>     $spec.Defaults.startDelay = 30 >> >>     $spec.Defaults.stopAction = 'GuestShutdown' >> >>     $spec.Defaults.stopDelay = 30 >> >>     $spec.Defaults.waitForHeartbeat = 'yes' >> >> >> >>     $esx.ExtensionData.Vm | %{ >> >>         if($vmTab.ContainsKey($_)){ >> >>             $vmSpec = New-Object VMware.Vim.AutoStartPowerInfo >> >>             $vmSpec.Key = $_ >> >>             $vmSpec.startAction = 'powerON' >> >>             $vmSpec.startDelay = -1 >> >>             $vmSpec.startOrder = $vmTab[$_] >> >>             $vmSpec.stopAction = 'GuestShutdown' >> >>             $vmSpec.stopDelay = 30 >> >>             $vmSpec.waitForHeartbeat = 'yes' >> >> >> >>             $spec.powerInfo += $vmSpec >> >>         } >> >>     } >> >> >> >>     $autoMgr.ReconfigureAutostart($spec) >> >> >> >>     Disconnect-VIServer -Confirm:$False >> >> } >> Name                           Port  User ----                           ----  ---- esx1.shmalayer.org             443   root Looking at VM ShobAD2012.ShMalayer.org, will have order# 1 Found ShobAD2012.ShMalayer.org Looking at VM Shobdb.Shmalayer.org, will have order# 2 Found Shobdb.Shmalayer.org Looking at VM ShobDB2.ShMalayer.org, will have order# 3 Found ShobDB2.ShMalayer.org Looking at VM ShobAPP.ShMalayer.org, will have order# 4 Found ShobAPP.ShMalayer.org Looking at VM ShobFS.ShMalayer.org, will have order# 5 Found ShobFS.ShMalayer.org Looking at VM ShobTiba.ShMalayer.org, will have order# 6 Found ShobTiba.ShMalayer.org Looking at VM ShobWSUS.ShMalayer.org, will have order# 7 Found ShobWSUS.ShMalayer.org Looking at VM Firewall.ShMalayer.org, will have order# 8 Found Firewall.ShMalayer.org Exception calling "ReconfigureAutostart" with "1" argument(s): "A specified parameter was not correct: vim.host.AutoStartManager.AutoPowerInfo.startOrder" At line:37 char:5 +     $autoMgr.ReconfigureAutostart($spec) +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : VimException esx1.shlalajin.org             443   root Looking at VM ShobAD2012.ShLalajin.org, will have order# 1 Found ShobAD2012.ShLalajin.org Looking at VM ShobDB.ShLalajin.org, will have order# 2 Found ShobDB.ShLalajin.Org Looking at VM ShobDB2.ShLalajin.org, will have order# 3 Found ShobDB2.ShLalajin.org Looking at VM ShobAPP.ShLalajin.org, will have order# 4 Found ShobAPP.ShLalajin.org Looking at VM ShobTiba.ShLalajin.org, will have order# 5 Found ShobTiba.ShLalajin.org Looking at VM ShobWSUS.ShLalajin.org, will have order# 6 Found ShobWSUS.ShLalajin.org Looking at VM Firewall.ShLalajin.org, will have order# 7 Found Firewall.ShLalajin.org Exception calling "ReconfigureAutostart" with "1" argument(s): "A specified parameter was not correct: vim.host.AutoStartManager.AutoPowerInfo.startOrder" At line:37 char:5 +     $autoMgr.ReconfigureAutostart($spec) +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : VimException esx1.shnahavand.org            443   root Looking at VM shobAD2012.ShNahavand.org, will have order# 1 Found ShobAD2012.ShNahavand.org Looking at VM ShobDB.shNahavand.Org, will have order# 2 Found ShobDB.ShNahavand.Org Looking at VM ShobDB2.ShNahavand.Org, will have order# 3 Found ShobDB2.ShNahavand.Org Looking at VM Shobapp.ShNahavand.Org, will have order# 4 Found ShobAPP.ShNahavand.Org Looking at VM Shobtiba.ShNahavand.org, will have order# 5 Found ShobTiba.ShNahavand.org Looking at VM ShobwSuS.ShNahavand.org, will have order# 6 Found ShobWSUS.ShNahavand.org Looking at VM firewall.ShNahavand.Org, will have order# 7 Found Firewall.ShNahavand.Org Exception calling "ReconfigureAutostart" with "1" argument(s): "A specified parameter was not correct: vim.host.AutoStartManager.AutoPowerInfo.startOrder" At line:37 char:5 +     $autoMgr.ReconfigureAutostart($spec) +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : VimException esx1.edkolhamedan.org          443   root Looking at VM EDKolAD2012.EDHamedan.org, will have order# 1 Found EDKolAD2012.EDHamedan.org Looking at VM EDKolDb.EdHamedan.org, will have order# 2 Found EDKolDb.EdHamedan.org Looking at VM EDKolApp.EDHamedan.org, will have order# 3 Found EDKolApp.EDHamedan.org Looking at VM EDFS.EdKolHamedan.org, will have order# 4 Found EDFS.EdKolHamedan.org Looking at VM EDKolDB2.EDHamedan.org, will have order# 5 Found EDKolDB2.EDHamedan.org Looking at VM EDKolWSUS.EDHamedan.org, will have order# 6 Found EDKolWSUS.EDHamedan.org Looking at VM Firewall.EdHamedan.org, will have order# 7 Found Firewall.EdHamedan.org Looking at VM WHDB.EdKolHamedan.Org, will have order# 8 Found WHDB.EdKolHamedan.Org Exception calling "ReconfigureAutostart" with "1" argument(s): "A specified parameter was not correct: vim.host.AutoStartManager.AutoPowerInfo.startOrder" At line:37 char:5 +     $autoMgr.ReconfigureAutostart($spec) +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : VimException PowerCLI C:\> PowerCLI C:\>
Yes  and  nothings  changed :smileyconfused:
For  each  one of  those  files  such "esx1.edkolhamedan.org.txt" I see  that  erorr and  as  you  told me  about the  blank  line  in  myvm.txt   files  I  recreate  that  file  I  mean "esx1.e... See more...
For  each  one of  those  files  such "esx1.edkolhamedan.org.txt" I see  that  erorr and  as  you  told me  about the  blank  line  in  myvm.txt   files  I  recreate  that  file  I  mean "esx1.edkolhamedan.org" and check to be  without any  blank  lines so again  I  saw that error and  nothing  changed   I  mean  for  somethings  like  this  photo  I  attached
Hi   these are my File that attached . thanks for every things.
Yes   I  wil send for you  VMs file and check   again
Hi Mr Lucd    Beleive  me  my file is ok  and  no blank  at  the end of the VM names files Plz help me 
Did you see the last error log ? :smileyblush:
I try your last script and see the error in txt file attached. all vm names are true and I checked them but its just work for one of the hosts and it has  strange behavior
I try and see this error Name                           Port  User ----                           ----  ---- esx1.edkolhamedan.org          443   root Looking at VM EDKolAD2012.EDHamedan.... See more...
I try and see this error Name                           Port  User ----                           ----  ---- esx1.edkolhamedan.org          443   root Looking at VM EDKolAD2012.EDHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM EDKolDb.EdHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM EDKolApp.EDHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM EDFS.EdKolHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM EDKolDB2.EDHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM EDKolWSUS.EDHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM Firewall.EdHamedan.org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Looking at VM WHDB.EdKolHamedan.Org, will have order# 1 Get-VM : A positional parameter cannot be found that accepts argument '-'. At line:17 char:15 +         $vm = Get-VM - -Name $_ -ErrorAction SilentlyContinue +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [Get-VM], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM PowerCLI C:\>
I check the "Get-VM -Name shobad2012.host01.org it is somethings like this PowerCLI C:\> get-vm -name shobad2012.shabomosa.org Name                 PowerState Num CPUs MemoryGB ----   ... See more...
I check the "Get-VM -Name shobad2012.host01.org it is somethings like this PowerCLI C:\> get-vm -name shobad2012.shabomosa.org Name                 PowerState Num CPUs MemoryGB ----                 ---------- -------- -------- ShobAD2012.ShAbom... PoweredOn  4        4.000
Yes 'shobad2012.host01.org' is  a Displayname. I will check the "Get-VM -Name shobad2012.host01.org " cmdlet.
so I just try your script  and Didn't change anything . there is strange behavior !! as you told me I  Create hosts.txt and host01,host02,host03,...,hostn.txt like this and put all .txt files at... See more...
so I just try your script  and Didn't change anything . there is strange behavior !! as you told me I  Create hosts.txt and host01,host02,host03,...,hostn.txt like this and put all .txt files at the same directory "c:\" in my office host01 is esx1.edkolhamedan.org  and host02 is esx1.shabomosa.org and .. so I have hosts.txt and "esx1.edkolhamedan.org.txt" and "esx1.shabomosa.org.txt" and ... hosts.txt            host01.txt                                  host02.txt                                      host03.txt host01                shobad2012.host01.org          shobad2012.host02.org                shobad.host03.org host02                shobapp.host01.org                Shobapp.host02.org                      shobapp.host03.org host03                Shobdb.host01.org                  shobdb.host02.org                        shobdb.host03.org .                          . . . hostn
PowerCLI C:\> $spec | Format-Custom -Depth 3 class HostAutoStartManagerConfig {   Defaults =     class AutoStartDefaults     {       Enabled = True       StartDelay = 30       StopDelay =... See more...
PowerCLI C:\> $spec | Format-Custom -Depth 3 class HostAutoStartManagerConfig {   Defaults =     class AutoStartDefaults     {       Enabled = True       StartDelay = 30       StopDelay = 30       WaitForHeartbeat = True       StopAction = GuestShutdown     }   PowerInfo =     [       class AutoStartPowerInfo       {         Key =           class ManagedObjectReference           {             Type = VirtualMachine             Value = 10           }         StartOrder = 2         StartDelay = -1         WaitForHeartbeat = yes         StartAction = powerON         StopDelay = 30         StopAction = GuestShutdown         LinkedView =       }       class AutoStartPowerInfo       {         Key =           class ManagedObjectReference           {             Type = VirtualMachine             Value = 11           }         StartOrder = 7         StartDelay = -1         WaitForHeartbeat = yes         StartAction = powerON         StopDelay = 30         StopAction = GuestShutdown         LinkedView =       }       class AutoStartPowerInfo       {         Key =           class ManagedObjectReference           {             Type = VirtualMachine             Value = 12           }         StartOrder = 5         StartDelay = -1         WaitForHeartbeat = yes         StartAction = powerON         StopDelay = 30         StopAction = GuestShutdown         LinkedView =       }       class AutoStartPowerInfo       {         Key =           class ManagedObjectReference           {             Type = VirtualMachine             Value = 13           }         StartOrder = 1         StartDelay = -1         WaitForHeartbeat = yes         StartAction = powerON         StopDelay = 30         StopAction = GuestShutdown         LinkedView =       }       ...     ] } PowerCLI C:\>