Re: Migration issue php-libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
the interesting thing is that you use constructor as
$conn = new Libvirt('connection-uri');

You should be using libvirt_connect() API instead. See [1] for example.

Not all of the defines are defined in the libvirt-php scope, that is
correct and patches are welcome :-)

Thanks,
Michal

[1]
http://libvirt.org/git/?p=libvirt-php.git;a=blob;f=tests/test-domain-create.phpt;h=1bcccb8871fd908a0cb90cba9a390fb9e87a97f4;hb=HEAD

On 10/17/2013 11:45 AM, Claudio Bley wrote:
> [Repeat: please, don't top post on technical lists.]
>
> At Thu, 17 Oct 2013 14:26:33 +0500,
> Umar Draz wrote:
>> Here is the php_error_logs
>> --------------------------
>> *[17-Oct-2013 05:17:42 America/New_York] PHP Notice:  Use of undefined
>> constant VIR_MIGRATE_UNSAFE - assumed 'VIR_MIGRATE_UNSAFE' in
>> /home/www/virtspace/inc/mig.php on line 21*
>> *[17-Oct-2013 05:17:42 America/New_York] PHP Notice:  Use of undefined
>> constant VIR_MIGRATE_OFFLINE - assumed 'VIR_MIGRATE_OFFLINE' in
>> /home/www/virtspace/inc/mig.php on line 21*
>>
>> According to above php_notices, both VIR_OFFLINE AND VIR_UNSAFE options are
>> not available.
> Indeed, looking at the libvirt-php code
> (http://libvirt.org/git/?p=libvirt-php.git;a=blob;f=src/libvirt-php.c;h=a149662272016e946d53f4589722d090ceccdbcf;hb=HEAD),
> these constants are not defined yet. The wrapper is lacking the
> following constants, which you can easily define yourself in your PHP
> script:
>
> VIR_MIGRATE_CHANGE_PROTECTION	 =	256	
> VIR_MIGRATE_UNSAFE	 =	512	
> VIR_MIGRATE_OFFLINE	 =	1024	
> VIR_MIGRATE_COMPRESSED	 =     2048
>
>
> Claudio

-- 
Michal Novotny <minovotn@xxxxxxxxxx>, RHCE, Red Hat
Virtualization | libvirt-php bindings | php-virt-control.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]