locked
Azure Pack- VM Deploy using Gallery is not completed RRS feed

  • Question

  • Hi All,

    Good Day!!!,

    we deployed Windows Azure Pack + System Center Suite for build IaaS to provide services to end user.

    we could able to create VM using VM Roles with .Vhdx file

    at the same VM Role to Create Virtual Machine using Gallery , Primary OS Disk & Data Disk are missing from selection.

    any help for the above is appreciated.

    thanks,


    Thanks & Regards, Kesa_Kara

    Tuesday, March 1, 2016 9:44 AM

Answers

  • Hello,

    Can you check with this script please?

    $VHDName = "VHD-WIN2K12R2.vhd"
    $FamilyName = "Windows Server 2012 DataCenter"
    $Release = "1.0.0.0"
    $AVMAKey = "Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW"
    $LibraryServer = "SCVMM-LAB.domain.local"
    $MyVHDX = Get-SCVirtualHardDisk | where {($_.Name –eq $VHDName) -and ($_.LibraryServer -eq $LibraryServer)}
    $2K12DC = Get-SCOperatingSystem | where { $_.name –eq '64-bit edition of Windows Server 2012 Datacenter'}
    $tags = $myVHD.Tag
    if ( $tags -cnotcontains "WindowsServer2012" ) { $tags += @("WindowsServer2012") }
    if ( $tags -cnotcontains "R2" ) { $tags += @("R2") }
    Set-scvirtualharddisk –virtualharddisk $myVHDX `
                          –OperatingSystem $2K12DC `
                          -FamilyName $FamilyName `
                          -Release $Release `
                          -Tag $tags `
                          -ProductKey $AVMAKey

    If you want to have different version, you need to have multiple VHD. 

    To create a custom gallery item, you can do it with following resources:

    https://vmroleauthor.codeplex.com/

    https://blogs.technet.microsoft.com/privatecloud/2014/07/31/the-windows-azure-pack-vm-role-part-2-concept/

    Florent

    • Marked as answer by kesa_kara Thursday, March 10, 2016 11:54 AM
    Tuesday, March 8, 2016 9:46 AM

All replies

  • Hello,

    Tags of your VHD are corresponding to 2012, R2?

    Get-SCVirtualHardDisk -Name YourVHDXName

    Florent


    • Edited by Flodu31MVP Tuesday, March 1, 2016 2:20 PM
    Tuesday, March 1, 2016 12:50 PM
  • Hi Flodu,

    thanks for your reply,

    we set the tag as follow

    Tag                    : {WindowsServer2012}

    Regards,


    Thanks & Regards, Kesa_Kara

    Tuesday, March 1, 2016 4:18 PM
  • Ok, in the doc, you need which tag for this VMRole?

    Florent

    Tuesday, March 1, 2016 4:24 PM
  • Hi ,

    we are doing this setup for POC ,but we are not followed any of specific doc for VM Role in Azure Pack.

    If you share any doc it will help us .

    Thanks


    Thanks & Regards, Kesa_Kara

    Tuesday, March 1, 2016 4:35 PM
  • Ok. You need to add another tag, with the value "R2" (without "").

    Here is the link with the VMRole and the documentation:

    http://download.microsoft.com/download/7/7/E/77E0D903-4259-4255-88DC-8EBD47738C93/WS2012R2.zip

    Florent

    Tuesday, March 1, 2016 4:50 PM
  • Hi Florent,

    Thanks for your reply, i think we have this document by add gallery items by web installer .

    Only thing is that we could not able to add 2 tags in vhd, the below command gives an error

    Please correct 

    $myVHD = Get-SCVirtualHardDisk -Name "VHD-WIN2K12R2.vhd"

    $tags = $myVHD.Tag

    if ( $tags -cnotcontains "WindowsServer2012R2" ) { $tags += @("WindowsServer2012") }

    Set-scvirtualharddisk –virtualharddisk $myVHD –Tag 'WindowsServer2012','R2'

    thanks,


    Thanks & Regards, Kesa_Kara

    Tuesday, March 1, 2016 5:08 PM
  • Try with this:

    $myVHD = Get-SCVirtualHardDisk -Name "VHD-WIN2K12R2.vhd"
    $tags = $myVHD.Tag
    if ( $tags -cnotcontains "WindowsServer2012R2" ) { $tags += @("WindowsServer2012") }
    if ( $tags -cnotcontains "R2" ) { $otags += @("R2") }
    Set-scvirtualharddisk –virtualharddisk $myVHD –Tag $tags

    Be sure to have the good family name and operating system too (can be done through graphical interface)

    Florent

    Tuesday, March 1, 2016 7:24 PM
  • Hi Florent,

    will check this and update you.

    thanks,


    Thanks & Regards, Kesa_Kara

    Wednesday, March 2, 2016 2:06 AM
  • Hi Florent,

    Please find the command output

    PS C:\Windows\system32> $myVHD = Get-SCVirtualHardDisk -Name "VHD-WIN2K12R2.vhd"
    $tags = $myVHD.Tag
    if ( $tags -cnotcontains "WindowsServer2012R2" ) { $tags += @("WindowsServer2012") }
    if ( $tags -cnotcontains "R2" ) { $tags += @("R2") }
    Set-scvirtualharddisk –virtualharddisk $myVHD –Tag $tags

    Set-SCVirtualHardDisk : Cannot convert 'System.Object[]' to the type 'Microsoft.SystemCenter.VirtualMachineManager.VirtualHardDisk' 
    required by parameter 'VirtualHardDisk'. Specified method is not supported.
    At line:5 char:40
    + Set-scvirtualharddisk –virtualharddisk $myVHD –Tag $tags
    +                                        ~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-SCVirtualHardDisk], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.SetVHDCmdlet



    Thanks & Regards, Kesa_Kara

    Wednesday, March 2, 2016 5:22 AM
  • Ok, can you try with this one please?

    $VHDName = "VHD-WIN2K12R2.vhd"
    $FamilyName = "Windows Server 2012 DataCenter"
    $Release = "1.0.0.0"
    $AVMAKey = "Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW"
    $MyVHDX = Get-SCVirtualHardDisk | where {$_.Name –eq $VHDName}
    $2K12DC = Get-SCOperatingSystem | where { $_.name –eq '64-bit edition of Windows Server 2012 Datacenter'}
    $tags = $myVHD.Tag
    if ( $tags -cnotcontains "WindowsServer2012R2" ) { $tags += @("WindowsServer2012") }
    if ( $tags -cnotcontains "R2" ) { $tags += @("R2") }
    Set-scvirtualharddisk –virtualharddisk $myVHDX `
                          –OperatingSystem $2K12DC `
                          -FamilyName $FamilyName `
                          -Release $Release `
                          -Tag $tags `
                          -ProductKey $AVMAKey
    Florent

    Wednesday, March 2, 2016 6:10 AM
  • Hi Florent,

    when we try to run the above script we are getting the below error

     

    PS C:\Windows\system32> C:\Users\ladmin\Documents\SCVMM-VHDTagUpdate.ps1
    Set-SCVirtualHardDisk : Cannot convert 'System.Object[]' to the type 'Microsoft.SystemCenter.VirtualMachineManager.VirtualHardDisk' 
    required by parameter 'VirtualHardDisk'. Specified method is not supported.
    At C:\Users\ladmin\Documents\SCVMM-VHDTagUpdate.ps1:10 char:40
    + Set-scvirtualharddisk –virtualharddisk $myVHDX `
    +                                        ~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-SCVirtualHardDisk], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.SetVHDCmdlet


    PS C:\Windows\system32> 


    Thanks & Regards, Kesa_Kara

    Wednesday, March 2, 2016 2:46 PM
  • Mmmmh very strange, is this command give you an output?

    Get-SCVirtualHardDisk | where {$_.Name –eq 'VHD-WIN2K12R2.vhd'}
    Florent

    Wednesday, March 2, 2016 4:31 PM
  • Hi Florent,

    sorry for delayed reply, between time we were stuck in connect SCVMM Cloud after update RU9. Now issue got solved.

    Please check the output of above command

    PS C:\Windows\system32> Get-SCVirtualHardDisk | where {$_.Name –eq 'VHD-WIN2K12R2.vhd'}
    OperatingSystem        : Windows Server 2012 R2 Datacenter
    VHDType                : DynamicallyExpanding
    VHDFormatType          : VHD
    VirtualizationPlatform : HyperV
    MaximumSize            : 37580963840
    ParentDisk             : 
    SANCopyCapable         : False
    IsCachedVhd            : False
    ComplianceStatus       : 
    Tag                    : {WindowsServer2012}
    HasProductKey          : False
    Location               : \\SCVMM-LAB.domain.local\MSSCVMMLibrary\VHDs\VHD-WIN2K12R2.vhd
    Release                : 1.0.0.0
    State                  : Normal
    LibraryShareId         : 35e94c14-12e0-4a1a-930d-7da4b239e960
    SharePath              : \\SCVMM-LAB.domain.local\MSSCVMMLibrary\VHDs\VHD-WIN2K12R2.vhd
    FileShare              : 
    Directory              : \\SCVMM-LAB.domain.local\MSSCVMMLibrary\VHDs
    Size                   : 8474411008
    IsOrphaned             : False
    FamilyName             : Windows Server 2012 R2 Datacenter
    Namespace              : Global
    ReleaseTime            : 01-03-2016 17:44:25
    HostVolumeId           : 6052fe35-bc55-43c1-884c-2e0901792dbb
    HostVolume             : 
    Classification         : 
    HostId                 : c6b01dbc-43e9-4be8-9ec4-7374200d8ca5
    HostType               : LibraryServer
    HostName               : SCVMM-LAB.domain.local
    VMHost                 : 
    LibraryServer          : SCVMM-LAB.domain.local
    CloudId                : 
    Cloud                  : 
    LibraryGroup           : 
    GrantedToList          : {}
    UserRoleID             : 00000000-0000-0000-0000-000000000000
    UserRole               : 
    Owner                  : 
    ObjectType             : VirtualHardDisk
    Accessibility          : Public
    Name                   : VHD-WIN2K12R2.vhd
    IsViewOnly             : False
    Description            : 
    AddedTime              : 01-03-2016 17:42:53
    ModifiedTime           : 01-03-2016 18:11:17
    Enabled                : True
    MostRecentTask         : 
    ServerConnection       : Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection
    ID                     : 91ddc1eb-0bdf-42f6-9619-4be21f109dac
    MarkedForDeletion      : False
    IsFullyCached          : True
    MostRecentTaskIfLocal  : 

    OperatingSystem        : Windows Server 2012 R2 Datacenter
    VHDType                : DynamicallyExpanding
    VHDFormatType          : VHD
    VirtualizationPlatform : HyperV
    MaximumSize            : 37580963840
    ParentDisk             : 
    SANCopyCapable         : False
    IsCachedVhd            : False
    ComplianceStatus       : 
    Tag                    : {WindowsServer2012}
    HasProductKey          : False
    Location               : \\hyperv3.domain.local\VHD-Share\VHD-WIN2K12R2.vhd
    Release                : 1.0.0.0
    State                  : Normal
    LibraryShareId         : fb51da0a-ed7e-455a-b8d7-56da7e4fc031
    SharePath              : \\hyperv3.domain.local\AVHD-Share\VHD-WIN2K12R2.vhd
    FileShare              : 
    Directory              : \\hyperv3.domain.local\VHD-Share
    Size                   : 8474411008
    IsOrphaned             : False
    FamilyName             : Windows Server 2012 R2 Datacenter
    Namespace              : Global
    ReleaseTime            : 01-03-2016 17:44:25
    HostVolumeId           : 272f534e-7258-489b-b8b7-0197d9d9c8ec
    HostVolume             : 
    Classification         : 
    HostId                 : d85ff853-be3e-4a07-8ba9-9b428760dc0a
    HostType               : LibraryServer
    HostName               : hyperv3.domain.local
    VMHost                 : 
    LibraryServer          : hyperv3.domain.local
    CloudId                : 
    Cloud                  : 
    LibraryGroup           : Locuz-Bangalore
    GrantedToList          : {}
    UserRoleID             : 00000000-0000-0000-0000-000000000000
    UserRole               : 
    Owner                  : 
    ObjectType             : VirtualHardDisk
    Accessibility          : Public
    Name                   : VHD-WIN2K12R2.vhd
    IsViewOnly             : False
    Description            : 
    AddedTime              : 01-03-2016 17:42:53
    ModifiedTime           : 01-03-2016 17:45:36
    Enabled                : True
    MostRecentTask         : 
    ServerConnection       : Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection
    ID                     : 02ea9ca4-932b-4a46-87f4-dc2e3c900043
    MarkedForDeletion      : False
    IsFullyCached          : True
    MostRecentTaskIfLocal  : 

    PS C:\Windows\system32> 

    If possible can you clarify, when we need to crate various OS Version we should have different VHD files or how it will be

    Example: We need to have OS Version on the Production is

         Windows Server 2012 R2

         Windows Server 2012 SP1

         Windows Server 2008 R2

         Windows 10

         Windows 8

        Windows 7

    how can we create custom Gallery file for tat above OS Version for update into WAP Portal.

    thanks in advance.

       


    Thanks & Regards, Kesa_Kara


    • Edited by kesa_kara Thursday, March 10, 2016 11:37 AM Version Details change
    Tuesday, March 8, 2016 9:10 AM
  • Hello,

    Can you check with this script please?

    $VHDName = "VHD-WIN2K12R2.vhd"
    $FamilyName = "Windows Server 2012 DataCenter"
    $Release = "1.0.0.0"
    $AVMAKey = "Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW"
    $LibraryServer = "SCVMM-LAB.domain.local"
    $MyVHDX = Get-SCVirtualHardDisk | where {($_.Name –eq $VHDName) -and ($_.LibraryServer -eq $LibraryServer)}
    $2K12DC = Get-SCOperatingSystem | where { $_.name –eq '64-bit edition of Windows Server 2012 Datacenter'}
    $tags = $myVHD.Tag
    if ( $tags -cnotcontains "WindowsServer2012" ) { $tags += @("WindowsServer2012") }
    if ( $tags -cnotcontains "R2" ) { $tags += @("R2") }
    Set-scvirtualharddisk –virtualharddisk $myVHDX `
                          –OperatingSystem $2K12DC `
                          -FamilyName $FamilyName `
                          -Release $Release `
                          -Tag $tags `
                          -ProductKey $AVMAKey

    If you want to have different version, you need to have multiple VHD. 

    To create a custom gallery item, you can do it with following resources:

    https://vmroleauthor.codeplex.com/

    https://blogs.technet.microsoft.com/privatecloud/2014/07/31/the-windows-azure-pack-vm-role-part-2-concept/

    Florent

    • Marked as answer by kesa_kara Thursday, March 10, 2016 11:54 AM
    Tuesday, March 8, 2016 9:46 AM
  • Hi Florent,

    Good Day!!!, 

    Thank you So much, it works well and now could able to see OS disk in the Gallery and we are done crating Data Disk As well.

    Now we could able to provision Virtual Machine using VM Role Gallery Option successfully in Windows Azure Pack.

    Thank you Very much..you guidance is helpful for me..thanks to forum guidance team.

    Also I have some query, could you please help me on that as well.

    1.In the Script You have mentioned MAK Key, so we need to use MAK for All Windows Machine Activation or we need to use KMS Server.

    2. For Client version of Operating Systems  also we need to use MAK or KMS

    3.How can we add Multiple Ethernet card to VM in Azure Pack?

    4. With the above script I have updated tags into both VHD[1.0.0.1] & VHDX[1.0.0.1] file with different release version  but Tag will be the same {WindowsServer2012, R2}...in this Tag is the important item when import gallery in WAP 

    5. Can you share some idea about how to create VM Template for Redhat / CentOS /Ubuntu Operating Systems{Blog / guide doc}

    6.If we want to use this IaaS set up for PaaS means what are the other component are required

    7.In WAP without Grid pro third party can we able to create approval process for tenant

    thanks again florent, we are waiting for your reply.

    thanks



    Thanks & Regards, Kesa_Kara

    Thursday, March 10, 2016 11:54 AM
  • Perfect :)

    Following answers of your questions:

    1.In the Script You have mentioned MAK Key, so we need to use MAK for All Windows Machine Activation or we need to use KMS Server. 
    => No, you can use any key, it was just an example
    2. For Client version of Operating Systems  also we need to use MAK or KMS
    => Same as the 1st answer
    3.How can we add Multiple Ethernet card to VM in Azure Pack?
    => You need to shutdown your VM and go in the Configure tab
    4. With the above script I have updated tags into both VHD[1.0.0.1] & VHDX[1.0.0.1] file with different release version  but Tag will be the same {WindowsServer2012, R2}...in this Tag is the important item when import gallery in WAP 
    => Yes, if you don't have same tags thanin the defpkg file, you will not see your VHD/VHDX
    5. Can you share some idea about how to create VM Template for Redhat / CentOS /Ubuntu Operating Systems{Blog / guide doc}
    => Mmmh, I have no idea now, but on google, you will be able to find this
    6.If we want to use this IaaS set up for PaaS means what are the other component are required
    => Yes for PaaS, you need to install the WebSites architecture and for DBaaS, it's already included
    7.In WAP without Grid pro third party can we able to create approval process for tenant
    => Not possible

    Florent
    Thursday, March 10, 2016 2:19 PM