none
Issues with ContainerImage cmdlets RRS feed

  • Question

  • I am investigating the use of containers, so I had to use the ContainerImage cmdlets to get the pieces.  I ran into a couple issues, and figured this forum might be the right place to post them.

    The instructions for obtaining the image (https://msdn.microsoft.com/en-us/virtualization/windowscontainers/management/manage_images?f=255&MSPPError=-2147217396#installing-base-os-images) say to use the command Install-ContainerImage -Name <name>  When I issue that command, it goes off and seems to process it by displaying a status bar showing progress across the top of the window, but then it errors out with:

    Install-ContainerOSImage : The term 'Install-ContainerOSImage' is not recognized as the name of a cmdlet, function,
    script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.
    At C:\Program Files\WindowsPowerShell\Modules\ContainerProvider\0.5.2\ContainerProvider.psm1:245 char:5
    +     Install-ContainerOSImage -WimPath $Destination `
    +     ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Install-ContainerOSImage:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    There is not option to specify a destination path for the Install-ContainerImage cmdlet, according to its help, shown below:

    SYNTAX
        Install-ContainerImage [-Name] <string> [[-Version] <string>] [[-SearchKey] <string>]  [<CommonParameters>]

    I find it interesting that the error message says there is a -WimPath parameter, but the help doesn't.

    I then used the Save-ContainerImage cmdlet with a -Destination parameter value of C:\Temp.  It returned this error:

    Please provide file name with path.
    At C:\Program Files\WindowsPowerShell\Modules\ContainerProvider\0.5.2\ContainerProvider.psm1:586 char:9
    +         throw "Please provide file name with path."
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (Please provide file name with path.:String) [], RuntimeException
        + FullyQualifiedErrorId : Please provide file name with path.

    I entered a name for the file and it was fine.  I guess I was expecting it to work like a Copy command where it would default to the source file name, which is what I wanted, because I did not know the source file name.

    So I then tried with a destination of C:\Temp\*.*.  It came back and asked me:

    Overwrite File
    Do you want to overwrite the existing file: c:\Temp\*.* ?
    [Y] Yes  [N] No  [?] Help (default is "Y"):

    Not quite what I would have expected.  Maybe my expectations are a little high to expect parameters that are asking for paths to work similar to a Copy command.

    As stated at the beginning, I was able to get things to work, but I thought I should report this someplace.


    . : | : . : | : . tim

    Wednesday, November 25, 2015 7:29 PM

Answers

  • Yes, I have read the whole link (several sections many times), long before I posted.  Reading the link is not the issue.


    . : | : . : | : . tim

    • Marked as answer by Tim CerlingMVP Wednesday, November 25, 2015 10:07 PM
    Wednesday, November 25, 2015 10:07 PM

All replies

  • Support for containers is not installed on your system. 

    Start here: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/container_setup


    \_(ツ)_/

    Wednesday, November 25, 2015 7:46 PM
    Moderator
  • I know I don't have container support on my system. I have to download the stuff before I can put it on. Those commands are the commands used to download it.  The URL I provided is a topic on the page of the URL you provided.  I copied my original Install-ContainersImage command directly from the installation page, and it errored out.  I figured out what I needed to do.

    In order to even see those commands, I had to issue the command Install-PackageProvider ContainerProvider.  That gives me the proper cmdlets.  My issue is not whether or not my system has containers installed on it.  The point is that the cmdlets are throwing errors either where they should not be, or they are acting different from my expectations.

    If this is not the place to report issues with PowerShell cmdlets, please let me know where I should report.


    . : | : . : | : . tim

    Wednesday, November 25, 2015 8:33 PM
  • I recommend fully reading the whole link I posted.  There is more to it than just downloading things.  You need to have the correct version of Windows as well as other pre-requisites. 

    Realize that you are working with pre-release software which has no support.  You can post issues in MS Connect and that is about all.


    \_(ツ)_/

    Wednesday, November 25, 2015 9:37 PM
    Moderator
  • Yes, I have read the whole link (several sections many times), long before I posted.  Reading the link is not the issue.


    . : | : . : | : . tim

    • Marked as answer by Tim CerlingMVP Wednesday, November 25, 2015 10:07 PM
    Wednesday, November 25, 2015 10:07 PM