How come OS X allows multiple virtualization software at the same time while other systems don't?











up vote
0
down vote

favorite












I was surprised to experience that VirtualBox and docker's HyperKit can run VMs at the same time on OS X. Using different hypervisors at the same is not possible on Windows or Linux. How come it works on OS X?










share|improve this question













migrated from serverfault.com Nov 21 at 11:31


This question came from our site for system and network administrators.











  • 1




    You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
    – lx07
    Nov 21 at 11:40










  • Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
    – Ramhound
    Nov 21 at 14:01










  • Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
    – Tarnay Kálmán
    Nov 21 at 14:17










  • @lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
    – Tarnay Kálmán
    Nov 21 at 14:22

















up vote
0
down vote

favorite












I was surprised to experience that VirtualBox and docker's HyperKit can run VMs at the same time on OS X. Using different hypervisors at the same is not possible on Windows or Linux. How come it works on OS X?










share|improve this question













migrated from serverfault.com Nov 21 at 11:31


This question came from our site for system and network administrators.











  • 1




    You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
    – lx07
    Nov 21 at 11:40










  • Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
    – Ramhound
    Nov 21 at 14:01










  • Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
    – Tarnay Kálmán
    Nov 21 at 14:17










  • @lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
    – Tarnay Kálmán
    Nov 21 at 14:22















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I was surprised to experience that VirtualBox and docker's HyperKit can run VMs at the same time on OS X. Using different hypervisors at the same is not possible on Windows or Linux. How come it works on OS X?










share|improve this question













I was surprised to experience that VirtualBox and docker's HyperKit can run VMs at the same time on OS X. Using different hypervisors at the same is not possible on Windows or Linux. How come it works on OS X?







virtualization hypervisor






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 at 11:21









Tarnay Kálmán

2,06152130




2,06152130




migrated from serverfault.com Nov 21 at 11:31


This question came from our site for system and network administrators.






migrated from serverfault.com Nov 21 at 11:31


This question came from our site for system and network administrators.










  • 1




    You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
    – lx07
    Nov 21 at 11:40










  • Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
    – Ramhound
    Nov 21 at 14:01










  • Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
    – Tarnay Kálmán
    Nov 21 at 14:17










  • @lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
    – Tarnay Kálmán
    Nov 21 at 14:22
















  • 1




    You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
    – lx07
    Nov 21 at 11:40










  • Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
    – Ramhound
    Nov 21 at 14:01










  • Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
    – Tarnay Kálmán
    Nov 21 at 14:17










  • @lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
    – Tarnay Kálmán
    Nov 21 at 14:22










1




1




You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
– lx07
Nov 21 at 11:40




You can run Hyper-V and VirtualBox 32bit (but not 64bit) VMs on Windows at the same time. What bitness were your VMs?
– lx07
Nov 21 at 11:40












Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
– Ramhound
Nov 21 at 14:01




Docker isn't actually considered a hypervisor. Docker requires a hypervisor to run. On Windows Hyper-V or VirtualBox can be used. On Linux or OSX it appears VirtualBox plays that roll.
– Ramhound
Nov 21 at 14:01












Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
– Tarnay Kálmán
Nov 21 at 14:17




Docker on Linux does not need a hypervisor as Linux namespaces are native to Linux, so no VM is needed. Docker For Mac uses HyperKit.
– Tarnay Kálmán
Nov 21 at 14:17












@lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
– Tarnay Kálmán
Nov 21 at 14:22






@lx07, both 64 bit. VirtualBox showed that it was using hardware virtualization. I can't tell if HyperKit was using it, but it should be using it according to an official Docker blog post ( blog.docker.com/2016/05/docker-unikernels-open-source ).
– Tarnay Kálmán
Nov 21 at 14:22












1 Answer
1






active

oldest

votes

















up vote
1
down vote













Let me try to answer this not-very-simple question.



There are two types of hypervisors, as summarized by
Wikipedia:




Type-1, native or bare-metal hypervisors



These hypervisors run directly on the host's hardware to control the
hardware and to manage guest operating systems. For this reason, they
are sometimes called bare metal hypervisors.



Type-2 or hosted hypervisors



These hypervisors run on a conventional operating system (OS) just as
other computer programs do.




Hyper-V is type 1, which means that it when installed becomes the computer.
Installing the Hyper-V feature in effect relegates the installed Windows version
to being just a virtual machine, which is however allocated 100% of the hardware
resources.



VirtualBox and VMWare for Windows are type 2, meaning that they work
under Windows as normal programs, where CPUs are emulated as threads,
so could in theory still run under a type 1 hypervisor such as Hyper-V.



The problem arises when hardware virtualization assistance is used for
the emulation of dissimilar CPUs, namely Intel VT-x and AMD-V.
Such hardware is required for emulating, for example, a 32-bit CPU
on a 64-bit computer.



Hardware virtualization can have only one owner (or user).
This means that only one hypervisor can use it at any one time and precludes
having two type 2 hypervisors running on the same computer.



In addition, specifically for the mentioned Docker, this is not a hypervisor.
As Wkipedia explains:




Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".




Docker does not do any CPU or device emulation, but supplies a thin layer
for translating containerized operating system calls to host
operating system calls. Containers are very limited in how much their
operating system can diverge form that of the host, as it must be similar
enough for simple and light translation of the calls.
Docker therefore doesn't conflict with hypervisors on hardware usage.






share|improve this answer





















  • Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
    – Tarnay Kálmán
    Nov 21 at 23:48












  • In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
    – Cameron Kerr
    Nov 22 at 8:58











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377255%2fhow-come-os-x-allows-multiple-virtualization-software-at-the-same-time-while-oth%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Let me try to answer this not-very-simple question.



There are two types of hypervisors, as summarized by
Wikipedia:




Type-1, native or bare-metal hypervisors



These hypervisors run directly on the host's hardware to control the
hardware and to manage guest operating systems. For this reason, they
are sometimes called bare metal hypervisors.



Type-2 or hosted hypervisors



These hypervisors run on a conventional operating system (OS) just as
other computer programs do.




Hyper-V is type 1, which means that it when installed becomes the computer.
Installing the Hyper-V feature in effect relegates the installed Windows version
to being just a virtual machine, which is however allocated 100% of the hardware
resources.



VirtualBox and VMWare for Windows are type 2, meaning that they work
under Windows as normal programs, where CPUs are emulated as threads,
so could in theory still run under a type 1 hypervisor such as Hyper-V.



The problem arises when hardware virtualization assistance is used for
the emulation of dissimilar CPUs, namely Intel VT-x and AMD-V.
Such hardware is required for emulating, for example, a 32-bit CPU
on a 64-bit computer.



Hardware virtualization can have only one owner (or user).
This means that only one hypervisor can use it at any one time and precludes
having two type 2 hypervisors running on the same computer.



In addition, specifically for the mentioned Docker, this is not a hypervisor.
As Wkipedia explains:




Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".




Docker does not do any CPU or device emulation, but supplies a thin layer
for translating containerized operating system calls to host
operating system calls. Containers are very limited in how much their
operating system can diverge form that of the host, as it must be similar
enough for simple and light translation of the calls.
Docker therefore doesn't conflict with hypervisors on hardware usage.






share|improve this answer





















  • Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
    – Tarnay Kálmán
    Nov 21 at 23:48












  • In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
    – Cameron Kerr
    Nov 22 at 8:58















up vote
1
down vote













Let me try to answer this not-very-simple question.



There are two types of hypervisors, as summarized by
Wikipedia:




Type-1, native or bare-metal hypervisors



These hypervisors run directly on the host's hardware to control the
hardware and to manage guest operating systems. For this reason, they
are sometimes called bare metal hypervisors.



Type-2 or hosted hypervisors



These hypervisors run on a conventional operating system (OS) just as
other computer programs do.




Hyper-V is type 1, which means that it when installed becomes the computer.
Installing the Hyper-V feature in effect relegates the installed Windows version
to being just a virtual machine, which is however allocated 100% of the hardware
resources.



VirtualBox and VMWare for Windows are type 2, meaning that they work
under Windows as normal programs, where CPUs are emulated as threads,
so could in theory still run under a type 1 hypervisor such as Hyper-V.



The problem arises when hardware virtualization assistance is used for
the emulation of dissimilar CPUs, namely Intel VT-x and AMD-V.
Such hardware is required for emulating, for example, a 32-bit CPU
on a 64-bit computer.



Hardware virtualization can have only one owner (or user).
This means that only one hypervisor can use it at any one time and precludes
having two type 2 hypervisors running on the same computer.



In addition, specifically for the mentioned Docker, this is not a hypervisor.
As Wkipedia explains:




Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".




Docker does not do any CPU or device emulation, but supplies a thin layer
for translating containerized operating system calls to host
operating system calls. Containers are very limited in how much their
operating system can diverge form that of the host, as it must be similar
enough for simple and light translation of the calls.
Docker therefore doesn't conflict with hypervisors on hardware usage.






share|improve this answer





















  • Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
    – Tarnay Kálmán
    Nov 21 at 23:48












  • In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
    – Cameron Kerr
    Nov 22 at 8:58













up vote
1
down vote










up vote
1
down vote









Let me try to answer this not-very-simple question.



There are two types of hypervisors, as summarized by
Wikipedia:




Type-1, native or bare-metal hypervisors



These hypervisors run directly on the host's hardware to control the
hardware and to manage guest operating systems. For this reason, they
are sometimes called bare metal hypervisors.



Type-2 or hosted hypervisors



These hypervisors run on a conventional operating system (OS) just as
other computer programs do.




Hyper-V is type 1, which means that it when installed becomes the computer.
Installing the Hyper-V feature in effect relegates the installed Windows version
to being just a virtual machine, which is however allocated 100% of the hardware
resources.



VirtualBox and VMWare for Windows are type 2, meaning that they work
under Windows as normal programs, where CPUs are emulated as threads,
so could in theory still run under a type 1 hypervisor such as Hyper-V.



The problem arises when hardware virtualization assistance is used for
the emulation of dissimilar CPUs, namely Intel VT-x and AMD-V.
Such hardware is required for emulating, for example, a 32-bit CPU
on a 64-bit computer.



Hardware virtualization can have only one owner (or user).
This means that only one hypervisor can use it at any one time and precludes
having two type 2 hypervisors running on the same computer.



In addition, specifically for the mentioned Docker, this is not a hypervisor.
As Wkipedia explains:




Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".




Docker does not do any CPU or device emulation, but supplies a thin layer
for translating containerized operating system calls to host
operating system calls. Containers are very limited in how much their
operating system can diverge form that of the host, as it must be similar
enough for simple and light translation of the calls.
Docker therefore doesn't conflict with hypervisors on hardware usage.






share|improve this answer












Let me try to answer this not-very-simple question.



There are two types of hypervisors, as summarized by
Wikipedia:




Type-1, native or bare-metal hypervisors



These hypervisors run directly on the host's hardware to control the
hardware and to manage guest operating systems. For this reason, they
are sometimes called bare metal hypervisors.



Type-2 or hosted hypervisors



These hypervisors run on a conventional operating system (OS) just as
other computer programs do.




Hyper-V is type 1, which means that it when installed becomes the computer.
Installing the Hyper-V feature in effect relegates the installed Windows version
to being just a virtual machine, which is however allocated 100% of the hardware
resources.



VirtualBox and VMWare for Windows are type 2, meaning that they work
under Windows as normal programs, where CPUs are emulated as threads,
so could in theory still run under a type 1 hypervisor such as Hyper-V.



The problem arises when hardware virtualization assistance is used for
the emulation of dissimilar CPUs, namely Intel VT-x and AMD-V.
Such hardware is required for emulating, for example, a 32-bit CPU
on a 64-bit computer.



Hardware virtualization can have only one owner (or user).
This means that only one hypervisor can use it at any one time and precludes
having two type 2 hypervisors running on the same computer.



In addition, specifically for the mentioned Docker, this is not a hypervisor.
As Wkipedia explains:




Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".




Docker does not do any CPU or device emulation, but supplies a thin layer
for translating containerized operating system calls to host
operating system calls. Containers are very limited in how much their
operating system can diverge form that of the host, as it must be similar
enough for simple and light translation of the calls.
Docker therefore doesn't conflict with hypervisors on hardware usage.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 21 at 16:01









harrymc

248k10257546




248k10257546












  • Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
    – Tarnay Kálmán
    Nov 21 at 23:48












  • In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
    – Cameron Kerr
    Nov 22 at 8:58


















  • Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
    – Tarnay Kálmán
    Nov 21 at 23:48












  • In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
    – Cameron Kerr
    Nov 22 at 8:58
















Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
– Tarnay Kálmán
Nov 21 at 23:48






Hi, thanks for the explanation of type 1 and type 2. I understand that Docker is not a hypervisor. OS X's kernel is so dissimilar from Linux, that Docker containers cannot run directly on it, so Docker For Mac is using a Linux VM behind the scenes by default, this VM is run using HyperKit which in turn uses Hypervisor.framework, which requires VT-x (so hardware virtualization assistance?).
– Tarnay Kálmán
Nov 21 at 23:48














In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
– Cameron Kerr
Nov 22 at 8:58




In addition, there are aspects such as network integration, hardware acceleration, memory management and sharing and other sharing (eg. shared folders, clipboard) that can occasionally get in the way when operating VMs from multiple hypervisors concurrently, so even it it seems to work, likely it will not be supported by the vendor.
– Cameron Kerr
Nov 22 at 8:58


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377255%2fhow-come-os-x-allows-multiple-virtualization-software-at-the-same-time-while-oth%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕