virtual_node_manager lookup hardware from defaults. allocate hw in vm file

This commit is contained in:
Josh Patterson
2025-02-15 11:29:47 -05:00
parent a84f5a1e32
commit eb4cd75218
4 changed files with 598 additions and 528 deletions

View File

@@ -2,81 +2,47 @@ hypervisor:
model:
testModel:
hardware:
cpu:
total: 128
free: 128
memory:
total: 128
free: 128
disks:
free:
3: pci_0000_c7_00_0
4: pci_0000_c8_00_0
claimed:
1: pci_0000_c5_00_0 # hypervisor
2: pci_0000_c6_00_0 # hypervisor
cpu: 128
memory: 128
disk:
1: pci_0000_c7_00_0
2: pci_0000_c8_00_0
copper:
free:
3: pci_0000_c4_00_0
4: pci_0000_c4_00_1
5: pci_0000_c4_00_2
6: pci_0000_c4_00_3
claimed:
1: pci_0000_c1_00_0 # hypervisor
2: pci_0000_c1_00_1 # hypervisor
sfp:
free:
5: pci_0000_02_00_0
6: pci_0000_02_00_1
7: pci_0000_41_00_0
8: pci_0000_41_00_1
claimed: {}
model1:
hardware:
cpu:
total: 128
free: 128
memory:
total: 128
free: 128
disks:
free:
3: pci_0000_c7_00_0
4: pci_0000_c8_00_0
claimed:
1: pci_0000_c5_00_0
2: pci_0000_c6_00_0
copper:
free:
1: pci_0000_c4_00_0
2: pci_0000_c4_00_1
3: pci_0000_c4_00_2
4: pci_0000_c4_00_3
claimed: {}
sfp:
free:
5: pci_0000_41_00_0
6: pci_0000_41_00_1
claimed: {}
model2:
5: pci_0000_02_00_0
6: pci_0000_02_00_1
7: pci_0000_41_00_0
8: pci_0000_41_00_1
model1:
hardware:
cpu:
total: 128
free: 128
memory:
total: 512
free: 512
disks:
free:
3: pci_0000_c8_00_0
4: pci_0000_c9_00_0
5: pci_0000_c10_00_0
6: pci_0000_c11_00_0
claimed:
1: pci_0000_c6_00_0
2: pci_0000_c7_00_0
cpu: 128
memory: 128
disk:
1: pci_0000_c7_00_0
2: pci_0000_c8_00_0
copper:
1: pci_0000_c4_00_0
2: pci_0000_c4_00_1
3: pci_0000_c4_00_2
4: pci_0000_c4_00_3
sfp:
5: pci_0000_02_00_0
6: pci_0000_02_00_1
7: pci_0000_41_00_0
8: pci_0000_41_00_1
model2:
cpu: 256
memory: 256
disk:
1: pci_0000_c7_00_0
2: pci_0000_c8_00_0
3: pci_0000_c9_00_0
4: pci_0000_c10_00_0
copper:
free:
1: pci_0000_c4_00_0
2: pci_0000_c4_00_1
3: pci_0000_c4_00_2
@@ -85,9 +51,8 @@ hypervisor:
6: pci_0000_c5_00_1
7: pci_0000_c5_00_2
8: pci_0000_c5_00_3
claimed: {}
sfp:
free:
9: pci_0000_41_00_0
10: pci_0000_41_00_1
claimed: {}
9: pci_0000_02_00_0
10: pci_0000_02_00_1
11: pci_0000_41_00_0
12: pci_0000_41_00_1

File diff suppressed because it is too large Load Diff

View File

@@ -21,8 +21,7 @@ hypervisor:
uiElements:
- field: hostname
label: Enter the hostname
forcedType: string
- field: nodetype
- field: role
label: sensor or searchnode
- field: network_mode
label: Choose static4 or dhcp4. If static4, populate IP details below.
@@ -31,7 +30,7 @@ hypervisor:
- field: gw4
label: Gateway
- field: dns4
label: DNS. Comma seperated list. ex. 192.168.1.1,8.8.8.8
label: DNS. Comma separated list. ex. 192.168.1.1,8.8.8.8
- field: search4
label: Search domain
- field: cpu
@@ -39,11 +38,11 @@ hypervisor:
- field: memory
label: Memory, in GB to assign. ex. 16
- field: disk
label: Choose a disk or disks to assign for passthrough. Comma seperated list.
label: Choose a disk or disks to assign for passthrough. Comma separated list.
- field: copper
label: Choose a copper port or ports to assign for passthrough. Comma seperated list.
- filed: sfp
label: Choose a sfp port or ports to assign for passthrough. Comma seperated list.
label: Choose a copper port or ports to assign for passthrough. Comma separated list.
- field: sfp
label: Choose a sfp port or ports to assign for passthrough. Comma separated list.
file: true
global: true

View File

@@ -14,5 +14,10 @@ hypervisor_host_directory_{{hypervisor}}:
file.directory:
- name: /opt/so/saltstack/local/salt/hypervisor/hosts/{{hypervisor}}
- makedirs: True
- user: socore
- group: socore
- recurse:
- user
- group
{% endfor %}
{% endfor %}