Hardware
Hardware configuration commands expose focused updates rather than requiring a complete VM request. Most hardware changes require a powered-off VM because Sylve must update the persistent libvirt domain definition.
Know which changes require shutdown
Section titled “Know which changes require shutdown”| Command | May run while VM is active | Update behavior |
|---|---|---|
config name |
Yes | Replaces the name. |
config description |
Yes | Replaces the description. |
config cpu |
No | Replaces the complete CPU topology and pinning. |
config memory |
No | Replaces RAM size. |
config vnc |
No | Patches only supplied fields. |
config serial |
No | Replaces enabled state. |
config pci |
No | Replaces the complete PCI assignment list. |
config tpm |
No | Replaces TPM emulation state. |
Wait for a shutdown or stop task to finish before using a command marked as requiring power-off.
Set name and description
Section titled “Set name and description”Name and description may be changed while the VM is running:
doas sylve vms config name \ --rid 301 \ --name docs-alpine-configured \ --json
doas sylve vms config description \ --rid 301 \ --description "Configured through the VM CLI" \ --jsonEach response identifies the configuration that was updated:
{ "updated": true, "rid": 301, "configuration": "name"}An explicit empty description clears it. A VM name must satisfy the service’s normal name validation.
Replace CPU topology and pinning
Section titled “Replace CPU topology and pinning”CPU configuration is a full replacement. Supply sockets, cores per socket, threads per core, and an explicit pinning decision:
doas sylve vms config cpu \ --rid 301 \ --sockets 1 \ --cores 2 \ --threads 1 \ --clear-pinning \ --jsonThe resulting vCPU count is sockets multiplied by cores multiplied by threads. All topology values must be positive.
To pin virtual sockets to host CPU cores, repeat --pin using socket:core,core syntax:
doas sylve vms config cpu \ --rid 301 \ --sockets 2 \ --cores 2 \ --threads 1 \ --pin 0:0,1 \ --pin 1:2,3--clear-pinning and --pin cannot be combined. Pinning is never removed merely because the option was omitted.
Change memory
Section titled “Change memory”RAM accepts human-readable byte sizes:
doas sylve vms config memory \ --rid 301 \ --ram 2GiB \ --jsonLoki accepted the change and returned "configuration": "memory". The complete VM inspection reports RAM in bytes when JSON output is requested.
Patch VNC settings
Section titled “Patch VNC settings”VNC is a partial update. Omitted settings, including the password, remain unchanged:
doas sylve vms config vnc \ --rid 301 \ --resolution 1280x720 \ --wait=true \ --jsonSupported changes are:
--enabled=true|false--port <1-65535>--bind <address>--resolution <width>x<height>--wait=true|false--password-file <host-path>--clear-password
--password-file and --clear-password are mutually exclusive. The file is read on the Sylve host, and ordinary inspection never returns the VNC password.
Enable the serial console
Section titled “Enable the serial console”Set serial state explicitly:
doas sylve vms config serial \ --rid 301 \ --enabled=true \ --jsonThis enables bhyve serial plumbing. The guest must still configure its bootloader and operating system to use the serial console. The access guide covers preflight and connection commands.
Replace PCI passthrough assignments
Section titled “Replace PCI passthrough assignments”PCI configuration replaces the complete assignment. Repeat --device-id for every passthrough record that should remain assigned:
doas sylve vms config pci \ --rid 301 \ --device-id 4 \ --device-id 7 \ --jsonClear all assignments explicitly:
doas sylve vms config pci --rid 301 --clear --jsonOn Loki, clearing an already-empty assignment returned "updated": false. This is a successful no-op, not an error.
Configure TPM emulation
Section titled “Configure TPM emulation”Enable or disable the emulated TPM:
doas sylve vms config tpm --rid 301 --enabled=true --jsonEnabling TPM updates the VM definition and causes Sylve to manage the swtpm runtime and state files when the VM starts. Disabling it stops the associated TPM runtime when necessary.
Use the interactive console
Section titled “Use the interactive console”Place the RID immediately after the configuration leaf command:
vms config name 301 --name docs-alpinevms config cpu 301 --sockets 1 --cores 2 --threads 1 --clear-pinningvms config memory 301 --ram 2GiBvms config vnc 301 --resolution 1280x720 --wait=truevms config serial 301 --enabled=truevms config pci 301 --clearvms config tpm 301 --enabled=trueUse vms get 301 --json afterward to verify the resulting persistent configuration.