Dropped BALLOON entries as suggested by Borislav Petkov. Tested.
This was tested only on Hetzner CX10 VPS. I don't know how recent KVM
server stuff they use.
Tests & reports from anybody else are appreciated.
I guess some of added options may be not strictly necessary or make not
that lot of sense as enabled by default, feel free to ask me to drop
some and test how it works.
Thanks.
---8<---
"make defconfig kvmconfig" is supposed to end up with usable kernel for
KVM guest. In practice, it won't work for e.g. Hetzner VPS (KVM-based)
unless you add these options.
Signed-off-by: Andrey Utkin <[email protected]>
---
arch/x86/configs/kvm_guest.config | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/configs/kvm_guest.config b/arch/x86/configs/kvm_guest.config
index f9affcc..9c78145 100644
--- a/arch/x86/configs/kvm_guest.config
+++ b/arch/x86/configs/kvm_guest.config
@@ -26,3 +26,8 @@ CONFIG_VIRTIO_NET=y
CONFIG_9P_FS=y
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
+CONFIG_SCSI_LOWLEVEL=y
+CONFIG_SCSI_VIRTIO=y
+CONFIG_VIRTIO_INPUT=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
--
2.8.1
On Sat, Apr 23, 2016 at 08:26:48PM +0300, Andrey Utkin wrote:
> Dropped BALLOON entries as suggested by Borislav Petkov. Tested.
>
> This was tested only on Hetzner CX10 VPS. I don't know how recent KVM
> server stuff they use.
> Tests & reports from anybody else are appreciated.
> I guess some of added options may be not strictly necessary or make not
> that lot of sense as enabled by default, feel free to ask me to drop
> some and test how it works.
> Thanks.
> ---8<---
> "make defconfig kvmconfig" is supposed to end up with usable kernel for
> KVM guest. In practice, it won't work for e.g. Hetzner VPS (KVM-based)
> unless you add these options.
>
> Signed-off-by: Andrey Utkin <[email protected]>
> ---
> arch/x86/configs/kvm_guest.config | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/x86/configs/kvm_guest.config b/arch/x86/configs/kvm_guest.config
> index f9affcc..9c78145 100644
> --- a/arch/x86/configs/kvm_guest.config
> +++ b/arch/x86/configs/kvm_guest.config
> @@ -26,3 +26,8 @@ CONFIG_VIRTIO_NET=y
> CONFIG_9P_FS=y
> CONFIG_NET_9P=y
> CONFIG_NET_9P_VIRTIO=y
> +CONFIG_SCSI_LOWLEVEL=y
> +CONFIG_SCSI_VIRTIO=y
> +CONFIG_VIRTIO_INPUT=y
> +CONFIG_VIRTIO_MMIO=y
> +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
> --
Frankly, I'm still not sure we want to do this. Apparently, virtio is
the way to go on kvm but it is not absolutely necessary to get a booting
guest.
Paolo, what do you think?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Sun, Apr 24, 2016 at 06:30:46PM +0200, Borislav Petkov wrote:
> Frankly, I'm still not sure we want to do this. Apparently, virtio is
> the way to go on kvm but it is not absolutely necessary to get a booting
> guest.
So current "make defconfig kvmconfig" works for you?
On Sun, Apr 24, 2016 at 10:57:37PM +0300, Andrey Utkin wrote:
> So current "make defconfig kvmconfig" works for you?
I don't do that - I do
make oldconfig
make kvmconfig
and the second one adds the options which are not set in my .config.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Sun, Apr 24, 2016 at 10:18:35PM +0200, Borislav Petkov wrote:
> On Sun, Apr 24, 2016 at 10:57:37PM +0300, Andrey Utkin wrote:
> > So current "make defconfig kvmconfig" works for you?
>
> I don't do that - I do
>
> make oldconfig
> make kvmconfig
>
> and the second one adds the options which are not set in my .config.
Could you please test "make defconfig kvmconfig" how it boots?
The point of my patch is to enable user to end up with working kernel
for KVM guest without previously having any config, and without having
to configure anything manually.
On Sun, Apr 24, 2016 at 11:35:53PM +0300, Andrey Utkin wrote:
> Could you please test "make defconfig kvmconfig" how it boots?
> The point of my patch is to enable user to end up with working kernel
> for KVM guest without previously having any config,
That doesn't work as you need to control the qemu options too.
The purpose of kvmconfig is to give you the bare minimum and thus
to save you a lot of time wasted searching for all those options in
Kconfig. You'd still need to tweak your guest kernel .config after that.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Sun, Apr 24, 2016 at 10:51:29PM +0200, Borislav Petkov wrote:
> On Sun, Apr 24, 2016 at 11:35:53PM +0300, Andrey Utkin wrote:
> > Could you please test "make defconfig kvmconfig" how it boots?
> > The point of my patch is to enable user to end up with working kernel
> > for KVM guest without previously having any config,
>
> That doesn't work as you need to control the qemu options too.
Could you please point, which ones?
I haven't changed any, and yet my host is running fine.
> The purpose of kvmconfig is to give you the bare minimum and thus
> to save you a lot of time wasted searching for all those options in
> Kconfig. You'd still need to tweak your guest kernel .config after that.
IMO current kvmconfig doesn't fulfill this purpose, because trying
- "make defconfig kvmconfig"
- "make localmodconfig kvmconfig"
- "gunzip -c /proc/config.gz > .config && make olddefconfig" (rescue
system had way too old kernel I guess)
didn't save me a lot of hours wasted searching for all those options to
make it boot.
IMO "bare minimum" term makes sense if it boots. If it doesn't, then
"bare minimum" for what we are talking about?
Borislav, could you please tell, which options from this patch are you
using in your configs? Sorry to bother you.
Thank you for your interest.
On Mon, Apr 25, 2016 at 03:49:04AM +0300, Andrey Utkin wrote:
> IMO "bare minimum" term makes sense if it boots.
Boots where? On every system? You know that won't fly.
This bare minimum is trying to be of help only. No one says you should
be able to boot *every* guest kernel config with this.
For example, if your guest root fs image is ext4, then you must enable
ext4 support in the guest kernel. But that doesn't mean we need to carry
everything in kvmconfig. If we did, then we don't need it at all -
people can simply do "make allmodconfig" and have it all.
The idea of kvmconfig is to OR in the bare minimum of options into your
current .config and thus make the kernel more useful when booted as a
kvm guest - you'd still need to go and adjust it to your particular qemu
invocation.
In any case, here's how I'm booting my guests. You can see, for example,
that I'm using rtl8139 nic in the guest and for that I have it enabled
in my guest kernel .config.
$ qemu-system-x86_64
-enable-kvm
-gdb tcp::1234
-cpu Opteron_G5
-m 2048
-hda /home/boris/kvm/debian/sid-x86_64.img
-boot menu=off,order=c
-localtime
-net nic,model=rtl8139,macaddr=12:34:56:78:12:34
-net user,hostfwd=tcp::1235-:22
-usbdevice tablet
-kernel /home/boris/kernel/linux-2.6/arch/x86/boot/bzImage
-append "root=/dev/sda1 resume=/dev/sdb1 debug ignore_loglevel log_buf_len=16M earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0 "
-monitor pty
-soundhw hda
-serial file:/home/boris/kvm/test-x86_64-1235.log
-snapshot
-smp 8
-virtfs local,path=/tmp,mount_tag=tmp,security_model=none
HTH.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.