Determine whether Hyper-V is currently active (not installed or configured)
hyper-v used visual studio run windows phone emulators. hyper-v incompatible vmware because hyper-v starts windows in mode of permanent virtualisation while vmware need vt-x during runtime only.
hyper-v can installed , uninstalled windows role. activate , deactivate permanent windows virtualisation , allow vmware run. of course visual studio emulators stop working.
hyper-v can configured active or inactive without uninstalling windows role. involves editing boot configuration bcdedit.exe. after doing change, restart required apply configuration , use or not use hyper-v. bcd setting can read after setting it, unknown whether system has been restarted apply it. setting indicates happen after restart, not whether virtualisation running.
some people @ windows service "vmms". unfortunately not helpful because service installed hyper-v role , running, no matter whether virtualisation active or not. wmi information not helpful because says hyper-v running, when it's not.
obviously there must way determine real current status of virtualisation because vmware tell when try start 64 bit machine.
so how can done in code? .net application? administrator privileges available because bcdedit.exe needs it.
should require native assembler code, possible run c#/.net somehow?
problem solved, finally.
isprocessorfeaturepresent(pf_virt_firmware_enabled)
returns true, if hyper-v not running; otherwise, false. easy use in c#.
thank you, lain.
this part of hyper-v switch tool, simple gui enable or disable hyper-v without uninstallation, allowing use of other virtualisation solutions.
Windows Server > Hyper-V
Comments
Post a Comment