Skip to contentSkip to conversation

KVM and VirtualBox in Xen Dom0

User Question Lukas Laukamp 3 participants 8 messages Sep 20, 2012

lore
Share & tools
lore
#0 lore raw

Hello all,

I have a simple user question but it's very technical and related to the Xen core. Does KVM and VirtualBox work in a Xen Dom0 with Xen 4.2? So I would like to create a VM Host for deploying VM templates which are compatible to the most solutions and host systems and I think that Xen, KVM/QEmu and VirtualBox are the best choice for this.

Would be great when this is possible or could be implemented. Hope that someone can give me an answer.

Best Regards

PS: Sorry für my bed english

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 9 lines · Lukas Laukamp

Hello all,

I have a simple user question but it's very technical and related to the Xen core. Does KVM and VirtualBox work in a Xen Dom0 with Xen 4.2? So I would like to create a VM Host for deploying VM templates which are compatible to the most solutions and host systems and I think that Xen, KVM/QEmu and VirtualBox are the best choice for this.

Quoted 3 lines

Would be great when this is possible or could be implemented. Hope that someone can give me an answer.

Nope, KVM or VirtualBox won't work in Xen dom0.

But you can use Xen Nested Hardware Virtualization and run KVM/VirtualBox in Xen HVM guest. This is a "tech preview" currently.

-- Pasi

#2 lore raw

Am 2012-09-20 09:36, schrieb Pasi Kärkkäinen:

Quoted 14 lines · Lukas Laukamp
Quoted 9 lines

Hello all,

I have a simple user question but it's very technical and related to the Xen core. Does KVM and VirtualBox work in a Xen Dom0 with Xen 4.2? So I would like to create a VM Host for deploying VM templates which are compatible to the most solutions and host systems and I think that Xen, KVM/QEmu and VirtualBox are the best choice for this.

Quoted 3 lines

Would be great when this is possible or could be implemented. Hope that someone can give me an answer.

Quoted 7 lines

Nope, KVM or VirtualBox won't work in Xen dom0.

But you can use Xen Nested Hardware Virtualization and run KVM/VirtualBox in Xen HVM guest.
This is a "tech preview" currently.

-- Pasi

Hello,

ok, this would be possible with Xen 4.2? And would it be possible to implement something that KVM and VirtualBox work in a Xen Dom0? Is this a task for the Xen development or something for the Linux kernel,, KVM or VirtualBox?

Best Regards

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 21 lines · Lukas Laukamp

Am 2012-09-20 09:36, schrieb Pasi Kärkkäinen:

Quoted 20 lines · Lukas Laukamp
Quoted 9 lines

Hello all,

I have a simple user question but it's very technical and related to the Xen core. Does KVM and VirtualBox work in a Xen Dom0 with Xen 4.2? So I would like to create a VM Host for deploying VM templates which are compatible to the most solutions and host systems and I think that Xen, KVM/QEmu and VirtualBox are the best choice for this.

Quoted 3 lines

Would be great when this is possible or could be implemented. Hope that someone can give me an answer.

Nope, KVM or VirtualBox won't work in Xen dom0.

But you can use Xen Nested Hardware Virtualization and run KVM/VirtualBox in Xen HVM guest.
This is a "tech preview" currently.

Quoted 6 lines
Quoted 1 line

-- Pasi

Hello,

ok, this would be possible with Xen 4.2?

In Xen 4.2.0 I think Nested Virt should work on AMD CPUs,
but Intel CPUs require some additional patches that aren't yet in 4.2 branch.

Quoted 2 lines

And would it be possible to implement something that KVM and VirtualBox work in a Xen Dom0?

Why do you want to run them in dom0 ?

Quoted 3 lines

Is this a task for the Xen development or something for the Linux kernel,, KVM or VirtualBox?

I think it *might* be possible when Xen PVH (Hybrid) is merged to Xen 4.3, which basically allows running Xen dom0 in HVM container.

-- Pasi

#4 lore raw

Am 2012-09-20 09:52, schrieb Pasi Kärkkäinen:

Quoted 39 lines · Lukas Laukamp
Quoted 23 lines

Am 2012-09-20 09:36, schrieb Pasi Kärkkäinen:

Quoted 4 lines · Lukas Laukamp
Quoted 3 lines

Hello all,

I have a simple user question but it's very technical and related

to

Quoted 2 lines
Quoted 2 lines

the Xen core. Does KVM and VirtualBox work in a Xen Dom0 with Xen 4.2? So I would like to create a VM Host for deploying VM

templates

Quoted 14 lines
Quoted 7 lines

which are compatible to the most solutions and host systems and I think that Xen, KVM/QEmu and VirtualBox are the best choice for this.

Would be great when this is possible or could be implemented. Hope that someone can give me an answer.

Nope, KVM or VirtualBox won't work in Xen dom0.

But you can use Xen Nested Hardware Virtualization and run KVM/VirtualBox in Xen HVM guest.
This is a "tech preview" currently.

Quoted 6 lines
Quoted 1 line

-- Pasi

Hello,

ok, this would be possible with Xen 4.2?

In Xen 4.2.0 I think Nested Virt should work on AMD CPUs,
but Intel CPUs require some additional patches that aren't yet in 4.2 branch.

Quoted 2 lines

And would it be possible to implement something that KVM and VirtualBox work in a Xen Dom0?

Why do you want to run them in dom0 ?

Quoted 8 lines
Quoted 3 lines

Is this a task for the Xen development or something for the Linux kernel,, KVM or VirtualBox?

I think it *might* be possible when Xen PVH (Hybrid) is merged to Xen 4.3, which basically allows running Xen dom0 in HVM container.

-- Pasi

Hello,

I googled for xen Hybrid, but have question if I understand it correct. Now the Dom0 is a PV Guest. With Xen Hybrid the Dom0 can run as a HVM with PV features on the hypervisor. This would make it possible because of nested virtualization that KVM and VirtualBox run inside dom0 right?

And my second question would be: Is the aim of Xen hybrid to bring Dom0 support to more OSes?

Best Regards

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 5 lines · Lukas Laukamp
Quoted 5 lines

I think it *might* be possible when Xen PVH (Hybrid) is merged to Xen 4.3,
which basically allows running Xen dom0 in HVM container.

Quoted 7 lines
Quoted 1 line

-- Pasi

Hello,

I googled for xen Hybrid, but have question if I understand it correct. Now the Dom0 is a PV Guest.

Correct.

Quoted 2 lines

With Xen Hybrid the Dom0 can run as a HVM with PV features on the hypervisor.

PVH dom0 is basicly PV dom0 in HVM container. It's more PV than HVM.

Quoted 3 lines

This would make it possible because of nested virtualization that KVM and VirtualBox run inside dom0 right?

Yes, but PVH doesn't enable nested virt automatically, that'll require some extra patches.

Quoted 3 lines

And my second question would be: Is the aim of Xen hybrid to bring Dom0 support to more OSes?

The purpose of PVH dom0 is to be able to utilize HAP (Hardware Assisted Paging) in dom0, and also lowering syscall overhead for 64bit dom0.

So it's about optimizations.
See Mukesh's presentation about PVH/Hybrid from XenSummit North America 2012.

-- Pasi

#6 lore raw

Am 2012-09-20 10:37, schrieb Pasi Kärkkäinen:

Quoted 39 lines · Lukas Laukamp
Quoted 5 lines
Quoted 5 lines

I think it *might* be possible when Xen PVH (Hybrid) is merged to Xen 4.3,
which basically allows running Xen dom0 in HVM container.

Quoted 7 lines
Quoted 1 line

-- Pasi

Hello,

I googled for xen Hybrid, but have question if I understand it correct. Now the Dom0 is a PV Guest.

Correct.

Quoted 2 lines

With Xen Hybrid the Dom0 can run as a HVM with PV features on the hypervisor.

PVH dom0 is basicly PV dom0 in HVM container. It's more PV than HVM.

Quoted 3 lines

This would make it possible because of nested virtualization that KVM and VirtualBox run inside dom0 right?

Yes, but PVH doesn't enable nested virt automatically, that'll require some extra patches.

Quoted 3 lines

And my second question would be: Is the aim of Xen hybrid to bring Dom0 support to more OSes?

The purpose of PVH dom0 is to be able to utilize HAP (Hardware Assisted Paging)
in dom0, and also lowering syscall overhead for 64bit dom0.

So it's about optimizations.
See Mukesh's presentation about PVH/Hybrid from XenSummit North America 2012.

Quoted 7 lines

-- Pasi

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Hello,

thanks for our replies Fajar and Pasi. My questions are replied now. I thought it would be comfortable to have them all on one host, we will see whether it's possible in future with PVH.

Best Regards

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
In reply to Lukas Laukamp
Quoted 6 lines · Lukas Laukamp

And would it be possible to
implement something that KVM and VirtualBox work in a Xen Dom0?

Is this a
task for the Xen development or something for the Linux kernel,, KVM or VirtualBox?

Since it looks like you're a user and not a developer, I'd actually suggest you rethink your requirements and find ways to implement it using available solutions.

For example, you said you want to "create a VM Host for deploying VM templates which are compatible to the most solutions". If the templates are Linux, it's much easier to create one template that suits all. Some things to watch out for:
- disk driver. Ubuntu loads most disk driver by default, but for other distros (e.g. Centos) you might need to force drivers (xen front block driver, virtio, etc) to be included in initrd by modifying /etc/modprobe.conf or similar regardles which driver is currently active
- disk naming. Use LABEL or UUID whenever possible
- filesystem for /boot. To be safe, use a separate /boot partition, and use ext2/ext3, since some versions of pygrub do not support ext4.

If you follow that, you should be able to use the same image on virtualbox, vmware, xen PV (with vfb enabled) or HVM. If you need more help creating this template, xen-users will be a more appropriate place to ask.

Another option, if your machine is dedicated for this purpose, is to run native linux with kvm and virtualbox installed (you can have them both installed, just not used at the same time), and install xen inside a VM. That way you can still test everything except xen HVM.

Signature · 1 line
Fajar