Virtual machines are part of virtualization environments. A container, on the other hand, is a specific kind of virtualization strategy that offers its own benefits and disadvantages in different kinds of virtualization platforms, including hosted networks and cloud computing systems.
Virtualization experts talk about "container virtualization" or "operating system virtualization" as an alternative to what some call traditional hypervisor-based virtualization. What’s the difference? In hypervisor-based virtualization, the system emulates the hardware; a software system creates individual computers instead of networking physical computers together. One way that experts talk about this is that hypervisor-based systems require communications to work just like they would between physical machines; in other words, these virtual hardware pieces don’t share anything that a physical machine wouldn’t share with another, except for a generalized resource environment.
With container virtualization, virtualization is done at the operating system level instead of at the hardware level. Individual instances share parts of the kernel, so data gets routed differently.
Lots of IT people are looking at container virtualization because of its ability to provide denser environments than hypervisor virtualization. Some talk about it as a "cheap" way of doing host environments. Engineers can choose to deploy containers in various ways, for example, through open-source platforms such as OpenStack. However, some contend that container virtualization is sometimes less scalable or flexible than traditional methods.