<p>Container virtualization with Linux is a combination of kernel features, namespaces and cgroups, used to run an application in a sandbox. Each application has it's own filesystem, network stack, pid namespace, etc, but runs on the same OS kernel as the host. From the host you can see the processes running, but from inside the sandbox, all you can see is your application. It is designed for managing server side applications.</p>

<p>Application virtualization is very similar to container virtualization, and the lines are a bit fuzzy to me. In the context of something like Flatpak, it is using the same namespaces and cgroups you see with container tools like docker. The key difference is they have designed the tool for desktop use cases, meaning tools that are designed to be accessed with a local GUI, rather than running remotely as something like a web server.</p>

<p>Emulation is a way to run programs designed for another OS. You typically cannot run a Windows binary on a Linux system and vice versa, the OS kernels are very different, the binary formats are different, they're effectively speaking different languages. The emulation layer provides a translation to run non-native programs on the local machine without creating an entire virtual machine and running a separate OS. This is very different from the container and application virtualization where you run native OS applications on a shared OS kernel.</p>

CC BY-SA 4.0
2019-02-03T17:18:39.500Z
Thanks. In the wikipedia link for application virtualization https://en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?
Tim
CC BY-SA 4.0
2019-02-03T02:28:13.833Z
2019-02-03T02:28:13.833Z
BMitch
<p>As often, the vocabulary is overloaded, and the limits between technologies are somewhat fuzzy.</p>

<p>As a complement to the BMitch's answer, in my understanding, <em>emulation</em> is a way to run an application designed for another <a href="https://en.wikipedia.org/wiki/Instruction_set_architecture" rel="nofollow noreferrer">instruction set architecture</a>. For example, it allows to run an ARM software on an x86 host. QEMU virtual machines are designed for ISA emulation.</p>

<p>Running x86 Windows application on x86 Linux using Wine<sup>1</sup>, or x86 Linux app on x86 Solaris using an <a href="https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/6mhahupda/index.html" rel="nofollow noreferrer">lx branded zone</a> does not require ISA emulation since that application and the host are using is the same instruction set. Only the system calls needs to be "emulated", not the processor. Sometimes we call that <a href="http://www.informit.com/articles/article.aspx?p=659522" rel="nofollow noreferrer">system call translation</a>. It is the role of the <strong>compatibility layer</strong> to perform the needed translations as transparently as possible for the guest application.</p>

<p><hr>
<sup>1</sup><sub> Actually the <em>Wine</em> name was dubbed as a backronym for "Wine Is Not an Emulator"</sub></p>

CC BY-SA 4.0
2019-02-03T17:19:05.527Z
Thanks. In the wikipedia link for application virtualization https://en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?
Tim
CC BY-SA 4.0
2019-02-03T21:35:43.490Z
I usually categorize Wine as an application virtualization solution. As shameless self-promotion (spam?), I briefly mention that on a slide in one of my online videos https://youtu.be/E_A9j9VW9qQ?t=397
Sylvain Leroux
CC BY-SA 4.0
2019-02-03T10:49:56.673Z
2019-02-03T10:49:56.673Z
Sylvain Leroux
<p>What are the differences and relations between <a href="https://en.wikipedia.org/wiki/Application_virtualization" rel="nofollow noreferrer">application virtualization</a> (such as Flatpak), <a href="https://en.wikipedia.org/wiki/Compatibility_layer" rel="nofollow noreferrer">emulation layer</a> (such as wine, cygwin), and <a href="https://en.wikipedia.org/wiki/Operating-system-level_virtualization" rel="nofollow noreferrer">container virtualization</a> (such as Docker)? </p>

<p>I have been trying to figure them out, but always end up not catching the main points. Especially the fundamental differences between their virutalization levels.</p>

CC BY-SA 4.0
2019-02-02T23:45:12.967Z
Two of your links point to the [Operating system virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) Wikipedia page. I didn't edit your question because I wasn't sure, but I suppose you intended to use https://en.wikipedia.org/wiki/Application_virtualization instead or weren't you?
Sylvain Leroux
<docker><virtualization>
What are the differences between application virtualization, emulation layer, and container virtualization?
Tim
# What are the differences between application virtualization, emulation layer, and container virtualization?

(Asked by: username_0 on 2019-02-02)

What are the differences and relations between [application virtualization](https://en.wikipedia.org/wiki/Application_virtualization) (such as Flatpak), [emulation layer](https://en.wikipedia.org/wiki/Compatibility_layer) (such as wine, cygwin), and [container virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) (such as Docker)?

I have been trying to figure them out, but always end up not catching the main points. Especially the fundamental differences between their virutalization levels.

**Tags:** docker, virtualization

> **Comments:**
> **username_1**: Two of your links point to the [Operating system virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) Wikipedia page. I didn't edit your question because I wasn't sure, but I suppose you intended to use https://en.wikipedia.org/wiki/Application_virtualization instead or weren't you?  

---

## 2 answers

### Answer by username_2 on 2019-02-03. Score: 4

Container virtualization with Linux is a combination of kernel features, namespaces and cgroups, used to run an application in a sandbox. Each application has it's own filesystem, network stack, pid namespace, etc, but runs on the same OS kernel as the host. From the host you can see the processes running, but from inside the sandbox, all you can see is your application. It is designed for managing server side applications.

Application virtualization is very similar to container virtualization, and the lines are a bit fuzzy to me. In the context of something like Flatpak, it is using the same namespaces and cgroups you see with container tools like docker. The key difference is they have designed the tool for desktop use cases, meaning tools that are designed to be accessed with a local GUI, rather than running remotely as something like a web server.

Emulation is a way to run programs designed for another OS. You typically cannot run a Windows binary on a Linux system and vice versa, the OS kernels are very different, the binary formats are different, they're effectively speaking different languages. The emulation layer provides a translation to run non-native programs on the local machine without creating an entire virtual machine and running a separate OS. This is very different from the container and application virtualization where you run native OS applications on a shared OS kernel.

> **Comments:**
> **username_0**: Thanks. In the wikipedia link for application virtualization https://en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?  

---

### Answer by username_1 on 2019-02-03. Score: 1

As often, the vocabulary is overloaded, and the limits between technologies are somewhat fuzzy.

As a complement to the username_2's answer, in my understanding, *emulation* is a way to run an application designed for another [instruction set architecture](https://en.wikipedia.org/wiki/Instruction_set_architecture). For example, it allows to run an ARM software on an x86 host. QEMU virtual machines are designed for ISA emulation.

Running x86 Windows application on x86 Linux using Wine1, or x86 Linux app on x86 Solaris using an [lx branded zone](https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/6mhahupda/index.html) does not require ISA emulation since that application and the host are using is the same instruction set. Only the system calls needs to be "emulated", not the processor. Sometimes we call that [system call translation](http://www.informit.com/articles/article.aspx?p=659522). It is the role of the **compatibility layer** to perform the needed translations as transparently as possible for the guest application.

---

1 Actually the *Wine* name was dubbed as a backronym for "Wine Is Not an Emulator"

> **Comments:**
> **username_0**: Thanks. In the wikipedia link for application virtualization https://en.wikipedia.org/wiki/Application_virtualization, it says "Application virtualization allows applications to run in environments that do not suit the native application. For example, Wine allows some Microsoft Windows applications to run on Linux. " Does it imply that wine is application virtualization in what sense?  
> **username_1**: I usually categorize Wine as an application virtualization solution. As shameless self-promotion (spam?), I briefly mention that on a slide in one of my online videos https://youtu.be/E_A9j9VW9qQ?t=397  

---

