Is it possible to install Hyper-V (Windows 2008) without the GUI and still have full use of all the features?

4,280 pts.
Tags:
Hyper-V
Hyper-V GUI
Hyper-V Manager
Windows Server 2008
Is it possible to install Hyper-V (Windows 2008) without the GUI and still have full use of all the features?
ASKED: February 24, 2009  10:14 PM
UPDATED: February 25, 2009  3:03 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes this is totally possible. What you need to do is a Core install. However, if you do it this way you will need a second physical machine on the network, either Vista SP1 or Windows Server 2008, This is where you can run the Hyper-V Manager to create your VMs. (there are command line workarounds.)

Command line to create a Hyper-V VM:

Option Explicit

Dim HyperVServer

Dim VMName

Dim WMIService

Dim VSManagementService

Dim VSGlobalSettingData

Dim Result

Dim Job

Dim InParam

Dim OutParam

‘Prompt for the Hyper-V Server to use

HyperVServer = InputBox(“Specify the Hyper-V Server to create the virtual machine on:”)

‘Prompt for the new VM name

VMName = InputBox(“Specify the name for the new virtual machine:”)

‘Get an instance of the WMI Service in the virtualization namespace.

Set WMIService = GetObject(“winmgmts:” & HyperVServer & “\root\virtualization”)

‘Get the VirtualSystemManagementService object

Set VSManagementService = WMIService.ExecQuery(“SELECT * FROM Msvm_VirtualSystemManagementService”).ItemIndex(0)

‘ Initialize a new global settings for the VM

Set VSGlobalSettingData = WMIService.Get(“Msvm_VirtualSystemGlobalSettingData”).SpawnInstance_()

‘Set the VM name

VSGlobalSettingData.ElementName = VMName

‘Setup the input parameter list

Set InParam = VSManagementService.Methods_(“DefineVirtualSystem”).InParameters.SpawnInstance_()

InParam.SystemSettingData = VSGlobalSettingData.GetText_(1)

‘Execute the method and store the results in OutParam

Set OutParam = VSManagementService.ExecMethod_(“DefineVirtualSystem”, InParam)

‘Check to see if the job completed synchronously

if (OutParam.ReturnValue = 0) then

Wscript.Echo “Virtual machine created.”

elseif (OutParam.ReturnValue <> 4096) then

Wscript.Echo “Failed to create virtual machine”

else

‘Get the job object

set Job = WMIService.Get(OutParam.Job)

‘Wait for the job to complete (3 == starting, 4 == running)

while (Job.JobState = 3) or (Job.JobState = 4)

Wscript.Echo Job.PercentComplete

WScript.Sleep(1000)

‘Refresh the job object

set Job = WMIService.Get(OutParam.Job)

Wend

‘Provide details if the job fails (7 == complete)

if (Job.JobState <> 7) then

Wscript.Echo “Failed to create virtual machine”

Wscript.Echo “ErrorCode:” & Job.ErrorCode

Wscript.Echo “ErrorDescription:” & Job.ErrorDescription

else

Wscript.Echo “Virtual machine created.”

end If

end if

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following