feat: add LXC container support to Proxmox extension
- Add is_lxc boolean column to ext_proxmox_nodes (default false, existing nodes unaffected) - Add LXC checkbox to admin node creation form (disabled on edit) - Dynamic API path selection via Node::vmType() (returns 'lxc' or 'qemu') - LXC deployment: syncLxcSettings() for cores, memory, swap, hostname, rootfs, net config - LXC network uses name=eth0 format with applyLxcPoolSettings() for VLAN/firewall/MTU - All lifecycle operations LXC-aware: install, suspend, unsuspend, terminate, upgrade, reinstall - VNC/xterm console uses correct type (lxc vs kvm) - All 20+ Livewire components use vmType() for Proxmox API paths - LXC user interface shows basic-only view (no advanced toggle, no KVM-specific tabs) - Basic tabs for LXC: Overview, Network Configuration, Backups, Console
This commit is contained in:
@@ -48,7 +48,7 @@ class PollServerStatistics extends Command
|
||||
|
||||
$proxmox = new Proxmox;
|
||||
$status = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/status/current'
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/status/current'
|
||||
)->json()['data'] ?? null;
|
||||
|
||||
if ($status) {
|
||||
@@ -60,7 +60,7 @@ class PollServerStatistics extends Command
|
||||
|
||||
try {
|
||||
$rrdData = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/rrddata',
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/rrddata',
|
||||
'get',
|
||||
['timeframe' => 'hour', 'cf' => 'AVERAGE']
|
||||
)->json()['data'] ?? null;
|
||||
@@ -78,7 +78,7 @@ class PollServerStatistics extends Command
|
||||
// The status endpoint may not return maxdisk, especially if guest agent is not enabled
|
||||
try {
|
||||
$config = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/config'
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/config'
|
||||
)->json()['data'] ?? null;
|
||||
|
||||
if ($config) {
|
||||
@@ -277,7 +277,7 @@ class PollServerStatistics extends Command
|
||||
{
|
||||
try {
|
||||
$proxmox = new Proxmox;
|
||||
$config = $proxmox->request('/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/config')->json()['data'] ?? [];
|
||||
$config = $proxmox->request('/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/config')->json()['data'] ?? [];
|
||||
|
||||
$updates = [];
|
||||
|
||||
@@ -305,7 +305,7 @@ class PollServerStatistics extends Command
|
||||
}
|
||||
|
||||
if (!empty($updates)) {
|
||||
$proxmox->request('/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/config', 'put', $updates);
|
||||
$proxmox->request('/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/config', 'put', $updates);
|
||||
$this->info('Throttled network interfaces for server ID ' . $server->id . ' to 1 MiB/s');
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
Reference in New Issue
Block a user