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:
@@ -32,18 +32,19 @@ class ReinstallJob implements ShouldQueue
|
||||
public function handle(): void
|
||||
{
|
||||
$proxmox = new Proxmox;
|
||||
$vmType = $this->server->node->vmType();
|
||||
|
||||
// Stop and delete existing VM if it exists
|
||||
// Stop and delete existing VM/CT if it exists
|
||||
try {
|
||||
$proxmox->requestAndWait(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/status/stop',
|
||||
'/nodes/' . $this->server->node->name . '/' . $vmType . '/' . $this->server->vm_id . '/status/stop',
|
||||
'post',
|
||||
['vmid' => $this->server->vm_id],
|
||||
$this->server->node->name
|
||||
);
|
||||
|
||||
$proxmox->requestAndWait(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id,
|
||||
'/nodes/' . $this->server->node->name . '/' . $vmType . '/' . $this->server->vm_id,
|
||||
'delete',
|
||||
[],
|
||||
$this->server->node->name
|
||||
|
||||
Reference in New Issue
Block a user