четверг, 24 марта 2016 г.

Windows Server 2016 TP4 Hyper-V Container fails to start with 80070002

So,

I was playing with new Windows Server containers feature the other day and for some reason Hyper-V container didn't want to start with the following error:

start-container : 'sg-cnt1' failed to start.
'sg-cnt1' failed to initialize: The system cannot find the file specified. (0x80070002).

It took some time and with help of Process Explorer I was able to conclude that WindowsServerCore image, which container host downloads, doesn't contain the template virtual drive (SystemTemplate.vhdx). You can check that NanoServer image does have the template, but not the full windows container image.

You might ask why I don't use a default (non-hyperv) containers? Well, because Microsoft has a bug and you cannot change container computer name - it will change the computer name of the host machine instead. That's why I was trying Hyper-V containers, from breif Nano container examitation I found that this type of container doesn't have this bug. Unfortunately I cannot use the Nano because I need to install some software and on Nano it's going to be difficult.

Solution:

Don't know. I need to find a correct SystemTemplate.vhdx somewhere. I'll update the post when I find.