* KVM Shared memory ivshmem enquiry
@ 2010-03-18 2:59 Neville Clark
2010-03-18 17:17 ` Cam Macdonell
0 siblings, 1 reply; 4+ messages in thread
From: Neville Clark @ 2010-03-18 2:59 UTC (permalink / raw)
To: kvm; +Cc: cam
Cam and others,
I have been trying to enable Shared memory in KVM but I am not clear on
the correct procedures and requirements, I am new to KVM, kernel
building, git so am on very step learning curve.
I have an application that requires shared memory between host and
guest. I have been using Vmware workstation 6.0.5, but all later
versions do not support shared memory, and WS 6 is no longer available.
I think I have managed to build and install the guest's kvm_ivshmem
module, from http://www.gitorious.org/nahanni/
I used cd kernem_modules;make;sudo make install;sudo modprobe
kvm_ivshmem. Every thing seems to have worked.
On the host side I am very confused as to what is required.
I have created git repository using
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
I have been able to patch, build and install, but the result does NOT
run.
I have checked out the qemu-kvm-0.11.0 and built and installed but then
I get a version miss-match. (this was unpatched as the patch does not
work on this version).
The host is Ubuntu 9.10 64 bit, with ubuntu's KVM installed.
Can I simply somehow build and install ivshmem module, or do I need to
rebuild the kernel? eg get kvm.git and build and install new kernel.
Is there another KVM binary that I can use, instead of Ubuntu's?
Is the ivshmem patch likely to be accepted anytime soon?
Thanks Nev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: KVM Shared memory ivshmem enquiry
2010-03-18 2:59 KVM Shared memory ivshmem enquiry Neville Clark
@ 2010-03-18 17:17 ` Cam Macdonell
2010-03-18 22:17 ` Neville Clark
0 siblings, 1 reply; 4+ messages in thread
From: Cam Macdonell @ 2010-03-18 17:17 UTC (permalink / raw)
To: nev; +Cc: kvm
Hi Neville,
On Wed, Mar 17, 2010 at 8:59 PM, Neville Clark <nev@zavalon.com> wrote:
> Cam and others,
>
> I have been trying to enable Shared memory in KVM but I am not clear on
> the correct procedures and requirements, I am new to KVM, kernel
> building, git so am on very step learning curve.
>
> I have an application that requires shared memory between host and
> guest. I have been using Vmware workstation 6.0.5, but all later
> versions do not support shared memory, and WS 6 is no longer available.
>
> I think I have managed to build and install the guest's kvm_ivshmem
> module, from http://www.gitorious.org/nahanni/
> I used cd kernem_modules;make;sudo make install;sudo modprobe
> kvm_ivshmem. Every thing seems to have worked.
>
> On the host side I am very confused as to what is required.
> I have created git repository using
> git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
>
> I have been able to patch, build and install, but the result does NOT
> run.
Can you expand on how it doesn't run? I would suggest using the
master branch and patching it with my patches. As well as patching,
you need to run with something like
-ivshmem 128,myshm
to actually create the shared memory device.
> I have checked out the qemu-kvm-0.11.0 and built and installed but then
> I get a version miss-match. (this was unpatched as the patch does not
> work on this version).
shared memory requires a patched qemu-kvm at this point.
>
> The host is Ubuntu 9.10 64 bit, with ubuntu's KVM installed.
>
> Can I simply somehow build and install ivshmem module, or do I need to
> rebuild the kernel? eg get kvm.git and build and install new kernel.
You can just build the module.
> Is there another KVM binary that I can use, instead of Ubuntu's?
You can't use a distro binary as they don't support shared memory.
>
> Is the ivshmem patch likely to be accepted anytime soon?
I hope so :) I'm currently working on some suggested changes from the
Qemu/KVM developers.
Thanks,
Cam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: KVM Shared memory ivshmem enquiry
2010-03-18 17:17 ` Cam Macdonell
@ 2010-03-18 22:17 ` Neville Clark
2010-03-19 3:09 ` Cam Macdonell
0 siblings, 1 reply; 4+ messages in thread
From: Neville Clark @ 2010-03-18 22:17 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm
Hi Cam,
On Thu, 2010-03-18 at 11:17 -0600, Cam Macdonell wrote:
>
> Can you expand on how it doesn't run? I would suggest using the
> master branch and patching it with my patches. As well as patching,
> you need to run with something like
>
> -ivshmem 128,myshm
>
> to actually create the shared memory device.
Just to be clear, I think I have successfully loaded the required module
into the guest, and it is only on the host that I am having trouble.
I am currently using virt-manager and distro KVM to get something up.
I am much happier with a GUI then command-line.
I had hoped that I would be able to patch or load a module into this
Ubuntu's KVM. Installing KVM from Ubuntu does NOT seems to change the
running Linux kernel 'uname -a' after install of KVM is
"Linux dingo3 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC
2010 x86_64 GNU/Linux"
What I have tried to do is build and install qemu-kvm from the git tree
*without* patches. And then run an already configured guest using
virt-manager. The result is that using the HEAD, after about 30 secs I
get a pop-up with
"Error starting domain: monitor socket did not show up.: Connection
refused"
with details of:
"Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 493, in
run_domain
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 558, in
startup
self.vm.create()
File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed',
dom=self)
libvirtError: monitor socket did not show up.: Connection refused"
after switching version qemu-kvm-0.11.0 and repeating above I get
immediate (no 30 sec delay) pop-up
"Error starting domain: internal error cannot parse QEMU version number
in 'QEMU PC emulator version 0.11.0 (kvm-devel), Copyright (c) 2003-2008
Fabrice Bellard'"
with details of:
"Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 493, in
run_domain
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 558, in
startup
self.vm.create()
File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed',
dom=self)
libvirtError: internal error cannot parse QEMU version number in 'QEMU
PC emulator version 0.11.0 (kvm-devel), Copyright (c) 2003-2008 Fabrice
Bellard'"
Primary questions are:
What is the simplest starting point to use your patches?
Is there a module for the HOST that can be loaded into a running KVM?
Do I need to build and install the Linux kernel from the KVM git tree?
>
> > I have checked out the qemu-kvm-0.11.0 and built and installed but then
> > I get a version miss-match. (this was unpatched as the patch does not
> > work on this version).
>
> shared memory requires a patched qemu-kvm at this point.
>
> >
> > The host is Ubuntu 9.10 64 bit, with ubuntu's KVM installed.
> >
> > Can I simply somehow build and install ivshmem module, or do I need to
> > rebuild the kernel? eg get kvm.git and build and install new kernel.
>
> You can just build the module.
Does this apply to both the guest and the host, or just the guest.
If this applies to host, where can I find the module?
>
> > Is there another KVM binary that I can use, instead of Ubuntu's?
>
> You can't use a distro binary as they don't support shared memory.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: KVM Shared memory ivshmem enquiry
2010-03-18 22:17 ` Neville Clark
@ 2010-03-19 3:09 ` Cam Macdonell
0 siblings, 0 replies; 4+ messages in thread
From: Cam Macdonell @ 2010-03-19 3:09 UTC (permalink / raw)
To: nev; +Cc: kvm
On Thu, Mar 18, 2010 at 4:17 PM, Neville Clark <nev@zavalon.com> wrote:
> Hi Cam,
>
> On Thu, 2010-03-18 at 11:17 -0600, Cam Macdonell wrote:
>
>>
>> Can you expand on how it doesn't run? I would suggest using the
>> master branch and patching it with my patches. As well as patching,
>> you need to run with something like
>>
>> -ivshmem 128,myshm
>>
>> to actually create the shared memory device.
>
> Just to be clear, I think I have successfully loaded the required module
> into the guest, and it is only on the host that I am having trouble.
>
> I am currently using virt-manager and distro KVM to get something up.
> I am much happier with a GUI then command-line.
using shared memory requires a special command-line argument
'-ivshmem' that libvirt (the library/API that virt-manager uses to
control VMs) does not know about. So you will need to use the
command-line at this point.
>
> I had hoped that I would be able to patch or load a module into this
> Ubuntu's KVM.
You need to compile your own version of the qemu-kvm executable.
> Installing KVM from Ubuntu does NOT seems to change the
> running Linux kernel 'uname -a' after install of KVM is
> "Linux dingo3 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC
> 2010 x86_64 GNU/Linux"
>
> What I have tried to do is build and install qemu-kvm from the git tree
> *without* patches. And then run an already configured guest using
> virt-manager. The result is that using the HEAD, after about 30 secs I
> get a pop-up with
> "Error starting domain: monitor socket did not show up.: Connection
> refused"
> with details of:
> "Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/engine.py", line 493, in
> run_domain
> vm.startup()
> File "/usr/share/virt-manager/virtManager/domain.py", line 558, in
> startup
> self.vm.create()
> File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in
> create
> if ret == -1: raise libvirtError ('virDomainCreate() failed',
> dom=self)
> libvirtError: monitor socket did not show up.: Connection refused"
That appears to be a different error related to libvirt trying to
connect to the Qemu monitor which is a control interface for Qemu/KVM.
This has nothing to do with shared memory.
>
>
> after switching version qemu-kvm-0.11.0 and repeating above I get
> immediate (no 30 sec delay) pop-up
> "Error starting domain: internal error cannot parse QEMU version number
> in 'QEMU PC emulator version 0.11.0 (kvm-devel), Copyright (c) 2003-2008
> Fabrice Bellard'"
> with details of:
> "Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/engine.py", line 493, in
> run_domain
> vm.startup()
> File "/usr/share/virt-manager/virtManager/domain.py", line 558, in
> startup
> self.vm.create()
> File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in
> create
> if ret == -1: raise libvirtError ('virDomainCreate() failed',
> dom=self)
> libvirtError: internal error cannot parse QEMU version number in 'QEMU
> PC emulator version 0.11.0 (kvm-devel), Copyright (c) 2003-2008 Fabrice
> Bellard'"
>
> Primary questions are:
> What is the simplest starting point to use your patches?
Fetch the qemu-kvm git repo here:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
compile and run a guest VM by command-line. Once you have that, apply
the qemu-kvm patch and try recompiling/running.
> Is there a module for the HOST that can be loaded into a running KVM?
Shared memory requires no modification to the host kernel at all. But
you need to modify the Qemu/KVM executable that runs on the host.
> Do I need to build and install the Linux kernel from the KVM git tree?
No, you don't need to compile a whole kernel, you can build the kernel
module separately. I have a makefile to do this in the git repo you
downloaded from gitorious. But leave that for now and let's focus on
compiling qemu/kvm with the patches, then we'll move on to the guest
kernel.
Cam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-19 3:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 2:59 KVM Shared memory ivshmem enquiry Neville Clark
2010-03-18 17:17 ` Cam Macdonell
2010-03-18 22:17 ` Neville Clark
2010-03-19 3:09 ` Cam Macdonell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox