upgrade kvm with running vm
hi everybody,
is it a problem to update kvm (the kvm package (qemu-kvm on debian) with the package manager) while some vms are turned on? or should i shutdown all vms first?
thanks
Quoted 7 lines · On Thu, Oct 7, 2010 at 11:43 PM, <[email protected]> wrote:
hi everybody,
is it a problem to update kvm (the kvm package (qemu-kvm on debian) with the package manager) while some vms are turned on? or should i shutdown all vms first?
From personal experience (install from source), there shouldn't be a
problem to perform upgrade/update of qemu-kvm without shutting down those running VMs. However, in order to use the updated version of the qemu-kvm, you will need to unload those loaded kvm-intel or kvm-amd and kvm kernel modules. Such unloading of modules will need to shutdown all running VMs in order to successfully unload (rmmod) those kernel modules. After unloading, you can reload the updated version by using modprobe or insmod after you have done depmod.
Hope this helps!
Kindest regards,
Giam Teck Choon
Quoted 6 lines · Teck Choon Giam
Quoted 5 lines · On Thu, Oct 7, 2010 at 11:43 PM, <[email protected]> wrote:
hi everybody,
is it a problem to update kvm (the kvm package (qemu-kvm on debian) with the package manager) while some vms are turned on? or should i shutdown all vms first?
If you update kvm userspace while some VMs are running, these VMs will not "pick" the new userspace, they will continue running by old userspace, until you restart them. It's just the same as if you upgrade, say, your shell while it's running - new sessions will use new shell, alrady running will continue running using old shell.
Quoted 8 lines
From personal experience (install from source), there shouldn't be a problem to perform upgrade/update of qemu-kvm without shutting down those running VMs. However, in order to use the updated version of the qemu-kvm, you will need to unload those loaded kvm-intel or kvm-amd and kvm kernel modules. Such unloading of modules will need to shutdown all running VMs in order to successfully unload (rmmod) those kernel modules. After unloading, you can reload the updated version by using modprobe or insmod after you have done depmod.
Do Not Mess With Kernel Modules (tm). There's no need to.
/mjt
Quoted 8 lines · Michael Tokarev
Quoted 6 lines · Teck Choon Giam
Quoted 5 lines · On Thu, Oct 7, 2010 at 11:43 PM, <[email protected]> wrote:
hi everybody,
is it a problem to update kvm (the kvm package (qemu-kvm on debian) with the package manager) while some vms are turned on? or should i shutdown all vms first?
Quoted 6 lines
If you update kvm userspace while some VMs are running, these VMs will not "pick" the new userspace, they will continue running by old userspace, until you restart them. It's just the same as if you upgrade, say, your shell while it's running - new sessions will use new shell, alrady running will continue running using old shell.
I am not sure about userspace wise. In order to use different version of qemu-kvm, besides reboot... there is only one method to run different version such as upgraded version or downgraded version... is to shutdown all VMs and reload the kvm related kernel modules.
Quoted 11 lines
Quoted 9 lines
From personal experience (install from source), there shouldn't be a problem to perform upgrade/update of qemu-kvm without shutting down those running VMs. However, in order to use the updated version of the qemu-kvm, you will need to unload those loaded kvm-intel or kvm-amd and kvm kernel modules. Such unloading of modules will need to shutdown all running VMs in order to successfully unload (rmmod) those kernel modules. After unloading, you can reload the updated version by using modprobe or insmod after you have done depmod.
Do Not Mess With Kernel Modules (tm). There's no need to.
There is a need to :p
I learnt this due to test different version of qemu-kvm about system_shutdown stop working for FreeBSD guest VM after 0.12.1 if I remember correctly. If I never done this, each test version I will need to reboot once... so waste of time etc... ...
But I agreed in general about your "Do Not Mess With Kernel Modules (tm)." ... ...
Thanks.
Kindest regards,
Giam Teck Choon
Quoted 1 line · Teck Choon Giam
On Fri, Oct 8, 2010 at 2:03 PM, Michael Tokarev <[email protected]> wrote:
[]
Quoted 4 lines
I am not sure about userspace wise. In order to use different version of qemu-kvm, besides reboot... there is only one method to run different version such as upgraded version or downgraded version... is to shutdown all VMs and reload the kvm related kernel modules.
Someone of us two does not understand something.
Why are you reloading kernel module? It comes with the kernel, and if you reloading it, you're rebooting the host, no? If yes, why?
[]
Quoted 1 line
Quoted 1 line
Do Not Mess With Kernel Modules (tm). There's no need to.
It was for a reason I mentioned this. Again: kvm, for quite some time already, does not come with kernel modules, the kernel modules comes with your kernel. You need 2.6.28+ kernel modules to work with any reasonable kvm userspace, including even kvm-72 from debian lenny. Earlier kernels are hopeless for kvm, there were too many various problems exposed by kvm (this includes debian 2.6.26 kernel).
There's no need to mess with kvm kernel modules. Unless you want to use some feature that is present only in some future release (such as vhost-net for example). But for these, it may be better to really upgrate the kernel to 2.6.35+.
/mjt
Quoted 8 lines · Michael Tokarev
Quoted 1 line · Teck Choon Giam
On Fri, Oct 8, 2010 at 2:03 PM, Michael Tokarev <[email protected]> wrote:
[]
Quoted 4 lines
I am not sure about userspace wise. In order to use different version of qemu-kvm, besides reboot... there is only one method to run different version such as upgraded version or downgraded version... is to shutdown all VMs and reload the kvm related kernel modules.
Quoted 5 lines
Someone of us two does not understand something.
Why are you reloading kernel module? It comes with the kernel, and if you reloading it, you're rebooting the host, no? If yes, why?
I am not rebooting the server or host. From my previous reply I believe I make myself clear that in order to use upgraded or downgraded
qemu-kvm version, without rebooting the server (host) the only method is to shutdown all VMs and reload the kvm related modules. If just restart all VMs will not run the upgraded/downgraded version of qemu-kvm without reboot the server (host) or reload kvm related modules. This is from my person test experience with vanilla kernel 2.6.32.x.
Quoted 12 lines
[]
Quoted 1 line
Quoted 1 line
Do Not Mess With Kernel Modules (tm). There's no need to.
It was for a reason I mentioned this. Again: kvm, for quite some time already, does not come with kernel modules, the kernel modules comes with your kernel. You need 2.6.28+ kernel modules to work with any reasonable kvm userspace, including even kvm-72 from debian lenny. Earlier kernels are hopeless for kvm, there were too many various problems exposed by kvm (this includes debian 2.6.26 kernel).
Quoted 5 lines
There's no need to mess with kvm kernel modules. Unless you want to use some feature that is present only in some future release (such as vhost-net for example). But for these, it may be better to really upgrate the kernel to 2.6.35+.
See my above reply about why there is a need to.
Thanks.
Kindest regards,
Giam Teck Choon
Quoted 15 lines · Teck Choon Giam
Quoted 8 lines · Michael Tokarev
Quoted 1 line · Teck Choon Giam
On Fri, Oct 8, 2010 at 2:03 PM, Michael Tokarev <[email protected]> wrote:
[]
Quoted 4 lines
I am not sure about userspace wise. In order to use different version of qemu-kvm, besides reboot... there is only one method to run different version such as upgraded version or downgraded version... is to shutdown all VMs and reload the kvm related kernel modules.
Quoted 5 lines
Someone of us two does not understand something.
Why are you reloading kernel module? It comes with the kernel, and if you reloading it, you're rebooting the host, no? If yes, why?
Quoted 9 lines
I am not rebooting the server or host. From my previous reply I believe I make myself clear that in order to use upgraded or downgraded
qemu-kvm version, without rebooting the server (host) the only method is to shutdown all VMs and reload the kvm related modules. If just restart all VMs will not run the upgraded/downgraded version of qemu-kvm without reboot the server (host) or reload kvm related modules. This is from my person test experience with vanilla kernel 2.6.32.x.
I just tested and what you said is true for qemu-kvm version upgrades/downgrades... there is no need to play with the kernel modules. Simply restart all VMs works! Weird about my test experience few weeks or months back though... ... :/
Thanks.
Kindest regards,
Giam Teck Choon