proxmox API

sHaggY_caT

New Member
Mar 2, 2010
1
0
1
Hi all!

I'm writing now my custom panel, using proxmox API, and I have some questions. I use PHP framework:

https://github.com/CpuID/pve2-api-php-client

and proxmox 3.2:

Code:
ii  libpve-access-control              3.0-15                        amd64        Proxmox VE access control libraryii  libpve-common-perl                 3.0-19                        all          Proxmox VE base library
ii  libpve-storage-perl                3.0-22                        all          Proxmox VE storage management library
ii  proxmox-ve-2.6.32                  3.2-136                       all          The Proxmox Virtual Environment
ii  pve-cluster                        3.0-14                        amd64        Cluster Infrastructure for Proxmox Virtual Environment
ii  pve-firewall                       1.0-7                         amd64        Proxmox VE Firewall
ii  pve-headers-2.6.32-32-pve          2.6.32-136                    amd64        The Proxmox PVE Kernel Headers
ii  pve-kernel-2.6.32-32-pve           2.6.32-136                    amd64        The Proxmox PVE Kernel Image
ii  pve-manager                        3.2-30                        amd64        The Proxmox Virtual Environment

I have some questions:

1) this PHP class always returns login successful:

Code:
if($px->constructor_success()){
    if($px->login()){          
        echo "YES";    
    }
   }

returns TRUE anyway. Is it proxmox bug, or bug of this framework?

2) I don't understand how can I use proxmox internal user. This works:

Code:
$px = new PVE2_API("IP.add.dre.ss", "username", "pam", "valid password");

If "username" is a valid system user

But following doesn't:

Code:
$px = new PVE2_API("IP.add.dre.ss", "username", "realm", "valid password");

If "username" is a valid proxmox user.

3)
I want to use custom command to start KVM virtual machines. How can I do this? I've come up with the only one way to do it: change /usr/bin/kvm to my custom script for reading proxmox's arguments and editing them to start with my arguments. Is there any better way?
 
Last edited: