Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


SolusVM KVM - Change VM Kernels on the fly
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

SolusVM KVM - Change VM Kernels on the fly

xavconxavcon Member
edited December 2015 in General

Hello Guys,

I was wondering if someone knows a way to change linux based kvm guests in solusvm kernel on the fly just like digitaloceans feature? How are they acheiving that?

If there is a way then I could code a custom wrapper using solusvm api etc.

Thanks

Comments

  • anything guys? :/

  • @jarland you accessed the deep dark code of DO?

    Thanked by 1GCat
  • jarjar Patron Provider, Top Host, Veteran
    edited December 2015

    It's much better to let the VM control the kernel itself internally. Keep in mind that changing kernels in a control panel and loading it external to the VM's grub instance itself, as we have done, does not install the kernel on the system. You'd need access to their system to do that, and that wouldn't go over well.

    Honestly, in my DO interview I asked "Why did you do that?" I much prefer what we're doing with Ubuntu 15, Debian 8, FreeBSD, and CoreOS, which is allowing the VM to control its own kernel and removing the selection from the control panel for it. This is the better way to go for KVM.

    Just a moment of pure honesty. Someone may disagree, but that's how I feel about it. This is me speaking more as an informed customer than anything else.

  • @jarland But i'm agree with you.

  • You can specify what kernel and initrd to boot from a KVM's domain XML file.

    https://libvirt.org/formatdomain.html#elementsOSKernel

    Thanked by 1xavcon
  • xavconxavcon Member
    edited December 2015

    @techhelper1 Thanks for the info, I loaded up a debian 7 guest, installed a newer kernel, copied its initrd & vmlinuz to the host under /var/lib/libvirt/images/ and then edited the guest XML os parameters as follows:

      <os>
       <type machine='pc'>hvm</type>
       <kernel>/var/lib/libvirt/images/vmlinuz-3.16.0-4-amd64</kernel>
       <initrd>/var/lib/libvirt/images/initrd.img-3.16.0-4-amd64</initrd>
       <cmdline>ro debug</cmdline>
       <boot dev='hd'/>
      </os>
    

    But upon boot it goes into initramfs. Any ideas what am I doing wrong?

    @jarland Would really appreciate your input on this, thank you :)

  • I figured it out guys, thanks a lot! :)

  • @xavcon said:
    I figured it out guys, thanks a lot! :)

    Please share how you fixed it so that others that arrive here through Google will be able to fix it as well.

Sign In or Register to comment.