Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Container Fundamentals | Part 5 - Hyper-V Containers

0 (0 Likes / 0 Dislikes)
  • Embed Video

  • Embed normal player Copy to Clipboard
  • Embed a smaller player Copy to Clipboard
  • Advanced Embedding Options
  • Embed Video With Transcription

  • Embed with transcription beside video Copy to Clipboard
  • Embed with transcription below video Copy to Clipboard
  • Embed transcript

  • Embed transcript in:
    Copy to Clipboard
  • Invite a user to Dotsub
[The Containers Channel] [Container Fundamentals Hyper-V Containers] [Container Fundamentals Hyper-V Containers The Containers Channel Microsoft] >> Hello, welcome to another episode [Matt McSpirit Technical Evangelist The Containers Channel Microsoft] on The Containers Channel. [Matt McSpirit Technical Evangelist The Containers Channel Microsoft] I'm Matt McSpirit, technical evangelist for all of our datacenter stuff [Matt McSpirit Technical Evangelist The Containers Channel Microsoft] and I'm joined again by Neil Peterson, [The Containers Channel Microsoft Neil Peterson Senior Content Developer] who is a content developer in our container space. [The Containers Channel Microsoft Neil Peterson Senior Content Developer] Continuing the series on Containers Fundaments, [Container Fundamentals Hyper-V Containers] we're gonna continue this series by focusing in this particular episode [Container Fundamentals Hyper-V Containers The Containers Channel Microsoft] on Hyper-V containers. [Container Fundamentals Hyper-V Containers The Containers Channel Microsoft] So tell us a bit more about [Container Fundamentals Hyper-V Containers] Hyper-V containers and what we need to know. [The Containers Channel Microsoft] >> Sure. So thanks a lot, Matt. [The Containers Channel Microsoft] [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] is take a look at what a Hyper-V container is [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] before jumping into some demos, [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] just some real quick blurbs on it. [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] At TP3 we realized Windows server containers. [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] And a Windows server container, [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] basically it shares the kernel [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] with container host. [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] >> Right. [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] >> Isolation is created [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] through a series of process, namespace [Hyper-V Container Windows server containers - isolation through process, namespace and network isolation technologies.] and network isolation technologies. [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] Hyper-V Containers which were released with TP4 [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] really expand on what we have [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] with Windows server containers [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] providing an extra layer of isolation [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] by essentially encapsulating [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] in a super optimized virtual machine. [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] >> Right. [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] >> Hence the Hyper-V Containers. [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] >> Right, so when you mentioned [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] before container host, [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] you were referring to, [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] that could be a physical machine [Hyper-V Containers - isolation is expanded upon, placing each container in a highly optimized virtual machine.] or it could be a virtual machine, [The Containers Channel Microsoft] that's just the OS that is [The Containers Channel] essentially supporting and running all of these different containers. [The Containers Channel Microsoft] >> Yep. Absolutely. >> Okay. [The Containers Channel Microsoft] Now, we've got these two different types, Windows server containers, [The Containers Channel Microsoft] there was technical preview 3 for Windows Server 2016. [The Containers Channel] And then Hyper-V containers which was technical preview 4 for 2016. [The Containers Channel Microsoft] >> Yep. >> Right. Okay. [The Containers Channel Microsoft] >> Absolutely. [The Containers Channel Microsoft] So I mean that's the very simple explanation [The Containers Channel Microsoft] of what a Windows server container is and a Hyper-V container. [The Containers Channel] What I wanted to do is just jump in and take a look at the two of them [The Containers Channel] and compare and contrast. [The Containers Channel Microsoft] >> That sounds good. Let's take a look. [The Containers Channel Microsoft] >> Okay. [The Containers Channel Microsoft] So I've got basically three small demos that we're gonna do. [Hyper-V Containers Demo] The first thing we're gonna do is create a Windows server container [Hyper-V Containers Demo] and really kind of look at it from a container host perspective, [Hyper-V Containers Demo] look at the processes that are running on the host, [Hyper-V Containers Demo] relate those back to the container itself. [Hyper-V Containers Demo] And then we'll do the exact same thing with the a Hyper-V container [Hyper-V Containers Demo] and kind of look at the differences there. [Hyper-V Containers Demo] >> Right. [Hyper-V Containers Demo] But we'll see this PowerShell and Docker. [Hyper-V Containers Demo] And then finally, we'll take a quick look at creating a Windows server container [Hyper-V Containers Demo] and then converting that container to a Hyper-V container. [Hyper-V Containers Demo] >> So you mention there briefly, we're gonna do some stuff with PowerShell [Hyper-V Containers Demo] and then we're gonna do some stuff with Docker as well. [Hyper-V Containers Demo] One of the questions we got on one of the episodes was, [Hyper-V Containers Demo] not trying to put you on the spot but... [Hyper-V Containers Demo] "When should I be using one over the other, [Hyper-V Containers Demo] is it that kind of decision I should be making. [Hyper-V Containers Demo] Can you give us a bit of a... [Hyper-V Containers Demo] Ten thousand foot view of what people should be thinking around, [Hyper-V Containers Demo] do I use PowerShell, do I use Docker?" [Hyper-V Containers Demo] >> Sure. Absolutely. I'll do my best. [Hyper-V Containers Demo] >> Yeah. >> So it's still early days here. [Hyper-V Containers Demo] And so we're still in preview but, you know, [Hyper-V Containers Demo] working with containers and PowerShell gives you that PowerShell experience, [The Containers Channel Microsoft] in fact we'll see a lot of that here where I've written scripts [The Containers Channel] to kind of spin up multiple containers [The Containers Channel] and do what I want with these containers using a language that I'm familiar with, [The Containers Channel] beings a Windows guy, I've got the background with PowerShell [The Containers Channel] and it's just kind of a natural thing for me. [The Containers Channel] >> Yeah. [The Containers Channel] >> I mean as well, we've got this, you know, Docker's been around for while, [The Containers Channel] they've got tooling around managing containers that's very well thought out and established. [The Containers Channel] We have those capabilities with Windows Server and Hyper-V Containers as well, [The Containers Channel] so I mean, really it's just choosing [The Containers Channel] which management experience works best for you. [The Containers Channel] >> So perhaps if you're coming at this from a complete vanilla, [The Containers Channel Microsoft] I've never used Docker, you might find that PowerShell [The Containers Channel] gives you what you need but then the Docker tool set is [The Containers Channel] as you said a little bit more mature, it does have further reaches [The Containers Channel] beyond what we can deliver in PowerShell today, especially around Linux. [The Containers Channel] So therefore you may have more capability [The Containers Channel] but for Windows server containers, they're not too far off. [The Containers Channel] >> Not too far off. >> So much that we can do. [The Containers Channel] >> Okay. [The Containers Channel] >> So you'll see there's some of the subtle differences [The Containers Channel] as we go through as well when Neil is demoing [The Containers Channel] and we've seen that in some of our previous demos as well. [The Containers Channel] So take us through that first demo. What are we looking at here? >> Yeah. So what I'm gonna do is I'm gonna create a Windows server container. In fact, I've got, I've got all the PowerShell ready to go. >> Yeah. >> So I'm gonna create a new container for my Windows server core image. >> Yeah. >> And people should be familiar with this from earlier videos when we just did the generic Windows server container creation. >> Yep. Yep. Absolutely. I won't go through a lot of the details here, but definitely pick up on some of the earlier videos. I'm then gonna start that container. And then what I'm gonna do is I'm gonna start a process within that container, so I'm running in the command against the container and basically I'm gonna run ping local host. >> Right. >> So I'm gonna just start a ping process that stays running. >> Yeah, but that could be anything, that could be anything. That could be a fancy script, it could be some kind of service that needs to start whatever it may be. >> Yeah. Absolutely. So while that starts up, and just a subtle little context. I'm working here on the container host, so we are on the container host right now, I just started a container on the host that we are working on. >> Right. >> So now I'm gonna go ahead and minimize this and looking at the host, if we scroll through here, we'll notice that we see a process, ping.exe running. >> Right. >> So on the container host we see this process. >> Yeah. >> What I'm also gonna do... >> Even though that's executing within the container. >> Within the container. >> Okay. >> Yep. And this is where we're gonna see the differences. I mean the very obvious differences between a Windows server container and a Hyper-V container. >> So I'm gonna actually enter into a session within this container. So you can see here, I've got a remote PowerShell session inside the container. >> And the reason it says ping there is because you called the container. >> Yeah, 'cause I called the container ping. >> Yeah. >> And if I run get process. It's taking some time there. >> I sometimes find that as well, it's tough completing PowerShell. >> There you go. >> Yep. >> Just filled enough time for you there. >> Sure. So from within the view of the container, we can also see a process ping and you can see here the process ID is 4556 which matches the process ID that we're seeing from the view of the host. In fact, I can actually from the host here, [Task Manager] crash this process and it will drop... Yep. And then if I do, get process again. >> It's gone. >> It's gone. >> Here you go. >> So here you kind of see that shared kernel, I mean there is isolation happening here but we're still exposing some of the stuff to the container host. So to... As we talked about Hyper-V containers change this up quite a bit. And so instead of having the shared kernel architecture, we're now going to put a container inside of a virtual machine, a highly optimized virtual machine. >> But that's not something that I or you, it's the administrator has to do. You know, I don't have to go to Hyper-V manager, create special VM, load boot it up, and then inside that start creating a container that is therefore encapsulated overall within a new VM. I don't have to worry about that. >> Yep, absolutely, that's the great thing about it. In fact the management experience is identical. >> Okay. >> Short of one small switch which we'll take a look at here. >> Okay. Great. >> So I'm actually gonna go head and fire this up and then I'll talk about what we're doing here. Well, we'll see if there's not that many differences, so. Again, I'm running new container. Giving the container a name, hypv here. Selecting a container image, you'll notice here that I've selected the Nano Server image. >> That's the base image for this container. >> Base image for this container, so that TP4 Hyper-V containers need to be running a base image of nano server. >> Okay. Great. >> And then here's the switch that indicates that this will be a Hyper-V container, so we're selecting runtime Hyper-V. And that's basically, I mean that's the big difference right there, difference between a Windows server container and a Hyper-V container is selecting the runtime. >> At least from a deployment perspective. >> Sure. Sure. Absolutely. >> Yeah. >> And then as we can see, I started the container and then done the exact same thing. So invoking the command, ping local host -t just to keep that process up and running. >> Right. >> So we'll do the same thing. I'm gonna pop over here to the host. And what we'll notice is now I do not see the ping process. >> Okay. >> So since that container is encapsulated in that high optimized virtual machine, it's all inside of there. >> Right. >> There are a couple of things though that we can see, so if I do you get container... select star, we'll see here I got a container ID. If I scroll down here on the host in my list of processes, notice that we have a VM worker process, so this is that Hyper-V process, representing a virtual machine. And if we look at the username, they can see that the username on this VM worker process matches the id of the container, so I mean there is a way to correlate my Hyper-V container to a process on the host, but we don't see those processes that we're running within a container. >> And in addition I suppose you wouldn't see this in Hyper-V manager either. >> No. >> Even though it is a VM. >> Yeah. Absolutely. Yeah. It's in from there. Now if we jump into the container itself... What we'll see once we get into the containers is that that ping process is running. >> Okay. >> And there it is. So, you know, just a quick example [The Containers Channel Microsoft] of looking at a Windows server container, [The Containers Channel Microsoft] looking at a Hyper-V Container and kind of how they differ [The Containers Channel Microsoft] from the perspective of the host. [The Containers Channel Microsoft] >> So the big benefit here from if you were for instance a service provider [The Containers Channel] or if you were concerned about running workloads in containers in [The Containers Channel] perhaps they're shared or multi-tenant environment [The Containers Channel] where your workload maybe almost sensitive than ping. [The Containers Channel] You using a Hyper-V container gives you that extra level of isolation, [The Containers Channel] the hardware isolation that a VM brings [The Containers Channel] and yet still the benefit and portability in a container itself. [The Containers Channel] >> Yep. Absolutely. [The Containers Channel] >> And you haven't needed to manage it necessarily [The Containers Channel] any differently apart from that one switch that we went through. [The Containers Channel Microsoft] >> Yep. Absolutely. [The Containers Channel Microsoft] And to that point, so that was an example of doing it with PowerShell. We get the same capabilities with Docker. Just gonna grab this. So here I'm standard Docker run command. >> Yeah. >> Docker run -it is going to start an interactive session. >> Yeah. >> And here is the switch that we're looking at here, so isolation equals Hyper-V. >> Right. >> And then I've got the ID of the image I want to run which is the Nano Server image and then I'm starting our command shell. So if we run this, again you can actually see that we just had another VM worker process fire up. >> Right. >> So that, you know, Hyper-V container is being created. >> Right. So regardless of whether you do it through Docker or through PowerShell, the end result is still the same. >> I suppose one difference here as you know you've been put into the command line view here in Docker 'cause that was the command you specified when you first launched. Nice. >> So one last thing that's kind of neat about Windows server container and Hyper-V container, and we talked about the management experiences identical between the two, and it really is. But to that point, [The Containers Channel Microsoft] we can take a Windows server container, [The Containers Channel Microsoft] develop it up, get it working, and actually convert that [The Containers Channel Microsoft] to Hyper-V container. [The Containers Channel Microsoft] >> So if I'm a developer and I'm building an application [The Containers Channel Microsoft] that I'm gonna package in a container, play it in a Windows Server, [The Containers Channel] perhaps in my testing environment, [The Containers Channel] if it needs to live in a more isolated environment in the wild, [The Containers Channel] I'd have to change my app. [The Containers Channel] >> Exactly. >> Okay. Cool. [The Containers Channel Microsoft] >> So let's see an example of that. So what I have here is [User name: Password: Domain:] a Nano Server container host. [Nano Server Recovery Console] And you can see the IP address here [Nano Server Recovery Console] and as we know we don't have local log on in nano server. [Nano Server Recovery Console] So from my laptop, I've got two PowerShell sessions created with that Nano Server container host. >> Okay. >> And just like I did before I've got some scripts already built for this. So the first script, I'm gonna create a container, so new container named ping, container image Nano Server, switch name, I'm assigning it to a switch. >> Yeah. >> I'm gonna start the ping process. I'm sorry, I'm gonna start the container and then run the ping process just like you saw before. So again, creating a Windows server container on a Nano Server host. And starting the container now. >> So that would be a... Even though it's a Windows server container, it's still a Nano based Windows server container. >> Yes, still a Nano based image. So at TP4 there are some limitations on what base OS image can run on what host or less. >> Yeah. >> And so from the host, if I run get process, we can see there is my ping process so Windows server container process is exposed to the host. >> Yeah. >> So now instead of tearing this container down and creating a new one, we're gonna actually just take the exact same container, so if I do a get container, there is my container, it's got a name of ping. >> Yeah. >> So I've not another script in here, demo 2. I'm running type which just returns the text of the script to the screen. >> Yeah. >> So I'm going to stop the container and now I'm gonna run a command set container ping and I'm gonna set the runtime to be Hyper-V. >> Ping being the name of the container... >> Ping being the name of the container, yes, yes. Start the container and then again I'm gonna do the same exact thing, I'm gonna invoke the command and start the ping process up again. >> So if all goes well, what we should see on the right is when you next step process, that ping would disappear. >> Yes. >> Because we've stopped that container where it was running and you won't see it now that it's encapsulated within a Hyper-V Container. >> And not only that, we'll see a VM worker process startup. >> Yeah. There you go. >> And actually what you'll see is this process list will decrease quite a bit because what we're seeing here is the processes from the host and the process from the running container. >> Right. >> So I'll go ahead and run this script which is going to stop it, do a conversion, start it back up. Get process. We can see my list is decreased quite a bit. There is that VM worker process started up and that's it. >> Cool. So what we've seen there is how easily you can traverse between [Hyper-V Container Demo Click to add notes] a regular Windows server container regardless of Nano in this case. [Hyper-V Container Demo Click to add notes] Between Nano and a Hyper-V Container, we've shown how easy it is [The Containers Channel Microsoft] to create new Windows server containers and new Hyper-V based containers. [The Containers Channel Microsoft] [The Containers Channel Microsoft] Easy stuff and it's all in the documentation that people can learn more as well. [Resources Read the Containers documentation Microsoft and Docker Partnership Get started with Docker] >> Yep. Absolutely. [Resources Read the Containers documentation Microsoft and Docker Partnership Get started with Docker] >> Okay, so that wraps up this particular episode [The Containers Channel Microsoft] on The Containers Channel for Containers Fundamentals. [The Containers Channel Microsoft] So hopefully, you've enjoyed it. [The Containers Channel Microsoft] Check out the resources and you can get loads more information. [The Containers Channel Microsoft] Download the technical preview to play with it yourself. [The Containers Channel Microsoft] You can even run it in Azure. [The Containers Channel Microsoft] So loads of learning you can do there and join us again in the future [The Containers Channel Microsoft] for another episode on The Containers Channel. [The Containers Channel Microsoft] Thanks. [The Containers Channel Microsoft] >> Thanks, Matt. [Resources Download Windows Server 2016 Technical Preview Read the Containers documentation Microsoft and Docker Partnership Get started with Docker] [The Container Channel] [9 channel9.msdn.com]

Video Details

Duration: 16 minutes and 12 seconds
Country: United States
Language: English
License: All rights reserved
Genre: None
Views: 41
Posted by: duncanma on Feb 19, 2016

----- (Please provide translations for these languages: Chinese (Simplified) (chi_hans), Chinese (Traditional) (chi_hant), English (eng), French (France) (fre_fr), German (ger), Italian (ita), Japanese (jpn), Korean (kor), Portuguese (Brazil) (por_br), Russian (rus), Spanish (spa).)

Caption and Translate

    Sign In/Register for Dotsub to translate this video.