Private
Public Access
1
0

fix: OS template type matching for LXC/KVM nodes

- Add is_lxc column to ext_proxmox_oses for tracking template type
- OS model now has vmType() helper returning 'lxc' or 'qemu'
- Install uses OS template's type for clone API path (not node type)
- createServer validates OS type matches node type before provisioning
- calculateNode filters nodes by LXC/KVM type based on selected OS
- Reinstall OS list filtered to only show matching template types
- Admin location OS repeater now has LXC Template checkbox
This commit is contained in:
2026-03-02 21:23:10 -05:00
parent 153bcfcea5
commit ef1499cde4
5 changed files with 83 additions and 13 deletions

View File

@@ -83,9 +83,12 @@ class Reinstall extends Component
// assuming Server has relation `node()` -> Node model
$locationId = $this->server->node->location_id;
$isLxc = $this->server->node->is_lxc ?? false;
// Filter OS templates by location AND type (LXC templates for LXC nodes, KVM for KVM)
$osList = \Paymenter\Extensions\Servers\Proxmox\Models\Location::findOrFail($locationId)
->os()
->where('is_lxc', $isLxc)
->get();
return view('proxmox::reinstall', [