Docker microsoft/nanoserver won't start - powershell

I have a problem with Docker running the nanoserver.
My environment: I Installed docker on a Win10 (developer build from microsoft) Virtual Machine (cause host is still Win7 with no default Docker support because of Hyper-V). I installed docker on the virgin image so no 3rd-party programs can cause the error. I also have already checked if Hyper-V is enabled.
But I think this Screenshot says everything:
Also Googled the problem, but everything i found wasn't in a Docker context.
FYI: I want to use the Docker container for running a network rendering slave which should only see one cpu core (for licensing reasons), maybe someone has another option for this.

so you are trying to run Docker on Windows 10 which is a VM on Windows 7? I suppose this is not possible. You are trying to run a virtualization platform inside a virtualized Host (your Windows 10 machine). This nested virtualization is not supported by Windows 7 afaik.
Nested virtualization is supported on Windows 10 Build 10565 and later (this must be your virtualization host).
Have you tried to create and run a Hyper-V VM inside that Windows 10 VM? this will also fail.

Related

How can I use a local TwinCat 3 runtime with Hyper-V enabled?

I'm trying to run TwinCat 3 XAR in a PC where I need to have hyper-V ON to run Azure IoT Edge (which uses hyper-V). Is there a way to run XAR with hyper-V turned on? Is there any way to isolate the cores from hyper-v or something else?
Edit 22 April 2022
For a complete tutorial on this see my blog post.
There is a way to accomplish this. You can do this by instead of having a local runtime, you can run the code on a runtime in a virtual machine. I got the idea from this reddit post.
To make it work I did the following:
Download and install VMware Player. Its free for non-commercial use. You can also use the paid Pro (Workstation) version. I'm not sure if this also works with Virtual Box.
Install TwinCAT BSD on the virtual machine as described in this excellent YouTube video by Jakob
If you're using VMware Player and need to enable UEFI you need to do the following as noted by YouTube user Eivind Hilde:
Follow the guide in the video, but skip the step where the firmware type is set.
Try to boot the VM. it will fail.
Open the .vmx file in the VM directory with notepad .
Find "firmware = "bios" and replace with "firmware ="efi"" and save. If this line doesn't exist, just add it somewhere.
It will now boot, and you can follow the guide in the video for the rest.
Run your TwinCAT project on the virtual machine, without the need to disable Hyper-V. 🎉
Previous answer
I don't think so. InfoSys mentions:
Hyper-V environment:
The runtime environment cannot be started inside a Hyper-V environment. This refers in particular to virtual Hyper-V machines, which are run in a privileged Hyper-V machine. As soon as a component of the computer uses Hyper-V, only the engineering environment (XAE) can be used on this computer, not the runtime environment (XAR).
But they also mention that:
TwinCAT attempts to detect these Hyper-V environments; however, it is in the nature of virtualization approaches that they do not wish to be detected and TwinCAT therefore cannot carry out any 100% detection.
So maybe there is some way you can prevent TwinCAT from detecting a Hyper-V environment. However, that is something I can't answer.

VSCode: Using dev container remotely without local installation of docker

Currently, I have:
a desktop with low system specs, Windows 7 Pro (without Admin Rights), without docker.
a Virtual Machine with Centos7, and docker installed.
On my desktop, I can either use:
my local installation of VSCode, and Remote - SSH to develop remotely on my VM. It works well, but I can't combine this with Remote - Containers.
X11Forwarding to develop directly with VSCode installed on this VM. I can use Remote - Containers, but X11 is very slow.
Is there a way, with local VSCode, to develop in a remote container, without local installation of docker (obviously with docker installed on the host)?
Is there a way, with local VSCode, to develop in a remote container,
without local installation of docker (obviously with docker installed
on the host)?
No. In the 'advanced containers' docs it says
You can use the Docker CLI locally with a remote Docker host by
setting local environment variables like DOCKER_HOST,
DOCKER_CERT_PATH, DOCKER_TLS_VERIFY. Since VS Code uses the Docker CLI
under the hood, you can use these same environment variables to
connect the Remote - Containers extension to the same remote host.
I added the bolding. Note that it is referring to the client not the remote there. This is from Developing inside a container on a remote Docker host.
Though not officially supported, it seems that it is possible to install Docker CLI without the daemon...
Is it possible to install only the docker cli and not the daemon
Maybe you can do this without admin?
That would, though, certainly be swimming against the grain. Probably your best bet is to stick with the 'remote - SSH' setup you've got going.
I just achieved this using the solution linked by #Tom (but with admin rights, I didn't test it without them)
I downloaded the docker-cli from the docker-cli-builder github repo and created the docker context successfully.
After selecting it in VSCode, it has started using the context allowing me to see the containers on the remote machine.
We have build a small tool called LiveSync which could solve your problem. You simply run
python3 -m pip install livesync
livesync <virtual-machine>
from inside your vscode workspace. It will start watching for changes and push them immediately to the remote. Hence you can code locally (even run your tests) and have all changes synced with your target system.

Which Intel virtualizaton techniques are necessary for Docker?

Which Intel virtualizaton techniques are necessary for Docker?
On a Linux system running on a Intel cpu, what Virtualization Technologies by Intel are necessary to fullfill the execution of a Docker container? E.g. there are VT-X, ...
Or is there no need of using such a technology because Docker is somehow different to existing virtualization solutions like VirtualBox. In this case, why is there no need?
None. Docker uses a completely different system - it's not running a virtual machine so much as a super chroot. See the question below:
Can I run Docker directly on a non VT-X machine (no Virtual Machine used)?
The tutorials that tell you you'll need VT-x are usually based on running docker in Windows (on Hyper-V) or in VirtualBox.

how to install operating system on a virtual machine programatically

It may be a duplicate question but i could not find it anywhere.
Anyway, my goal to install operating system(both linux and windows) programatically on a virtual machine running on vmware hosts.
Although my search, I am quite lost about where to start.
Is there a framework or project you can suggest?
You could use templates; i.e. create a VM, install the Linux distribution of your choice and make the VM a template. Then don't create VMs but deploy the template.
Alternatively, google for the Linux distribution of your choice and something like "network installation". You'll need a DHCP server and probably a TFTP and/or web server.
Working with Templates and Clones
Creating VMware Virtual Machine Templates
Try having a look at Vagrant: http://www.vagrantup.com/. It allows you to install/uninstall a predefined VM from the command line.

Does Revirtualization works with Hyper-V and not Xen

I was installing vagrant with virtualbox provision. When I am running it on Amazon EC2, then it doesn't work saying:
* Running VirtualBox in a Xen environment is not supported
EC2 uses xen virtualization. On the other hand, its working fine on Windows Azure Virtual Machines which uses a customized version of Hyper-V.
So,cant we use virtualbox in Xen but in Hyper-V?
Are you sure that HyperV allow you to start the VM, I don't think this is possible using current hardware VT technology without slow painful emulation instead of virtualization.