none
configuring Static IP address on an CONTAINER RRS feed

  • General discussion

  • Dear Nano experts,

    i have installed windows 2016 TP4 on HYPER-V and  i have created a container but i could not configure static ip address to container how can i do this i tried but no success..

    Suggestion to Microsoft Nano developers to allow to install .MSI or EXE files in nano so we can install third-party apps like MySQL php etc..

    Regards

    Rabbani


    RaSa

    Monday, January 4, 2016 7:31 AM

All replies

  • Try this..

    PowerShell
    Edit|Remove
     .\New-NanoServerVHD.ps1 ` 
                -ServerISO 'c:\nano\10586.0.151029-1700.TH2_RELEASE_SERVER_OEMRET_X64FRE_EN-US.ISO' ` 
                -DestVHD c:\nano\NanoServer01.vhd ` 
                -ComputerName NANOTEST01 ` 
                -AdministratorPassword 'P@ssword!1' ` 
                -Packages 'Storage','OEM-Drivers','Guest' ` 
                -IPAddress '192.168.1.65'

    more details are here ..https://gallery.technet.microsoft.com/scriptcenter/Create-a-New-Nano-Server-61f674f1

    please mark this as an answer if it helps if not please explain what more you need from us

    thx @deepfat

    Monday, January 4, 2016 8:22 AM
  • Syed oops I misread your question, this might be the post you are looking for ..

    https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_powershell#configure-networking-2-

    notice the host is providing networking to the container in the same way we set a virtual switch up in Hyper-V except that you use NAT on the host to do it.

    Monday, January 4, 2016 9:01 AM
  • Hi,

    For 3rd party apps/app frameworks that have a zip, such as MySQL, you can include the Reverse Forwarder package and then xcopy the files over.

    We have a new installer available in TP4 with more functionality coming. Details are available in the following blog posts:

    http://blogs.technet.com/b/nanoserver/archive/2015/11/18/installing-windows-server-apps-on-nano-server.aspx

    http://blogs.technet.com/b/nanoserver/archive/2015/11/19/hands-on-packaging-and-installing-your-first-windows-server-apps-on-nano-server.aspx

    Thanks,

    Andrew

    Tuesday, January 5, 2016 5:34 PM
  • Thanks all for your time

    i ran the script gor error as given below

    ERROR  : The variable cannot be validated because the value $null is not a valid value for the Edition variable.
    INFO   : Log folder is C:\Users\ADMINI~1\AppData\Local\Temp\2\Convert-WindowsImage\e54b7587-f73a-4f97-882b-9d7ac0f3e3e7

    INFO   : Closing Windows image...
    INFO   : Done.

    Deployment Image Servicing and Management tool
    Version: 10.0.10586.0


    Error: 87

    The parameter is incorrect.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    Deployment Image Servicing and Management tool
    Version: 10.0.10586.0


    Error: 2

    Unable to access the image.
    Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder.


    RaSa

    Thursday, January 7, 2016 4:26 PM
  • As you have mentioned in the question, you already have a Nano server VM running.
    So that in mind, you can do below:

    Server 2016 comes with PowerShell direct, with it you can drop into a remote PSSession on the Nano VM like below:

    Enter-PSSession -VMName 'dex-nano-1' -Credential (Get-Credential)

    Where 'dex-nano-1' is my nano server vm name and the above will prompt you for the credentials, enter creds of the local administrator.

    Once you drop into the PSSession, import the NetTCPIP module and use the New-NetIPAddress cmdlet or the netsh.exe to configure a static IP address.
    Not showing you how to use the cmdlet as the help clearly tells that , but see below the module is present on the Nano Server:

    [dex-nano-1]: PS C:\> gmo
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-Item...
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Clear-Variable, Compare-Ob...
    Manifest   1.0.0.0    NetTCPIP                            {Find-NetRoute, Get-NetCompartment, Get...
    
    
    [dex-nano-1]: PS C:\> gcm -module nettcpip -verb new
    
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Function        New-NetIPAddress                                   1.0.0.0    NetTCPIP
    Function        New-NetNeighbor                                    1.0.0.0    NetTCPIP
    Function        New-NetRoute                                       1.0.0.0    NetTCPIP
    Function        New-NetTransportFilter                             1.0.0.0    NetTCPIP


    Knowledge is Power{Shell}

    DexterPOSH

    My Blog



    • Edited by DexterPOSH Monday, January 11, 2016 9:51 AM
    Monday, January 11, 2016 7:45 AM