How to enable nested virtualization in ubuntu

Multi tool use
I would like to do some lib testing on my OS. So I need several environment to run KVM. And I found my guest machine was not able to run KVM.
I was using virtualbox 4.2.
virtualbox virtualization
add a comment |
I would like to do some lib testing on my OS. So I need several environment to run KVM. And I found my guest machine was not able to run KVM.
I was using virtualbox 4.2.
virtualbox virtualization
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37
add a comment |
I would like to do some lib testing on my OS. So I need several environment to run KVM. And I found my guest machine was not able to run KVM.
I was using virtualbox 4.2.
virtualbox virtualization
I would like to do some lib testing on my OS. So I need several environment to run KVM. And I found my guest machine was not able to run KVM.
I was using virtualbox 4.2.
virtualbox virtualization
virtualbox virtualization
asked Aug 5 '13 at 2:22
王子1986王子1986
1,30051829
1,30051829
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37
add a comment |
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37
add a comment |
2 Answers
2
active
oldest
votes
KVM requires VT-X/AMD-V, but VirtualBox does not pass VT-X/AMD-V to the guest operating system.
Therefore, KVM can't run in VirtualBox (yet). Please track bug ticket #4032.
VT-X and AMD-V (so-called virtualization extensions) run the guest operating system natively in the CPU. Without them, the virtualization software must interpret the operating system opcodes in software, which is very slow.
For now, you can either
- run KVM inside a hypervisor which passes virtualization extensions to the guest (e.g. KVM inside VMware Workstation 8), or
- run another hypervisor inside VirtualBox (e.g. VirtualBox inside VirtualBox).
This option will be very slow, because the guest will miss VT-X/AMD-V.
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
command to check if your CPU support KVM:egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.
– Woeitg
Feb 3 '17 at 10:07
add a comment |
Virtualbox just released (12/18/2018) version 6 in which is expected to have nested virtualization. However, at this moment it seems is still unavailable on Intel procs.
https://www.virtualbox.org/wiki/Downloads
Regarding the main question (Enable nested virtualization in Ubuntu) - KVM module is supporting nested virtualization on Ubuntu 16 and above (maybe lower versions too). Not sure about using XEN on host, but you can nest XEN in KVM for sure.
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f328748%2fhow-to-enable-nested-virtualization-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
KVM requires VT-X/AMD-V, but VirtualBox does not pass VT-X/AMD-V to the guest operating system.
Therefore, KVM can't run in VirtualBox (yet). Please track bug ticket #4032.
VT-X and AMD-V (so-called virtualization extensions) run the guest operating system natively in the CPU. Without them, the virtualization software must interpret the operating system opcodes in software, which is very slow.
For now, you can either
- run KVM inside a hypervisor which passes virtualization extensions to the guest (e.g. KVM inside VMware Workstation 8), or
- run another hypervisor inside VirtualBox (e.g. VirtualBox inside VirtualBox).
This option will be very slow, because the guest will miss VT-X/AMD-V.
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
command to check if your CPU support KVM:egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.
– Woeitg
Feb 3 '17 at 10:07
add a comment |
KVM requires VT-X/AMD-V, but VirtualBox does not pass VT-X/AMD-V to the guest operating system.
Therefore, KVM can't run in VirtualBox (yet). Please track bug ticket #4032.
VT-X and AMD-V (so-called virtualization extensions) run the guest operating system natively in the CPU. Without them, the virtualization software must interpret the operating system opcodes in software, which is very slow.
For now, you can either
- run KVM inside a hypervisor which passes virtualization extensions to the guest (e.g. KVM inside VMware Workstation 8), or
- run another hypervisor inside VirtualBox (e.g. VirtualBox inside VirtualBox).
This option will be very slow, because the guest will miss VT-X/AMD-V.
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
command to check if your CPU support KVM:egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.
– Woeitg
Feb 3 '17 at 10:07
add a comment |
KVM requires VT-X/AMD-V, but VirtualBox does not pass VT-X/AMD-V to the guest operating system.
Therefore, KVM can't run in VirtualBox (yet). Please track bug ticket #4032.
VT-X and AMD-V (so-called virtualization extensions) run the guest operating system natively in the CPU. Without them, the virtualization software must interpret the operating system opcodes in software, which is very slow.
For now, you can either
- run KVM inside a hypervisor which passes virtualization extensions to the guest (e.g. KVM inside VMware Workstation 8), or
- run another hypervisor inside VirtualBox (e.g. VirtualBox inside VirtualBox).
This option will be very slow, because the guest will miss VT-X/AMD-V.
KVM requires VT-X/AMD-V, but VirtualBox does not pass VT-X/AMD-V to the guest operating system.
Therefore, KVM can't run in VirtualBox (yet). Please track bug ticket #4032.
VT-X and AMD-V (so-called virtualization extensions) run the guest operating system natively in the CPU. Without them, the virtualization software must interpret the operating system opcodes in software, which is very slow.
For now, you can either
- run KVM inside a hypervisor which passes virtualization extensions to the guest (e.g. KVM inside VMware Workstation 8), or
- run another hypervisor inside VirtualBox (e.g. VirtualBox inside VirtualBox).
This option will be very slow, because the guest will miss VT-X/AMD-V.
answered Aug 6 '13 at 9:50
ignisignis
3,2731924
3,2731924
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
command to check if your CPU support KVM:egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.
– Woeitg
Feb 3 '17 at 10:07
add a comment |
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
command to check if your CPU support KVM:egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.
– Woeitg
Feb 3 '17 at 10:07
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
what about the possibility to run it in the host? e.g. share the folders he wants to test in his guest, and run say android emulation on the host? how is the performance of that?
– Toskan
Aug 12 '15 at 7:20
3
3
command to check if your CPU support KVM:
egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.– Woeitg
Feb 3 '17 at 10:07
command to check if your CPU support KVM:
egrep -c "(svm|vmx)" /proc/cpuinfo
. 0 means no.– Woeitg
Feb 3 '17 at 10:07
add a comment |
Virtualbox just released (12/18/2018) version 6 in which is expected to have nested virtualization. However, at this moment it seems is still unavailable on Intel procs.
https://www.virtualbox.org/wiki/Downloads
Regarding the main question (Enable nested virtualization in Ubuntu) - KVM module is supporting nested virtualization on Ubuntu 16 and above (maybe lower versions too). Not sure about using XEN on host, but you can nest XEN in KVM for sure.
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
add a comment |
Virtualbox just released (12/18/2018) version 6 in which is expected to have nested virtualization. However, at this moment it seems is still unavailable on Intel procs.
https://www.virtualbox.org/wiki/Downloads
Regarding the main question (Enable nested virtualization in Ubuntu) - KVM module is supporting nested virtualization on Ubuntu 16 and above (maybe lower versions too). Not sure about using XEN on host, but you can nest XEN in KVM for sure.
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
add a comment |
Virtualbox just released (12/18/2018) version 6 in which is expected to have nested virtualization. However, at this moment it seems is still unavailable on Intel procs.
https://www.virtualbox.org/wiki/Downloads
Regarding the main question (Enable nested virtualization in Ubuntu) - KVM module is supporting nested virtualization on Ubuntu 16 and above (maybe lower versions too). Not sure about using XEN on host, but you can nest XEN in KVM for sure.
Virtualbox just released (12/18/2018) version 6 in which is expected to have nested virtualization. However, at this moment it seems is still unavailable on Intel procs.
https://www.virtualbox.org/wiki/Downloads
Regarding the main question (Enable nested virtualization in Ubuntu) - KVM module is supporting nested virtualization on Ubuntu 16 and above (maybe lower versions too). Not sure about using XEN on host, but you can nest XEN in KVM for sure.
edited Jan 7 at 0:39
answered Dec 19 '18 at 10:20


George BungarzescuGeorge Bungarzescu
213
213
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
add a comment |
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
You can "activate" nested virtualization using: vboxmanage modifyvm yournestedvmname --nested-hw-virt on , or by adding <NestedHWVirt enabled="true"/> in CPU section of your .vbox file, but the only effect will be, the activation of the coresponding checkbox on the UI. cat /proc/cpuinfo on guest, still no vmx.
– George Bungarzescu
Dec 19 '18 at 10:49
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f328748%2fhow-to-enable-nested-virtualization-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
kmNy3kX,AAuk ynhdW avQ yp ehC i1BKZ r4hna5Il8UPV4D fBf,3tWoEwW,rhhyRPIEhIW6j3Suu5,y,QQAh2Jr
Not sure they're appropriate replacements, but I want to mention user-mode linux (more links) - LXC (Linux Containers) - chroot - Linux namespaces (supported from kernel 3.8 upwards)
– ignis
Aug 6 '13 at 9:37