<br><br><div class="gmail_quote">2011/10/11 张立洪 <span dir="ltr"><<a href="mailto:zlh_086@126.com">zlh_086@126.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">First ,thanks for you help<br>but I am very sorry,I do not konw how to recompile libvirt to support openvz.<br><br><br>My os is centos6,its own libvirt version is 0.8.1<br>
<br>please tell me how to recomplie libvirt.because I do not find libvirt makefile.<br><br><div></div><div></div><br><pre><br>在 2011-10-11 16:50:19,"Matthias Bolte" <<a href="mailto:matthias.bolte@googlemail.com" target="_blank">matthias.bolte@googlemail.com</a>> 写道:
>2011/10/10 Eric Blake <<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>>:
>> On 10/10/2011 06:57 AM, 张立洪 wrote:
>>>
>>>  dears.
>>> I can not solved the problem:
>>>  vzctl works. But how do I connect to Virtuozzo? Using the openvz
>>>>>>
>>>>>> driver
>>>>>> it doesn't work out of the box:
>>>>>> virsh # connect openvz:///system
>>>>>> error: Failed to connect to the hypervisor
>>>>>> error: no connection driver available for openvz:///system
>>>
>>>
>>> Why can not I connect to the openvz???
>>
>> This may be a simple case of your libvirt binary not being pre-compiled with
>> openvz support.  What distro are you using?  What does:
>>
>> virsh --version=long
>>
>> display?  It may be that you have to recompile libvirt from a tarball and
>> explicitly request that the openvz code be compiled, if the pre-built binary
>> from your distro omits that driver.
>
>Maybe the problem is that OpenVZ and Virtuozzo are not identical. See
>this thread on the user list about the difference between ctid and
>vpsid:
>
><a href="https://www.redhat.com/archives/libvirt-users/2011-May/msg00070.html" target="_blank">https://www.redhat.com/archives/libvirt-users/2011-May/msg00070.html</a><div><div></div><div class="h5">
><a href="https://www.redhat.com/archives/libvirt-users/2011-July/msg00031.html" target="_blank">https://www.redhat.com/archives/libvirt-users/2011-July/msg00031.html</a>
>
>I looked this up in the OpenVZ source history at that time and vpsid
>was changed to ctid at some time. So the OpenVZ driver needs to deal
>with this difference as it seems that Virtuozzo is based on newer
>OpenVZ that uses ctid.
>
>-- 
>Matthias Bolte
><a href="http://photron.blogspot.com" target="_blank">http://photron.blogspot.com</a>
</div></div></pre></div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
libvirt-users mailing list<br>
<a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br></blockquote></div><br><div>Accidently sent this directly to OP,</div><div><br>
</div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>You'll want to download the libvirt SRPM for CentOS 6.  Based on the comment from the spec file , RHEL and CentOS is purposely not compiled with openvz,</div>
<div><br></div><div><div># RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor,</div><div># VMWare, or libxenserver (xenapi)</div><div>%if 0%{?rhel}</div><div>%define with_openvz 0</div></div><div><br></div>
<div>To enable openvz you change that define to 1 and then rebuild using the spec.</div><div><br></div><div>You can extract the SRPM contents with...</div><div><br></div><div>rpm2cpio libvirt-xxxx.src.rpm | cpio -dimv</div>
<div><br></div><div>Then follow this documentation, <a href="http://wiki.centos.org/HowTos/RebuildSRPM" target="_blank" style="color: rgb(87, 151, 176); ">http://wiki.centos.org/HowTos/RebuildSRPM</a> , to rebuild a new RPM.</div>
<div><br></div><div>Hope that helps,</div><div><br></div><div> - Trey</div></span></div>