A blog about new functionality, interesting things, problems (and solutions ;) ) I encounter with and about Microsoft products with a big interest in System Center Virtual Machine Manager and Hyper-V. All spiced up with a little bit of ADHD and here and there some fun stuff. Hope you enjoy it!
Don't wanna be here? Send us removal request.
Link
get-eventlog system -computer chi-hvr2.globomantics.local -EntryType error,warning -Newest 10 | out-gridview
get-eventlog system -computer chi-hvr2.globomantics.local -source *Hyper-V* -after "10/1/2013" | out-gridview
Get-EventLog -LogName Application -Source vmic* -Newest 50 -ComputerName chi-hvr2.globomantics.local
vmicheartbeat
vmickvpexchange
vmicrdv
vmicshutdown
vmictimesync
vmicvss
0 notes
Text
Live Migrate all VM's away from a host
Get-VM -ComputerName SOURCE_HOST | Move-VM -DestinationHost DEST_HOST -DestinationStoragePath DRIVE:\FOLDER
2 notes
·
View notes
Text
Best practices Hyper-V on Windows 2008 R2 Checklist
http://blogs.technet.com/b/askpfeplat/archive/2012/11/19/hyper-v-2008-r2-sp1-best-practices-in-easy-checklist-form.aspx
2 notes
·
View notes
Text
Installing multiple hotfixes
@echo off echo.
FOR %%F IN (%cd%\*.msu) DO ( echo Processing %%F... start /wait wusa %%F /quiet /norestart )
2 notes
·
View notes
Text
Remove/Install GUI from Windows 2012 (R2)
Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
2 notes
·
View notes
Text
Disable VMQ LSO ChecksumOffload RSS
Needed for Broadcom adapters on Windows 2012 (R2) and Hyper-V
$netname = (Get-NetAdapter).Name
Disable-NetAdapterVmq -Name $netname
Disable-NetAdapterLso -Name $netname
Disable-NetAdapterChecksumOffload -Name $netname
Disable-NetAdapterRss -Name $netname
Get-NetAdapterEncapsulatedPacketTaskOffload | Set-NetAdapterEncapsulatedPacketTaskOffload -EncapsulatedPacketTaskOffloadEnabled $false
Set-NetOffloadGlobalSetting -ReceiveSideScaling disabled -TaskOffload disabled
Get-NetAdapterRss | ft
Get-NetAdapterVmq | ft
Get-NetAdapterLso | ft
Get-NetAdapterChecksumOffload | ft
Get-NetOffloadGlobalSetting
Get-NetAdapterEncapsulatedPacketTaskOffload
0 notes
Text
Windows / Hyper-V 2008 R2 + Failover Cluster Manager hotfixes
Failover Cluster Manager
http://social.technet.microsoft.com/wiki/contents/articles/2008.list-of-cluster-hotfixes-for-windows-server-2008-r2.aspx
Hyper-V
http://social.technet.microsoft.com/wiki/contents/articles/3150.list-of-hyper-v-packages-updated-after-the-release-of-windows-server-2008-r2-service-pack-1-sp1.aspx
0 notes
Text
VSS writers and their respective services
VSS WriterService NameService Display Name ASR Writer VSS Volume Shadow Copy BITS Writer BITS Background Intelligent Transfer Service COM+ REGDB Writer VSS Volume Shadow Copy DFS Replication service writer DFSR DFS Replication DHCP Jet Writer DHCPServer DHCP Server FRS Writer NtFrs File Replication FSRM writer srmsvc File Server Resource Manager IIS Config Writer AppHostSvc Application Host Helper Service IIS Metabase Writer IISADMIN IIS Admin Service Microsoft Exchange Writer MSExchangeIS Microsoft Exchange Information Store Microsoft Hyper-V VSS Writer vmms Hyper-V Virtual Machine Management NTDS NTDS Active Directory Domain Services OSearch VSS Writer OSearch Office SharePoint Server Search OSearch14 VSS Writer OSearch14 SharePoint Server Search 14 Registry Writer VSS Volume Shadow Copy Shadow Copy Optimization Writer VSS Volume Shadow Copy SPSearch VSS Writer SPSearch Windows SharePoint Services Search SPSearch4 VSS Writer SPSearch4 SharePoint Foundation Search V4 SqlServerWriter SQLWriter SQL Server VSS Writer System Writer CryptSvc Cryptographic Services TermServLicensing TermServLicensing Remote Desktop Licensing WMI Writer Winmgmt Windows Management Instrumentation
0 notes
Text
SCVMM Get List of All Virtual Machines
Get-VM -VMMServer scvmm.contoso.com | Sort-Object Hostname | Select-Object HostName, Name, ComputerName, Status, StopAction, StartAction | Export-Csv .\vm-list.csv -NoTypeInformation
0 notes
Text
Volume Shadow Copy Service (VSS) Troubleshooting
This document will help you troubleshoot your Windows related Volume Shadow Copy Service errors and is for informational purposes only. Because some of the suggestions are system related tweaks and registry setting changes, Tomahawk cannot assume any responsibility for your system stability. Please use at your own risk.
Symptoms of a Volume Shadow Copy Malfunction
Very long (or seemingly indefinite) VSS snapshot generation time with intensive hard drive activity.
VSS errors reported in the Event Viewer (click start and search Event Viewer in search box to open)
VSS errors reported by Microsoft's Volume Shadow Copy tool vssadmin
VSS fails to create snapshots.
Errors such as "The writer vetoed the shadow copy creation process"
VSS Repair Strategy #1
Reboot. For some reason, servers that haven't been rebooted in a while cause VSS to malfunction. This resolves the issue many times. You may also run the C:\Program Files\Tomahawk Pro\bin\RegisterVSS.bat to re-register the service with VSS.
VSS Repair Strategy #2
Open vssadmin from the command line (run cmd as administrator).
Enter vssadmin delete shadows /all to clean up any dead VSS snapshots. Some defect systems accumulate hundreds of VSS snapshots that persist in the system and cause Windows to become unresponsive.
Enter vssadmin list writers and check for errors. If you receive any errors for one VSS writer, you may need to fix that particular VSS writer. It is common to receive writer errors caused by Microsoft's Virtual Server 2005 VSS writer. If you see a VSS writer error, try the following:
Restart the services: COM+ System Application Service, Distributed Transaction Coordinator Service, and Volume Shadow Copy Service and also restart the affected VSS writer service, for example Virtual Server 2005 VSS writer or Hyper-V VSS writer.
Check the Event Viewer for any additional error information logged by that VSS writer. Run again vssadmin list writers to check if the above resolved the problem. If it didn't follow with the next strategy below:
VSS Repair Strategy #3
Check if the Volume Shadow Copy service is started, try restarting the service:
Click 'Start', and then click 'Control Panel'. Click 'Administrative Tools', and then double-click the 'Services' snap-in.
Check for 'Volume Shadow Copy'.
Also, restart the following services on the affected machine:
COM+ Event System Service
COM+ System Application Service
Remote Procedure Call (PRC) Service
MS Software Shadow Copy Provider Service
VSS Repair Strategy #4
Windows 7 / 2008: Re-register the Volume Shadow Copy Service:
Please download the 'RegisterVSS2008.zip' file by Clicking Here.
Extract the zip file to ${Install-Home}\bin
Execute the extracted script file.
Reboot the machine.
VSS Repair Strategy #5
Uninstall all backup software on your computer, including Windows Backup if it's installed. You don't need to uninstall Tomahawk because Tomahawk doesn't contain or install any VSS writers; however, we have seen VSS writers of other backup software manufacturers cause system instability and errors.
After all other backup tools have been uninstalled, open the Registry Editor (regedit) as administrator and check the following branch: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VSS\Providers
Underneath that key you should only find Microsoft Software Shadow Copy Provider 1.0 and no other VSS writer. If you do find another, it may be a residue registry entry of a previous backup software installation. You can save the entry by exporting the entire registry to a file (right click and select Export) and then it's safe to delete the entire branch entry underneath: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VSS\Provider. Then reboot and try again running vssadmin list writers to confirm the problem has been resolved.
VSS Repair Strategy #6
On some systems, the command vssadmin delete shadows isn't available. In Windows XP that's okay because VSS snapshots can't be persistent on XP (a reboot will get rid off them); however, on Vista you need to delete old shadows using:
vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=300MB
300MB is usually the smallest amount you can specify and will effectively delete any existing VSS snapshots on your system. If you don't get any VSS writer errors when using vssadmin list writers but the system isn't able to create a new VSS snapshot (and you have deleted all existing snapshots), then you may have to actually increase the max shadow storage size on your system. Use the previous command with a greater number, such as 10GB:
vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=10GB
Note that it is also possible to allocate shadow copy storage space on a different drive, as along as it's local:
vssadmin Resize ShadowStorage /For=C: /On=X: /MaxSize=200GB
VSS Repair Strategy #7
You can try to re-register all VSS and COM+ components by running the following commands from the command prompt as administrator. These instructions for 32-bit systems (may work on 64 bit as well):
cd /d %windir%\system32 Net stop vss Net stop swprv
regsvr32 ole32.dll regsvr32 vss_ps.dll Vssvc /Register regsvr32 /i swprv.dll regsvr32 /i eventcls.dll regsvr32 es.dll regsvr32 stdprov.dll regsvr32 vssui.dll regsvr32 msxml.dll regsvr32 msxml3.dll regsvr32 msxml4.dll regsvr32 Vssapi.dll regsvr32 Vssui.dll
net start vss net start swprv Execute these instructions for 64-bit systems:
Net stop vss Net stop swprv regsvr32.exe /i %windir%\system32\eventcls.dll regsvr32.exe /i %windir%\system32\swprv.dll regsvr32.exe %windir%\system32\vssui.dll regsvr32.exe %windir%\SysWOW64\vss_ps.dll regsvr32.exe %windir%\SysWOW64\msxml.dll regsvr32.exe %windir%\SysWOW64\msxml2.dll regsvr32.exe %windir%\SysWOW64\msxml3.dll regsvr32.exe %windir%\SysWOW64\msxml4.dll regsvr32.exe %windir%\SysWOW64\ole32.dll regsvr32.exe %windir%\SysWOW64\oleaut32.dll regsvr32.exe %windir%\SysWOW64\es.dll regsvr32.exe %windir%\SysWOW64\comsvcs.dll vssvc /register net start swprv net start vss VSS Repair Strategy #8
If the PC or server you are using is a virtual machine host, you need to install the latest VMware Tools (for VMware), Virtual Machine Additions (Virtual Server), or Hyper-V Integration Services (for Hyper-V and Windows Server 2008) on each virtual machine. Try updating them if you have them installed already. Outdated integration services can cause various VSS errors.
VSS Repair Strategy #9
Your computer may have a corrupt COM+ subscription information. Open the registry editor (regedit) and navigate to: HKLM\Software\Microsoft\EventSystem\{26c409cc-ae86-11d1-b616-00805fc79216}
Then delete the Subscriptions key and reboot the machine. A subsequent call in the command prompt should show no more errors: vssadmin list writers. This VSS repair strategy appears to work well when the System Writer is reporting an error. The Event Viewer may be reporting this or a similar error:
Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220}
Writer Name: System Writer Writer Instance ID: {34162f4c-59ff-468e-848d-cb4b3d8dd7dc}
VSS Repair Strategy #10
Remove or uninstall all backup software on your computer. Tomahawk backup software doesn't need to be removed because it doesn't add a VSS writer to your system. Other products, however, do add a VSS writer which may be causing the problem. You may receive this error: Volume Shadow Copy Service error: A critical component required by the Volume Shadow Copy service is not registered. This might happened if an error occurred during Windows setup or during installation of a Shadow Copy provider. The error returned from CoCreateInstance on class with CLSID {faf53cc4-bd73-4e36-83f1-2b23f46e513e} and Name VSSEvent is [0x80040154]
Several users reported that after uninstalling Acronis this error message disappeared.
VSS Repair Strategy #11
Try uninstalling the virtualization tool you're using (Microsoft Virtual Server, Hyper-V, VMware, etc.) one-by-one, then run Tomahawk's VSS test to see if the problem persists. Try rebooting after uninstalling it before running the test. On some machines, this strategy worked when everything else failed. Once you get VSS working again properly, install the virtualization platform again from scratch and retest VSS.
VSS Repair Strategy #12
Install the latest Service Packs and Updates through Windows Update.
Check Microsoft's Support for hot fixes and other updates to repair VSS.
VSS Repair Strategy #13 (VSS Error Code 0x800423f3)
If the VSS error code 0x800423f3 is reported, the reason is a corrupt state of WMI (wmiutils.dll). This may happen if a registry cleaner was used or a third-party application was uninstalled incorrectly. What you need to do is re-register wmiutils.dll and then restart the WMI service. In the command prompt, execute the following three lines (note that stopping the WMI service does NOT stop VMs, it only stops the management service):
net stop winmgmt
regsvr32 wmiutils.dll
net start winmgmt After that you should start up the Hyper-V Management Service again if needed.
Another cause for this error: You may need to update your Hyper-V virtual machine integration services inside of each VM when you come across this error. See http://technet.microsoft.com/en-us/library/dd582376(v=WS.10).aspx. Check the vmguest.iso date / time you have in your system folder. You may have different versions of the Hyper-V Integration Services CD on your system. There have been bug reports indicating that Hyper-V uses the wrong ISO file when the VM Action menu is used to install the Integration Services. Try attaching the ISO manually and use the latest vmguest.iso in your system folder.
On Windows Server 2008 (not R2), also check this hotfix: http://support.microsoft.com/kb/971394
0 notes
Text
VMware ESXi CLI Cheat Sheet
List All VMs on the Host
# vim-cmd vmsvc/getallvms
Get Information for a Specific VM
# vim-cmd vmsvc/get.guest 30
Get Configuration for a Specific VM
# vim-cmd vmsvc/get.config 30
Get Summary for a Specific VM
# vim-cmd vmsvc/get.summary 30
Get Current Power State of a Specific VM
# vim-cmd vmsvc/power.getstate 30
Power On a Specific VM
# vim-cmd vmsvc/power.on 30
Power Off a Specific VM (Hard)
# vim-cmd vmsvc/power.off 30
Shutdown a Specific VM
# vim-cmd vmsvc/power.shutdown 30
Reboot a Specific VM
# vim-cmd vmsvc/power.reset 30
List a Specific VM’s Snapshots
# vim-cmd vmsvc/get.snapshot 30
Unregister a VM from a ESX Host
# vim-cmd vmsvc/unregister 30
Register a VM on a ESX Host
# vim-cmd solo/registervm path/to/.vmx
0 notes
Link
There are a couple of ways to rename a Virtual Machine, but there are two in my opinion that stand out:
Shutdown the VM
Rename the VM in VirtualCenter
Migrate the VM and move it to another Datastore
done!
And from the service console:
vmware-cmd -s unregister /vmfs/volumes/datastore/vm/vmold.vmx
mv /vmfs/volumes/datastore/vm-old /vmfs/volumes/datastore/vm-new
cd /vmfs/volumes/datastore/vm-new
vmkfstools -E vm-old.vmdk vm-new.vmdk
find . -name ‘*.vmx*’ -print -exec sed -e ‘s/vm-old/vm-new/g’ {} \;
mv vm-old.vmx vm-new.vmx for every file that hasn’t been renamed (.vmsd etc.)
vmware-cmd -s register /vmfs/volumes/datastore/vm-new/vm-new.vmx
done!
2 notes
·
View notes
Link
When copying files from a server to another server or your client you might encounter the above warning in a popup.
To disable this without lowering your UAC-level, add the respective file server NETBIOS name in your intranet to your Local Intranet zone. e.g. if the name of the machine you get the files from is "mymachine.example.lan" you want to add "mymachine" (without protocol) to Internet Options > Security > Local Intranet > Sites > Advanced. Depending on your Windows and SP/IE version this will add as "file://mymachine" or just "mymachine" to the list of Intranet sites. If you now open a "risky" filetype like .mdb or .exe on a shared network drive on this server you won't get this security warning anymore. Obviously, this can also be done via GP. In my eyes this is a much safer and better way than your proposed solution.
0 notes
Link
0 notes
Text
Error ID 948 when running DPM-commands through PowerShell
I have a customer who had the problem that at a certain time during the day a volume for DPMgot lost... No storage issues, because other volumes on the LUN were staying online.
A couple of weeks later (call logged with MS, they didn't provide me with a root cause solution) we had our initial "fix" confirmed by MS: schedule a task to rescan the disks so the volume comes back.
Two lines of code, and all is well one could think...
Add-PSSnapin Microsoft.DataProtectionManager.Powershell Start-DPMDiskRescan -DPMServerName "mp-bck01"
But no, instead you get a weird error about the server being unable to connect to the server. That was a strange error, since I'm doing it on the server locally.
Apparently, without any further hints to it, this error just means you will have to run it as administrator... So open the script in a PowerShell-session which you opened as Administrator and everything works as expected...
0 notes