mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-08-27 15:37:02 +00:00
Enhanced SMBIOS functionality with manufacturer profiles and realistic hardware information
This commit is contained in:
@@ -33,6 +33,19 @@ Set-ProxmoxVMSMBIOS
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
```powershell
|
||||
Set-ProxmoxVMSMBIOS
|
||||
-Connection <ProxmoxConnection>
|
||||
-Node <String>
|
||||
-VMID <Int32>
|
||||
-UseProfile
|
||||
-Profile <String>
|
||||
[-PassThru]
|
||||
[-WhatIf]
|
||||
[-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
The `Set-ProxmoxVMSMBIOS` cmdlet sets the SMBIOS (System Management BIOS) settings for a virtual machine in Proxmox VE. SMBIOS settings allow you to customize hardware identification information that's presented to the guest operating system.
|
||||
@@ -199,6 +212,38 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -UseProfile
|
||||
|
||||
Whether to use a manufacturer profile for SMBIOS values.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Profile
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Profile
|
||||
|
||||
The manufacturer profile to use for SMBIOS values. Valid values are: Proxmox, Dell, HP, Lenovo, Microsoft, VMware, HyperV, VirtualBox, Random.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Profile
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
|
||||
Return the updated SMBIOS settings.
|
||||
@@ -303,6 +348,15 @@ Set-ProxmoxVMSMBIOS -Connection $connection -Node "pve1" -VMID 100 -SMBIOS $smbi
|
||||
|
||||
This example retrieves the current SMBIOS settings for VM 100, modifies them, and then updates the VM with the new settings.
|
||||
|
||||
### Example 4: Set SMBIOS settings using a manufacturer profile
|
||||
|
||||
```powershell
|
||||
$connection = Connect-ProxmoxServer -Server "proxmox.example.com" -Credential (Get-Credential)
|
||||
Set-ProxmoxVMSMBIOS -Connection $connection -Node "pve1" -VMID 100 -UseProfile -Profile "Dell" -PassThru
|
||||
```
|
||||
|
||||
This example sets the SMBIOS settings for VM 100 using the Dell manufacturer profile. The existing UUID will be preserved.
|
||||
|
||||
## Related Links
|
||||
|
||||
- [Get-ProxmoxVMSMBIOS](Get-ProxmoxVMSMBIOS.md)
|
||||
|
||||
@@ -50,8 +50,7 @@ Write-Host "UUID: $($smbios.UUID)"
|
||||
Set-ProxmoxVMSMBIOS -Connection $connection -Node "pve1" -VMID 100 -Manufacturer "Lenovo" -Product "ThinkSystem SR650" -Serial "LENOVO123"
|
||||
|
||||
# Example 7: Update SMBIOS settings for an existing VM using a manufacturer profile
|
||||
$smbios = ProxmoxVMSMBIOSProfile.GetProfile("VMware")
|
||||
Set-ProxmoxVMSMBIOS -Connection $connection -Node "pve1" -VMID 101 -SMBIOS $smbios
|
||||
Set-ProxmoxVMSMBIOS -Connection $connection -Node "pve1" -VMID 101 -UseProfile -Profile "VMware" -PassThru
|
||||
|
||||
# Example 8: Create a VM with SMBIOS settings that mimic a physical server for licensing purposes
|
||||
$builder = New-ProxmoxVMBuilder -Name "license-server" -AutomaticSMBIOS -SMBIOSProfile "Dell"
|
||||
@@ -62,5 +61,14 @@ $builder.WithMemory(8192)
|
||||
.WithStart($true)
|
||||
$vm5 = New-ProxmoxVM -Connection $connection -Node "pve1" -Builder $builder
|
||||
|
||||
# Example 9: Create a VM with Microsoft Surface SMBIOS settings
|
||||
$builder = New-ProxmoxVMBuilder -Name "surface-pro" -AutomaticSMBIOS -SMBIOSProfile "Microsoft"
|
||||
$builder.WithMemory(4096)
|
||||
.WithCores(2)
|
||||
.WithDisk(50, "local-lvm")
|
||||
.WithNetwork("virtio", "vmbr0")
|
||||
.WithStart($true)
|
||||
$vm6 = New-ProxmoxVM -Connection $connection -Node "pve1" -Builder $builder
|
||||
|
||||
# Disconnect from the server when done
|
||||
Disconnect-ProxmoxServer -Connection $connection
|
||||
|
||||
Reference in New Issue
Block a user