Skip to contentSkip to conversation

linux next: Native Linux KVM tool inclusion request

DISCUSSION Sasha Levin 5 participants 11 messages Aug 22, 2011 – Aug 24, 2011 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hello Stephen,

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

The branch is named 'master' and is located in:

git://github.com/penberg/linux-kvm.git

Thanks!

Signature · 1 line
Sasha.
#1 lore raw
Quoted 4 lines · Sasha Levin

Hello Stephen,

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

What has changed over the last rejection of it? Again, I'm not against the tool, but there is no reason to throw it into the kernel tree with a completely misleading name.

#2 lore raw
Quoted 2 lines · Sasha Levin
Quoted 2 lines

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

Quoted 3 lines · Christoph Hellwig

What has changed over the last rejection of it?  Again, I'm not against the tool, but there is no reason to throw it into the kernel tree with a completely misleading name.

Linus didn't reject it but postponed his decision to the next merge window. We're going to send a pull request for 3.2 so we'd like the code to be in linux-next.

As for changes, we've implemented rootfs over 9p with "kvm run" booting to host filesystem "/bin/sh" by default. It still needs some work and we hope to enable networking too. We also have patches to use overlayfs so that the guest is able to use host filesystem in copy-on-write manner.

Pekka

#3 lore raw

Hi all,

Quoted 14 lines · On Tue, 23 Aug 2011 08:08:02 +0300 Pekka Enberg <[email protected]> wrote:
Quoted 2 lines · Sasha Levin
Quoted 2 lines

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

Quoted 3 lines · Christoph Hellwig

What has changed over the last rejection of it?  Again, I'm not against the tool, but there is no reason to throw it into the kernel tree with a completely misleading name.

Linus didn't reject it but postponed his decision to the next merge window. We're going to send a pull request for 3.2 so we'd like the code to be in linux-next.

Quoted 5 lines

As for changes, we've implemented rootfs over 9p with "kvm run" booting to host filesystem "/bin/sh" by default. It still needs some work and we hope to enable networking too. We also have patches to use overlayfs so that the guest is able to use host filesystem in copy-on-write manner.

I will add this to linux-next tomorrow unless people object by then.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#4 lore raw
Quoted 1 line · Stephen Rothwell

I will add this to linux-next tomorrow unless people object by then.

Thanks. The code won't cause harm to anyone as it's all under tools/kvm and doesn't affect people who don't want to use it.

Pekka

#9 lore raw
In reply to Sasha Levin

Hi Sasha,

Quoted 7 lines · On Mon, 22 Aug 2011 23:29:20 +0300 Sasha Levin <[email protected]> wrote:

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

The branch is named 'master' and is located in:

git://github.com/penberg/linux-kvm.git

I have included your tree from today and called it "kvmtool". I have you and Pekka currently listed as teh contacts (since it looks like it is his tree on github). Please consider adding a MAINTAINERS entry for this.

Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgment of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window.

You will need to ensure that the patches/commits in your tree/series have been:
* submitted under GPL v2 (or later) and include the Contributor's Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary.

Signature · 15 lines
Cheers,
Stephen Rothwell 
[email protected]

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.
#10 lore raw
Quoted 29 lines · Stephen Rothwell

Hi Sasha,

Quoted 7 lines · On Mon, 22 Aug 2011 23:29:20 +0300 Sasha Levin <[email protected]> wrote:

I would like to ask you to include the Native Linux KVM tool in the linux-next tree.

The branch is named 'master' and is located in:

git://github.com/penberg/linux-kvm.git

I have included your tree from today and called it "kvmtool". I have you and Pekka currently listed as teh contacts (since it looks like it is his tree on github). Please consider adding a MAINTAINERS entry for this.

Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgment of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window.

You will need to ensure that the patches/commits in your tree/series have been:
* submitted under GPL v2 (or later) and include the Contributor's Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.

Quoted 3 lines

Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary.

Thank you for the inclusion.

We will add a MAINTAINERS file.

Signature · 1 line
Sasha.
#5 lore raw
In reply to Pekka Enberg
Quoted 2 lines · Pekka Enberg

As for changes, we've implemented rootfs over 9p with "kvm run" booting to host filesystem "/bin/sh" by default.

Isn't this dangerous? Users expect virtualization to land them in sandbox, but here an rm -rf / in the guest will happily junk the host filesystem.

Quoted 5 lines

It still needs some
work and we hope to enable networking too. We also have patches to use overlayfs so that the guest is able to use host filesystem in copy-on-write manner.

Still dangerous (but just to the guest), since it's not a true snapshot. If the host filesystem changes underneath the guest, it will see partial and incoherent updates. Copy-on-write only works if the host filesystem doesn't change.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#6 lore raw
Quoted 5 lines · Avi Kivity
Quoted 2 lines · Pekka Enberg

As for changes, we've implemented rootfs over 9p with "kvm run" booting to host filesystem "/bin/sh" by default.

Isn't this dangerous? Users expect virtualization to land them in sandbox, but here an rm -rf / in the guest will happily junk the host filesystem.

Not really because I never run the tool as root. However, you're right that we should not default to /bin/sh if you're root.

Quoted 6 lines
Quoted 4 lines

It still needs some
work and we hope to enable networking too. We also have patches to use overlayfs so that the guest is able to use host filesystem in copy-on-write manner.

Still dangerous (but just to the guest), since it's not a true snapshot. If the host filesystem changes underneath the guest, it will see partial and incoherent updates. Copy-on-write only works if the host filesystem doesn't change.

That's a generic problem with overlayfs based solutions, isn't it? We're planning to use copy-on-write only on files that aren't supposed to change that often - like /usr and /lib. I suppose we should force shared files to be read-only in the guest.

Pekka

#7 lore raw
Quoted 9 lines · Pekka Enberg
Quoted 5 lines · Avi Kivity
Quoted 2 lines · Pekka Enberg

As for changes, we've implemented rootfs over 9p with "kvm run" booting to host filesystem "/bin/sh" by default.

Isn't this dangerous? Users expect virtualization to land them in sandbox, but here an rm -rf / in the guest will happily junk the host filesystem.

Not really because I never run the tool as root. However, you're right that we should not default to /bin/sh if you're root.

Well, just trashing /home/penberg would be bad too, no? (my recent experience indicates it's not that catastrophic - anything important sits on a server somewhere and the local data is just a cache).

Quoted 6 lines
Quoted 2 lines

Still dangerous (but just to the guest), since it's not a true snapshot. If the host filesystem changes underneath the guest, it will see partial and incoherent updates. Copy-on-write only works if the host filesystem doesn't change.

That's a generic problem with overlayfs based solutions, isn't it? We're planning to use copy-on-write only on files that aren't supposed to change that often - like /usr and /lib.

So the guest won't see bad data that often?

Overlay works fine if the host tree is readonly. So if you have a separate tree for guests, you can share it with any number of them. Just don't share the host root.

Note this probably isn't a problem booting to /bin/bash, just booting a full-featured guest with package management and other database-like apps that expect exclusive control over their data.

Quoted 3 lines

I suppose we should force shared files to be read-only in the guest.

Yes, that's safer.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#8 lore raw
Quoted 1 line · Avi Kivity

Well, just trashing /home/penberg would be bad too, no? (my recent experience indicates it's not that catastrophic - anything important sits on a server somewhere and the local data is just a cache).

Sure. We actually are planning something like this:

Private to guest:

/dev
/etc
/home
/proc
/sys
/var

Shared from host rootfs:

/bin
/lib
/sbin
/usr

Full host rootfs mounted at:

/host/

And no, we're not planning to boot full distro init. The only thing we really want in addition to /bin/sh is to enable networking.

Pekka