Thursday, September 4, 2014
Security Guide for Hyper-V in Windows Server 2012
‘Unnamed VM’ could not initialize… The security ID structure is invalid (0x80070539)
Why does Grant-VMConnectAccess allow you to resolve this issue?
Excellent explanation is in this blog post.
Excellent explanation is in this blog post.
Wednesday, July 16, 2014
Programmatically Detecting when a VM Changes State
Nice approach can be found here.
# WMI Query that specifies what events we will watch for
$Query = "Select * from __InstanceModificationEvent within 3 where TargetInstance ISA 'MSVM_ComputerSystem' `
and TargetInstance.EnabledState <> PreviousInstance.EnabledState"
# Script block that will run whenever the event fires
[ScriptBlock]$Action = {
$VMName = $Event.SourceEventArgs.NewEvent.TargetInstance.ElementName
switch ($Event.SourceEventArgs.NewEvent.TargetInstance.EnabledState)
{
2 {$vmState = "running"}
3 {$vmState = "turned off"}
9 {$vmState = "paused"}
6 {$vmState = "in a saved state"}
10 {$vmState = "starting"}
4 {$vmState = "stopping"}
default {$vmState = "in an unknown state..."}
}
if ($Event.SourceEventArgs.NewEvent.TargetInstance.EnabledState -eq 1)
{$vmState = $Event.SourceEventArgs.NewEvent.TargetInstance.OtherEnabledState}
write-host "The virtual machine '$($vmName)' is now $($vmState)."}
# Register for the events
Register-WMIEvent -Query $Query -Action $Action -Namespace root\virtualization\v2
# To clean up - run "Get-EventSubscriber | Unregister-Event"
Tuesday, August 13, 2013
Hyper-V 2012 vs. vSphere 5.1
Hyper-V 2012 vs. vSphere 5.1
Interesting and unbiassed comparison. Ok, will see what VMware prepared with vSphere.Next (5.5?).
Interesting and unbiassed comparison. Ok, will see what VMware prepared with vSphere.Next (5.5?).
Subscribe to:
Posts (Atom)