📜 ⬆️ ⬇️

Create a private cloud using System Center Virtual Machine Manager 2012 R2

Fiery greetings to all and wishes of a vigorous start to the next working week!

On this wonderful day, I want to tell you about how a cloud is created using our wonderful tool - Virtual Machine Manager 2012 R2. I am sure that the approach of using the cloud as a model for the provision of IT services and resources is gaining momentum and many administrators, as well as companies in general, are already familiar with virtualization - and gradually begin to move to the next level - creating a private cloud. Well - let's take a closer look at this interesting process in action!


')


What is a cloud?



Before we proceed directly to the consideration of the cloud creation process in VMM, it would not be superfluous to once again recall why we are doing this and what the benefits will be.
Since the foundation of any modern cloud is virtualization technology, the first association that should arise in an inquiring mind is computing resources. In connection with the spread of virtualization, the cloud as the next level of the IT model, which uses virtualization for its tasks, tells us that now we are not taking into account the server, taking into account the capacity and deployment of services and applications, but directly computing resources. The main resources that we need and which we virtualize are CPU resources, memory resources (RAM), storage resources for data allocation (notorious storage), and communication resources (or just networks). Of course, we are not going anywhere because the VM and services consisting of them need to be placed somewhere, and the placement issue will be addressed directly to the computer object, the virtualization host, but in terms of the cloud approach, we are more interested in the amount of resources - because such technologies as Dynamic Memory, it is not possible in the standard “habit-based” mode to perceive resources as inflexible units, which hosts are, in fact ...
And the fact that RAM is distributed dynamically, and if we are talking about providing storage space for VMs and services, then we will surely come across Thin Provisioning methods and data deduplication mechanisms - these are only a few, but the most obvious examples of the approach to consumption ( therefore, the allocation of resources in the traditional style does not allow us to accurately and adequately assess resources and allocate them correctly for services ... Now we are looking at the number of computing and infrastructure resources we need, when we want to create new VM or service based on the VM.

Let's not dwell on the details of the cloud, the main point is precisely that, first, we treat resources as pools, sets, and secondly, this is the level of abstraction, because virtualization abstracts us from the physical level to the logical ( everything is simple here - the VM is nothing more than a collection of files - and this is the logical level already), i.e. we operate with virtual machines as with files ... For those who want to understand in more detail the features of the cloud, I suggest digging here . Well, the picture for greater clarity.
image
Distinctive features of the cloud as a model .

Lego in front of the cloud



So let's break into our cloud creation process.
In this way, as in the picture below (Figure 1), the VMM management console looks like - and at first glance it’s not very clear what to do next, but let's figure it out with it.


Figure 1. VMM interface.

Automatically I just want to climb into the Clouds tab and start sculpt-create, but let's not hurry. In the context of VMM, a cloud object (cloud) is a logical perimeter constraint that overlays physical resources. And if we are talking about physical resources, first of all we need to add them, i.e. Now we will add virtualization hosts in VMM - for this we go to the Fabric section, then - as in the figure.
As the following screen shows, we can add many different platforms as virtualization hosts, not only Hyper-V - but VMware ESXi / vSphere and Citrix XenServer are also supported as virtualization platforms.


Figure 2. Adding virtualization host resources to VMM.

In our case, we will focus on the Hyper-V platform and look for hosts with this technology. Further, in the course of moving along the resource adding wizard, we need to specify the names of the target hosts - these can be NetBIOS- and FQDN-names, or just an IP address. However, it is worth noting that the account under which you search for hosts must have local administrator rights on the target virtualization host - otherwise, nothing interesting will happen with us. After the wizard finds the necessary hosts, it remains to put checkmarks in front of the objects of interest and complete the process.


Figure 3. Detection of hosts in the Active Directory directory service and their addition to VMM.

Great, we have added virtualization hosts and now we are running to create a cloud, but ... Let's not hurry and figure out what to do next. If we stop and think for a minute, as a result of our actions we added 2 hosts (in this case), which has CPU resources, RAM (everything is smooth with this), but then there are 2 more very important elements - these are storages, storages and data networks. With storage, everything is approximately clear: in the simplest case, we can use local disks of our server to accommodate the VM, if any (and in this example it is this configuration that is considered), but still - in real life we ​​will rather work with industrial storage (which can connect via iSCSI or Fiber Channel , and there may be a whole zoo of different storage systems - we have SMI-S for this case. SMI-S is a vendor-neutral storage management protocol that allows you to select and manage storage under VM and services directly in VMM), or as an alternative, we can use file servers and SMB 3.0 balls to host VMs, VMM can handle this without any problems.


Figure 4. Adding storage resources to host VMs and services in VMM.

If, in our particular case, with the placement of loads, we solved the problem due to the local disk resources of our hosts, now we should deal with the latest infrastructure components of our cloud - networks. The topic of creating and managing virtual networks in VMM requires a separate series of articles, and detailed ones - so within the framework of this article I will briefly tell you about the components that we need.
First, it would be very nice to create a single virtual switch to manage the network along all of our hosts. In the context of VMM, such an object bears the name of a logical switch (logical switch) , but in addition to creating a single switch, we also need a mechanism to automatically assign a host's network adapter to communicate with this switch — but for this purpose we need to create an uplink port profile . From the point of view of VMM, you first need to create a port profile (To do this, go to Fabric-> Networking-> Port Profiles and click on the last button with the right mouse button - then create a profile without options).


Figure 5. Creating a port profile in VMM.

I would like to draw your attention to the fact that the port profile can be created taking into account the possibility of timing (or interface aggregation) built into Windows Server 2012/2012 R2. If you create an uplink profile on a regular interface, then the timing parameters will not affect the properties of the interface. If you are attentive, then you noticed that there is an option to create not a uplink profile, but a virtual port profile. The virtual port profile, in turn, is assigned to the virtual VM adapter in order to map to the correct physical adapter - but this is not today, just to complete the picture I finish the story about this topic.

Now let's go to the creation of a logical switch (Logical Switch), it is created there, in the Networking tab.
After launching the wizard, we will set the name of the virtual switch switch, we can choose the switch extensions, if we have installed (for example, Cisco 1000 Nexus V). The very things we are interested in are a little further, on the Uplink tab - here we just indicate the uplink profile created earlier.


Figure 6. Creating a virtual switch and setting up a link with an uplink profile.

The virtual port profile is not interesting to us now, so feel free to finish configuring the virtual switch on the final screen of the wizard. After we created our virtual switch with and configured profiles, it would now be nice to apply our switch to our Hyper-V hosts. To do this, go to the Fabric-> Servers-> All Hosts section , select the host we need and right-click on it — next we are interested in the Virtual Switches section. Next we select New Virtual Switch -> New Logical Switch. Select the desired network adapter and uplink profile. Repeat this operation on all required hosts (or whistle the PowerShell script and paste all the names there))).


Figure 7. Creating and linking a logical switch to a host.

Now it's up to small. We connected the hosts together; now we need to make the network accessible to the cloud itself. Now we need to create a logical network (Logical Network) - a single continuous space along the set of hosts, which will host the network of virtual machines (VM Networks) .
This raises the question: “What is the difference between a logical network and a VM network?”
The answer is quite simple: VM networks are placed on top of logical networks. Here, the point is that a logical network is a continuous network space along a set of hosts. VM networks are built on top of logical networks using network virtualization, i.e. creation of isolated networks that behave as if they are different physical networks, i.e. they are not aware of each other's existence. Thus, the combination of these mechanisms allows you to build a huge number of isolated virtual networks along the hosts, and of course, if the networks are not aware of the existence of each other, then the IP addresses in them can be used duplicate. That is what we will do when creating our network. Another important point is the fact that the cloud as a VMM element works with the network component at the logical network level, i.e. Creating a logical network is a prerequisite for creating a cloud.


Figure 8. Creating a logical network in VMM .

To enable network virtualization, we activate the first tick, as in the figure. We need the second tick if we want to equate the logical network with the VM network - i.e. this action will create a VM network with the same name and scope as the logical network. This is needed more for infrastructure management networks, it is not recommended to place user loads in this way, because there is a risk of access to the infrastructure by unauthorized users.

It's time to cloud



After we have prepared our infrastructure, it’s time to put all the components together and link them with the logical image of the cloud object (cloud) in VMM. to do this, go to VMs and Services-> Clouds-> right-click and create . Next, a cloud creation wizard will appear, which will ask us to set the name of the cloud, then ask to choose the perimeter of resources (virtualization hosts) over which the cloud will be stretched (I chose All Hosts), select the logical network we need, assign the storage under the VM. An interesting point in creating a cloud is the ability to limit resource consumption, both in relative and quantitative terms.
This is necessary so that cloud users do not devour all resources, thereby preventing a shortage of resources for other users.


Figure 9. Limiting the use of cloud resources in VMM.

After we have created a cloud, it remains to assign this cloud to its users, who will both consume its resources (on the one hand) and manage it directly (on the other hand). To do this, everyone in the same section of VMs and Services will select the newly created cloud and click on the Assign Cloud key . If we have a role created earlier, then we can assign it to the cloud, but in our case we have not created a role yet - so let's consider what options of roles are available to us and what is their meaning.
And so - there are 4 roles to choose from: Fabric Administrator (also known as Delegated Administrator, Read-Only Administrator, Tenant Administrator and Application Administrator (aka Self-Service User). The first role is a full-fledged, all (almost) able administrator, but within the boundaries of the cloud to which it is assigned. Read-Only Administrator is clearly the role of the notorious helpdesk troubleshooter - since no action other than simple monitoring of the situation does not imply this role ... Tenant Administrator is a role for managing Windows Azure subscriptions and is needed for hybrid cloud models. Application Administrator is the actual end user of the service and resource broker.


Figure 10. User roles in the VMM cloud.

After you have created a cloud and assigned users, you can access the cloud from the user and administrator at the web interface level, for this you need to deploy App Controller and associate an instance of the VMM server - the clouds from it will automatically pull in.


Figure 11. Accessing the cloud through the App Controller portal.

Well, dear colleagues! Here we are with you and created the cloud, now you can deal with the creation of VMs and services in your cloud.
This process is extremely fascinating and non-trivial - let's talk about it some other time in one of the next articles about the cloud and System Center 2012 R2.

It remains to add links to download products:

Windows Server 2012 R2 Preview - technet.microsoft.com/ru-ru/evalcenter/dn205286
System Center 2012 R2 Preview - technet.microsoft.com/ru-ru/evalcenter/dn205295

Until new meetings and cloudless (hehe) you a week!

Respectfully,
Fireman,
he is Lord Flame,

George A. Gadzhiev.

Source: https://habr.com/ru/post/195738/


All Articles