When you work in VMware Player or Workstation, it is possible to connect a VM in NAT network level. This allows the VM to hide on the physical host, while you can enjoy access to the local network that is connected to the physical host.
But when you work in Hyper-V, this possibility isn’t integrated. It can be a problem especially Hyper-V can be installed on client version of Windows, i.e. to say from Windows 8. In general with its workstation that acts as Hypervisor, it may connect to various networks (especially if it’s a laptop). In some cases, the network connection is complicated. Specifically on the command line when to authenticate to a proxy for a web page and that one has no GUI.
To work around this limitation and enjoy the NAT under Hyper-V, we will see here a whole technical functional flow.
The aim is to create a new virtual switch “Internal” in the Hyper-V console, and then make a connection between the virtual and physical network card connected through connection sharing concept. Then simply put a virtual machine on the new virtual switch that will be called “NAT” and will get a DHCP address by, and will access the LAN through NAT!
Note: If you enable sharing on your Wi-Fi card, it will reconfigure the share on the Ethernet Network Card you should need to user it. The rocker is not automatic and sharing can be active only one card for the same network.
It only remains to connect the virtual machine on the virtual switch called “NAT” and done!
We can also see from this virtual machine, the DHCP is active and that address is received, while checking that one is output from the Wi-Fi network adapter to ping the Internet.
Hypervisors are increasingly present in enterprise architecture since the virtualization growth started and was quickly adapted by the industries. There are many solutions and more or less expensive, but when it comes to the hypervisor, there are only two types. Isn’t this surprising to you? Anyway, your server must have a hardware technology supporting Intel-VT or AMD-V to virtualize power.
It is a system that installs directly on the server hardware layer. These systems are alleviated so as to “focus” on the management of guest operating systems is to say, those used by the virtual machines they contain. This releases the greatest possible resources for virtual machines. However, it is possible to execute only one hypervisor on both the servers.
Among type 1 hypervisors there are systems like Xen, VMware ESX and Proxmox.
Here, it is software that installs and runs on an operating system already in place. Therefore, more resources are used for rotating the hypervisor and the operating system that supports it, there is therefore less resources available for the virtual machines. Interesting thing that can be found is the ability to run multiple hypervisors simultaneously as they are not related to the hardware layer.
Among the type 2 hypervisor, we find VMware Player, VMware Workstation and VirtualBox VirtualPC.
Previously we saw tutorial about Dynamic Memory in Hyper-V. Today, we will see Smart Paging in Hyper-V. We strongly advise you to consult this tutorial before coming to it in order to better understand it.
We will now see what exactly Smart Paging is and its contribution in this explanatory tutorial.
For information Smart Paging is also called as “intelligent pagination”. It is a mechanism to counteract the difficulties that may be encountered during the restart of a machine, if the Hyper-V is not able to assign VM to its minimum RAM which required for starting a machine (Startup RAM).
This is due to the fact that due to the dynamic memory allocation, VMs have their memory threshold which varies from each other. Therefore, when you try to restart a VM and if there is not enough memory available and the Hyper-V host is also not able to recover minimum required RAM from the other VM, the VM cannot start. Fortunately, now we have Smart Paging feature.
Indeed, in this case a Smart paging file will be created and used to virtual machine time that Hyper-V host can allocate the minimum RAM which is necessary. Once the RAM allocation carried out, the Smart Paging file will be automatically deleted. Moreover, it will be stored at the location indicated in the VM’s properties.
To unload the VM memory allocated through Smart Paging, technology “Memory Ballooning” is used as in the case of DRAM via Windows Memory Manager. Note that Smart Paging is a temporary mechanism. This allows the virtual machine to start but this memory cannot be used indefinitely to the virtual machine.
Besides, Microsoft recommends not using this feature more than 10 minutes on a machine while specifying RAM – as we said – that this in only temporary.
The Smart Paging can be used for restarting a VM or while resetting the VM. And if there are no VMs or physical RAM available, then it is not possible to recover the RAM on the other VMs.
Hyper-V version 3 with Windows Server 2012 has a new feature which dynamically allocates memory (RAM) on a Windows virtual machine. What is that? And is it a complicated process?
It is simple; it adds memory to a VM as needed up to a limit defined in the configuration. The dynamic addition is actually a hot-add memory to the VM.
With this feature we can more efficiently manage the memory allocation to the virtual machine since without this feature we must first turn off the VM to change the allocated memory. With this feature, everything is handled dynamically. That’s to say hot-add by the Hyper-V manager, which interact with the virtual hosts.
Hyper-V also incorporated this feature in Windows Server 2008 R2 with Service Pack1. The following guest operating systems are supported:
We will see a brief example here about adding and deleting memory dynamically on a VM to understand how it works…
Our Hyper-V server contains a VM that uses dynamic memory feature. It has 2 GB of memory assigned minimum and begins to saturate.
After enabling the dynamic memory feature, Windows will show warning message that the hypervisor needs additional memory through dynamic memory driver: DMVSC, Dynamic Memory VSC.
You will clearly understand in order to use this feature requires the system that taking advantage of the compatible virtual host which supports dynamic memory driver.
OK, now our VM has a 3 GB of RAM, thanks to hot-added memory. The hours pass…the peak load of activity decrease and then our VM does not need as much memory.
A signal is sent to the Hyper-V host to withdraw the memory from our virtual machine, but we cannot remove memory directly from a Windows machine enthusiastically, otherwise a crash will obtain with a famous blue screen.
To counter this problem there is a solution. In fact, Hyper-V does believe in the system of exploitation when the VM memory is unavailable. Alright, as our VM no longer need to use that part of memory, it is then possible to reassign it to another needy VM. This is called as the “Memory Ballooning”.
The added extra memory to a virtual machine, 1GB, will be rendered in the virtual machine. We will allow it to use only minimum 2 GB.
To enable dynamic memory feature on virtual memory in Hyper-V manager, right click on the VM on which you need additional RAM, then click on “Settings”. Then on the left side, click “Memory” and in the right pane, select the check box next to “Enable Dynamic Memory”.
However, there are various fields:
-Minimum RAM: it must always be made available to the VM, and then the VM memory will not drop below this value. This is the minimum memory that the VM needs to function.
-Buffer: This buffer will be allocated to the VM memory very quickly with an area pre-allocated memory on each VM that can react quickly during a peak load.
It may be interesting to define a high value for this field when the VM is running an application that require a large amount RAM chunk for a moment and then release afterwards. This will meet the needs of the application. Conversely, set a low value on a VM if it turns an application that always seeks to use the maximum possible memory.
To determine this value, Hyper-V uses the percentage you point it and the amount of memory used at a time T by the virtual machine. After a calculation, it shows a value that will correspond to the available buffer.
-Memory Weight: It manages the memory availability on the priority of a machine relative to another. The higher the priority, the more Hyper-V will work to prioritize allocating memory for that VM rather than another whose priority is lower. It is important to prioritize critical virtual machines first and have significant advantage in term of memory.
Server virtualization has been into trend from a couple of last years and it is a reality that knocks companies, bringing numerous benefits to all who seek the resource savings and a more effective IT management. Furthermore, it is a green technology.
To give a broader view of server virtualization, identified a huge list of advantages and a few disadvantages, which can be compensated by using a cloud provider with recognized market action.
As you can conclude, virtualization has more advantages than disadvantages, because it ends up solving and facilitating many operations. But it is necessary to evaluate all aspects involved in virtualization to avoid crises. For example, the vulnerability or burning a physical host will all virtual machines vulnerable or unavailable, requiring disaster recovery plans. Should also analyze whether the virtual machines have the performance needed for critical operations.