Home Dashboard Directory Help
Search

[W2012 PowerShell 3] *-VHD cmdlet fails; Create/Attach VHD works (Disk Management) by Desmond Lee


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 755028
Opened: 7/22/2012 12:58:59 PM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

#below statements executed on VM1

PS C:\Users\Administrator> Get-WindowsFeature *hyper*

Display Name                                            Name                     Install State
------------                                            ----                     -------------
[ ] Hyper-V                                             Hyper-V                        Available
        [ ] Hyper-V Management Tools                    RSAT-Hyper-V-Tools             Available
            [ ] Hyper-V GUI Management Tools            Hyper-V-Tools                 Available
            [ ] Hyper-V Module for Windows PowerShell Hyper-V-PowerShell             Available


PS C:\Users\Administrator> Install-WindowsFeature RSAT-Hyper-V-Tools

Success Restart Needed Exit Code     Feature Result
------- -------------- ---------     --------------
True    No             Success        {Hyper-V Module for Windows PowerShell, Hy...
WARNING: Windows automatic updating is not enabled. To ensure that your newly-installed role or feature is automatically updated, turn on Windows Update.


PS C:\Users\Administrator> Get-WindowsFeature *hyper*

Display Name                                            Name                     Install State
------------                                            ----                     -------------
[ ] Hyper-V                                             Hyper-V                        Available
        [X] Hyper-V Management Tools                    RSAT-Hyper-V-Tools             Installed
            [X] Hyper-V GUI Management Tools            Hyper-V-Tools                 Installed
            [X] Hyper-V Module for Windows PowerShell Hyper-V-PowerShell             Installed


PS C:\Users\Administrator> New-VHD -Path c:\temp\vm1.vhdx -SizeBytes 5gb
New-VHD : The Virtual Machine Management Service on host 'LY01' is not running.
At line:1 char:1
+ New-VHD -Path c:\temp\vm1.vhdx -SizeBytes 5gb
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         : NotSpecified: (:) [New-VHD], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : Microsoft.Vhd.PowerShell.NewVhdCommand

PS C:\Users\Administrator>

PS C:\Users\Administrator> Install-WindowsFeature Hyper-V

Success Restart Needed Exit Code     Feature Result
------- -------------- ---------     --------------
False Maybe         Failed         {}
Install-WindowsFeature : A prerequisite check for the Hyper-V feature failed.
1. Hyper-V cannot be installed: A hypervisor is already running.
At line:1 char:1
+ Install-WindowsFeature Hyper-V
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo         : InvalidOperation: (Hyper-V:ServerComponentWrapper) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : Alteration_PrerequisiteCheck_Failed,Microsoft.Windows.ServerManager.Commands.AddWindowsF
eatureCommand


PS C:\Users\Administrator>

#next, try to create and attach VHD using Disk Management - SUCCESS!
#see attached screen shots
Details
Sign in to post a comment.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
posh3-new-vhd-fails.png 7/30/2012 78 KB