ganeti doesn't start instance with kvm 1.0

155 views
Skip to first unread message

Thomas Rieschl

unread,
Mar 5, 2012, 7:22:19 AM3/5/12
to gan...@googlegroups.com
Hello!

I just tried to update the KVM packages (kvm and qemu-kvm) from Debian
squeeze to squeeze-backports on a developement machine.

But after upgrading, when trying to start an instance I get the error:

# gnt-instance startup lucy
Waiting for job 1540 for lucy.home.rieschl.com...
Job 1540 for lucy.home.rieschl.com has failed: Failure: command
execution error:
Could not start instance: Hypervisor error: Unable to get KVM version


# cat /var/log/ganeti/master-daemon.log
2012-03-05 13:12:56,980: ganeti-masterd pid=25300/JobQueue1/Job1542
ERROR Op 1/1: Caught exception in INSTANCE_STARTUP(lucy.home.rieschl.com)
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/ganeti/jqueue.py", line 936, in
_ExecOpCodeUnlocked
timeout=timeout, priority=op.priority)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 352, in
ExecOpCode
priority)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 296, in
_LockAndExecLU
result = self._LockAndExecLU(lu, level + 1, calc_timeout, priority)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 305, in
_LockAndExecLU
result = self._LockAndExecLU(lu, level + 1, calc_timeout, priority)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 305, in
_LockAndExecLU
result = self._LockAndExecLU(lu, level + 1, calc_timeout, priority)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 256, in
_LockAndExecLU
result = self._ExecLU(lu)
File "/usr/lib/pymodules/python2.6/ganeti/mcpu.py", line 231, in _ExecLU
result = lu.Exec(self.Log)
File "/usr/lib/pymodules/python2.6/ganeti/cmdlib.py", line 5206, in Exec
raise errors.OpExecError("Could not start instance: %s" % msg)
OpExecError: Could not start instance: Hypervisor error: Unable to get
KVM version
2012-03-05 13:12:57,009: ganeti-masterd pid=25300/JobQueue1/Job1542 INFO
Finished job 1542, status = error


The ganeti version is 2.4.5 from squeeze-backports.
I think the problem is that the method _GetKVMVersion() in hv_kvm.py
expects a three digit version number, like "0.12.5" (that's the working
kvm version in the debian squeeze rep), but the KVM version in backports
reports "1.0":

# kvm --version (from squeeze):
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c)
2003-2008 Fabrice Bellard

# kvm --version (from squeeze-backports):
QEMU emulator version 1.0 (qemu-kvm-1.0 Debian 1.0+dfsg-8~bpo60+1),
Copyright (c) 2003-2008 Fabrice Bellard

BTW: that output is the same as the first line of "kvm --help".

Is there an easy fix for that problem? I'm not good in python but I
think I could modify the .py file and recompile the script if you tell
me what changes are necessary ;)


Thanks four your help!


Cheers,
Thomas

Guido Trotter

unread,
Mar 5, 2012, 7:29:13 AM3/5/12
to gan...@googlegroups.com
This has been fixed in 2.5 :)

Thanks,

Guido

Thomas Rieschl

unread,
Mar 5, 2012, 7:41:36 AM3/5/12
to gan...@googlegroups.com
oh, nice..

well, then I have an other request:
make 2.5 stable and put it in the debian backports ;)


ok, all jokes aside...
is it possible to just take the hv_kvm.py from the 2.5.0~rc5 tarball and
replace the current file with it?
...or just replace the GetKVMVersion method inside?


thanks

cheers,
Thomas

Damien Churchill

unread,
Mar 5, 2012, 7:43:38 AM3/5/12
to gan...@googlegroups.com
Hi

On 5 March 2012 12:41, Thomas Rieschl <tho...@rieschl.com> wrote:
> ok, all jokes aside...
> is it possible to just take the hv_kvm.py from the 2.5.0~rc5 tarball and
> replace the current file with it?
> ...or just replace the GetKVMVersion method inside?
>

The attached patch (assuming it doesn't get stripped off) will apply
to 2.4.5 and allow you to use qemu-kvm 1.0.

Regards,
Damien

fix-qemu-1.0-compat.patch

Thomas Rieschl

unread,
Mar 5, 2012, 9:46:45 AM3/5/12
to gan...@googlegroups.com
Hi!

Thanks, works like a charm now!


Regards,
Thomas

Teik Hooi Beh

unread,
May 16, 2012, 6:18:11 AM5/16/12
to gan...@googlegroups.com
Hi, 

I encounter the problem but not sure how to apply the patch.

Thanks in advance.

Regards
Beh

Thomas Rieschl

unread,
May 16, 2012, 6:31:42 AM5/16/12
to gan...@googlegroups.com
Hi!

On 16.05.2012 12:18, Teik Hooi Beh wrote:
> Hi,
>
> I encounter the problem but not sure how to apply the patch.

I did it manually with nano ;)

But I think the easiest solution would be to beg Iustin to put the
current stable (2.5.1) into squeeze-backports. then you can just do a
"aptitude upgrade" :)

>
> Thanks in advance.
>
> Regards
> Beh

Cheers,
Thomas

>
>
>
> On Monday, 5 March 2012 20:22:19 UTC+8, Thomas Rieschl wrote:
>
> Hello!
> [...]

Teik Hooi Beh

unread,
May 16, 2012, 7:24:47 AM5/16/12
to gan...@googlegroups.com
hi,

did you nano on the source and recompile kvm?

regards
beh

Iustin Pop

unread,
May 16, 2012, 7:44:34 AM5/16/12
to gan...@googlegroups.com
On Wed, May 16, 2012 at 12:31:42PM +0200, Thomas Rieschl wrote:
> Hi!
>
> On 16.05.2012 12:18, Teik Hooi Beh wrote:
> >Hi,
> >
> >I encounter the problem but not sure how to apply the patch.
>
> I did it manually with nano ;)
>
> But I think the easiest solution would be to beg Iustin to put the
> current stable (2.5.1) into squeeze-backports. then you can just do
> a "aptitude upgrade" :)

No need to beg :) I can only upload something to backports once it is in
testing, so I'm just waiting for 2.5.1 to migrate from unstable to
testing and then I can do the backport.

thanks,
iustin

Teik Hooi Beh

unread,
May 16, 2012, 9:13:01 AM5/16/12
to gan...@googlegroups.com
Hi,

I manage to download ganeti2_2.5.0-afoyi2_all.deb and did an upgrade from 2.4.5 on my ubuntu 12.04 and it doesn't give the error anymore.

Regards
Beh

Vladimir Palii

unread,
Mar 6, 2015, 3:36:34 PM3/6/15
to gan...@googlegroups.com
Hi,

I got issue with creating instances;
Configuration : Ganeti (SCI infrastructure) + Xen + Open vSwitch

vladimir@xxx01:~# sudo gnt-instance startup -H kernel_path=/home/Downloads/debian-7.7.0-amd64-CD-1.iso xxx02-vm

Waiting for job 2626 for xxx02.domain.com ...

Job 2626 for xxx02.domain.com has failed: Failure: command execution error:

Could not start instance: Error while executing backend function: [Errno 18] Invalid cross-device link

vladimir@xxx01:~# 


Help please resolve that error!!!

Best regards,
Vladimir P
Reply all
Reply to author
Forward
0 new messages