omaticon Posted June 7, 2014 Report Posted June 7, 2014 The Proxmox module does not support cases where templates are stored in a different storage zone than the zone the VMs are configured to be created in. As I don't have the time right now to investigate how to properly fix this I had to hack the following function. I hope this helps others and gets the issue resolved in a coming update. /** * Retrieves a list of the virtual server templates * * @param string $node The node of the server * @param stdClass $module_row A stdClass object representing a single server * @return stdClass An stdClass object representing the server templates */ private function getServerTemplates($node, $module_row) { $api = $this->getApi($module_row->meta->user, $module_row->meta->password, $module_row->meta->host, $module_row->meta->port); // Load the nodes API $api->loadCommand("proxmox_nodes"); $response = null; try { $node_api = new ProxmoxNodes($api); $params = array('node' => $node, 'storage' => $module_row->meta->storage); $this->log($module_row->meta->host . "|vserver-templates", serialize($params), "input", true); $response = $this->parseResponse($node_api->storageContent($params), $module_row); } catch (Exception $e) { // Nothing to do } $result = array(); foreach($response->data as $file) { if($file->content == "vztmpl") $result[$file->volid] = $file->volid; } return $result; } The hack: $params = array('node' => $node, 'storage' => "local"); Regards, Chris Quote
omaticon Posted June 10, 2014 Author Report Posted June 10, 2014 Tyson, All you need to do is create multiple storage locations inside Proxmox. Specify one as the location that hosts ISOs & templates. Specify the other(s) as locations to store containers and images. In the Proxmox module included in Blesta there is a "default storage location." If you specify one of the storage locations configured to store containers or images then the module will never fill the templates drop down in the client's "re-install" view because the templates do not exist in the same location as the one specified in the "default storage location." Quote
Blesta Addons Posted June 11, 2014 Report Posted June 11, 2014 i believe proxmox module need a full rewrite . Quote
omaticon Posted June 12, 2014 Author Report Posted June 12, 2014 naja7host, I would tend to agree. Your signature says someone is doing just that. Who would that be, or, is there a thread covering it? The downside is that fixing the module would result in DB changes. Regards, Chris Quote
Blesta Addons Posted June 12, 2014 Report Posted June 12, 2014 naja7host, I would tend to agree. Your signature says someone is doing just that. Who would that be, or, is there a thread covering it? The downside is that fixing the module would result in DB changes. Regards, Chris I dont' remember the user or the thread , but it was saying in that thread he is in the re-creating of the modules . if the module will not released , when i finish some pending module for our internal use , i will try to see what we can do for that , because we have the proxmox is our main software for vps solution . the DB change is not a big probleme , as modules/plugins support upgrade proccess , so is not a probleme . EDIT : i have found the thread is here http://www.blesta.com/forums/index.php?/topic/2568-ability-to-override-the-system-information-tab-in-modules/#entry18423 the user is Mickey . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.