
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.... On 10/17/2013 11:45 AM, Claudio Bley wrote:
[Repeat: please, don't top post on technical lists.]
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=a1496...),
At Thu, 17 Oct 2013 14:26:33 +0500, Umar Draz wrote: 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@redhat.com>, RHCE, Red Hat Virtualization | libvirt-php bindings | php-virt-control.org