[L] Collect VMs [N] Manage Network [M] Manage List [C] Convert [X] Exit [?] Help (default is "X"): C 19/05/2015 13:51:09 - [Info] --------------------------------------------- 19/05/2015 13:51:09 - [Info] Starting new batch of VMs 19/05/2015 13:51:09 - [Info] --------------------------------------------- 19/05/2015 13:51:09 - [Info] Logging events to C:\MAT4Shift\Logs\mat.log 19/05/2015 13:51:09 - [Info] Log Level = 7 19/05/2015 13:51:09 - [Info] Timer when Server is at Capacity = 60 19/05/2015 13:51:09 - [Info] Current Path = C:\mat4shift 19/05/2015 13:51:09 - [Info] XML Path = C:\mat4shift\Variable.xml 19/05/2015 13:51:09 - [Info] VMList = C:\mat4shift\VMlist.txt 19/05/2015 13:51:09 - [Info] PowerShell Version = 1.7.0 19/05/2015 13:51:09 - [Info] Localhost = PRDWMFS001 19/05/2015 13:51:09 - [Info] SQL Datasource = PRDWMFS001\SQLEXPRESS 19/05/2015 13:51:09 - [Info] SQL Catalog = MAT4SHIFT 19/05/2015 13:51:09 - [Info] Max Concurrent Conversions = 3 19/05/2015 13:51:09 - [Info] Checking DNS resolution 19/05/2015 13:51:09 - [Info] SELECT TOP 1 Count(*) FROM VMQueue WHERE [InUse] = 1 AND ConvertServer = 'PRDWMFS001' 19/05/2015 13:51:09 - [Info] (Capacity Check) 3 slot(s) available 19/05/2015 13:51:09 - [Info] Checking Global VM Queue for VMs that are unassigned 19/05/2015 13:51:09 - [Info] SELECT Count(*) FROM VMQueue WHERE [ReadytoConvert] = 1 AND ([ConvertServer] IS NULL) 19/05/2015 13:51:09 - [Info] Found 1 VMs ready for conversion 19/05/2015 13:51:09 - [Info] Getting next VM from database 19/05/2015 13:51:09 - [Info] SELECT TOP 1 [MoREF],[JobID],[VMName],[GuestVMCPUCount],[GuestVMMB],[GuestOS],[GuestVMID],[ VMwareToolsVerion],[DisplayName],[GuestVMHDProvisionedGB],[GuestVMHDUsedGB] FROM VMDetails_VIEW WHERE [ReadytoConvert] = 1 AND ([ConvertServer] IS NULL) AND [Status] = 0 ORDER by Position 19/05/2015 13:51:09 - [Info] Starting Conversion on cloneP2EWCNX00tohyperv 19/05/2015 13:51:09 - [Info] UPDATE VMQueue SET [StartTime] = '05/19/2015 13:51:09', [Inuse] = 1, [ConvertServer] = 'PRD WMFS001', [ReadytoConvert] = 0, [Position] = NULL, [Summary] = 'Connecting to Virtual Center' WHERE JobID = 2 19/05/2015 13:51:09 - [Info] Connecting to Virtual Center 19/05/2015 13:51:09 - [Info] vCenter Server pvmuvmw999.si3si.int is connected VERBOSE: 19/05/2015 13:51:09 Get-Datacenter Started execution VERBOSE: 19/05/2015 13:51:09 Get-Datacenter Finished execution VERBOSE: 19/05/2015 13:51:09 Get-VM Started execution VERBOSE: 19/05/2015 13:51:10 Get-VM Finished execution 19/05/2015 13:51:10 - [Info] Connecting to Data ONTAP VERBOSE: Trying HTTP/HTTPS VERBOSE: Connected to eden101.si3si.int using HTTPS VERBOSE: Setting value of global:CurrentNcController VERBOSE: Starting EMS logging 19/05/2015 13:52:23 - [Info] SELECT [Network], [MAC] FROM VMNics_PS WHERE [MoRef] = '155' 19/05/2015 13:52:23 - [Info] SELECT [VMSwitch],[VLAN] FROM VMNetworkMap_PS WHERE NetworkName = '252 - Tests' 19/05/2015 13:52:23 - [Info] UPDATE VMQueue SET [Summary] = 'Backing up source VMDK' WHERE JobID = 2 19/05/2015 13:52:23 - [Info] Backing source VMDKs for cloneP2EWCNX00tohyperv 19/05/2015 13:52:23 - [Info] Removing Old MAT Snapshot VERBOSE: 19/05/2015 13:52:33 New-Snapshot Started execution VERBOSE: 19/05/2015 13:52:33 New-Snapshot Finished execution VERBOSE: 19/05/2015 13:52:54 Get-Datacenter Started execution VERBOSE: 19/05/2015 13:52:54 Get-Datacenter Finished execution VERBOSE: 19/05/2015 13:52:54 Get-VM Started execution 19/05/2015 13:52:54 - [Info] UPDATE VMQueue SET [Completed] = 0, [Status] = 3, [EndTime] = '05/19/2015 13:52:54', [Summary] = 'Error Migrating VM' WHERE JobID = 2 19/05/2015 13:52:54 - [warning] Conversion cloneP2EWCNX00tohyperv failed: You cannot call a method on a null-valued expression..exception.Message 19/05/2015 13:52:54 - [Warning] Restoring source... 19/05/2015 13:52:54 - [Info] UPDATE VMQueue SET [Summary] = 'Restoring source VM' WHERE JobID = 2 19/05/2015 13:52:54 - [Info] Restoring source VMDKs for cloneP2EWCNX00tohyperv VERBOSE: 19/05/2015 13:52:54 Get-Datacenter Started execution VERBOSE: 19/05/2015 13:52:55 Get-Datacenter Finished execution VERBOSE: 19/05/2015 13:52:55 Get-VM Started execution VERBOSE: 19/05/2015 13:52:55 Get-VM Finished execution VERBOSE: 19/05/2015 13:52:55 Get-VM Started execution VERBOSE: 19/05/2015 13:52:55 Get-VM Finished execution VERBOSE: 19/05/2015 13:52:55 Stop-VM Started execution VERBOSE: 19/05/2015 13:52:55 Stop-VM Finished execution VERBOSE: 19/05/2015 13:53:02 Get-VM Started execution VERBOSE: 19/05/2015 13:53:02 Get-VM Finished execution You cannot call a method on a null-valued expression. At C:\mat4shift\ConvertVM-Functions.ps1:696 char:9 + $fileUNC = "{0}\{1}" -f $nfspath, $file.replace('/','\') + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\mat4shift\ConvertVM-Functions.ps1:697 char:9 + $backupUNC = $fileUNC.replace("-flat.vmdk","-matbck.vmdk") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Test-Path : Cannot bind argument to parameter 'Path' because it is null. At C:\mat4shift\ConvertVM-Functions.ps1:698 char:29 + if (Test-Path -Path $backupUNC) + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCom mand 19/05/2015 13:53:03 - [Info] SELECT TOP 1 [Status] FROM VMQueue WHERE JobID = 2 19/05/2015 13:53:56 - [Info] UPDATE VMQueue SET [PID]=2, [Summary] = 'Conversion Completed restoring VM Network Settings ' WHERE JobID = 2 19/05/2015 13:53:56 - [Info] Conversion Completed restoring guest VM Settings Run "Get-Job -ID 2" for more information 19/05/2015 13:53:56 - [Info] Checking Global list for more unassigned VMs 19/05/2015 13:53:56 - [Info] SELECT TOP 1 Count(*) FROM VMQueue WHERE [InUse] = 1 AND ConvertServer = 'PRDWMFS001' 19/05/2015 13:53:56 - [Info] (Capacity Check) 2 slot(s) available 19/05/2015 13:53:56 - [Info] Checking Global VM Queue for VMs that are unassigned 19/05/2015 13:53:56 - [Info] SELECT Count(*) FROM VMQueue WHERE [ReadytoConvert] = 1 AND ([ConvertServer] IS NULL) 19/05/2015 13:53:56 - [Info] Found 0 VMs ready for conversion 19/05/2015 13:53:56 - [Info] Done. There are no unassigned VMs marked as ReadyToConvert in the queue 19/05/2015 13:53:56 - [Info] ***** End of batch conversions ***** 19/05/2015 13:53:56 - [Info] SELECT TOP 1 Count(*) FROM VMQueue WHERE [InUse] = 1 AND ConvertServer = 'PRDWMFS001' 19/05/2015 13:53:56 - [Info] 1 Conversions are still running but this script will exit. 19/05/2015 13:53:56 - [Info] You can continue monitor using the Show-StatusLoop parameter. 19/05/2015 13:53:56 - [Info] converted 0 vms in 3 minutes. PS C:\Windows\system32>