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:
@@ -21,7 +21,7 @@ class LiveTrafficController extends Controller
|
||||
|
||||
// First, get the VM configuration to identify network interfaces
|
||||
$configResponse = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/config'
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/config'
|
||||
);
|
||||
$config = $configResponse->json()['data'] ?? [];
|
||||
|
||||
@@ -48,7 +48,7 @@ class LiveTrafficController extends Controller
|
||||
$guestAgentInterfaces = [];
|
||||
try {
|
||||
$guestResponse = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/agent/network-get-interfaces'
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/agent/network-get-interfaces'
|
||||
);
|
||||
$guestJson = $guestResponse->json();
|
||||
$guestAgentInterfaces = $guestJson['data']['result'] ?? [];
|
||||
@@ -74,7 +74,7 @@ class LiveTrafficController extends Controller
|
||||
if (count($interfaces) > 0) {
|
||||
try {
|
||||
$rrdResponse = $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',
|
||||
@@ -239,7 +239,7 @@ class LiveTrafficController extends Controller
|
||||
// If no interface-specific data, fall back to general RRD data
|
||||
if (empty($interfaceData)) {
|
||||
$response = $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',
|
||||
@@ -317,7 +317,7 @@ class LiveTrafficController extends Controller
|
||||
|
||||
// Get total statistics from status endpoint
|
||||
$statusResponse = $proxmox->request(
|
||||
'/nodes/' . $server->node->name . '/qemu/' . $server->vm_id . '/status/current'
|
||||
'/nodes/' . $server->node->name . '/' . $server->node->vmType() . '/' . $server->vm_id . '/status/current'
|
||||
);
|
||||
$status = $statusResponse->json()['data'] ?? [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user