* feat: add component health dashboard sections
Add health summary and component health tables with severity filters and expandable check details.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* feat: use health API group for component health resources
Update dashboard resource types to use the health.harvesterhci.io API group.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* feat: add component health ignore controls
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* feat: gate component health behind the componentHealth feature flag
Only show the component health dashboard sections on Harvester v1.10.0 and later.
Signed-off-by: Jack Yu <jack.yu@suse.com>
* fix: address component health review comments
- sort the health summary table by a severity rank
- use buttons instead of anchors for restore and show more actions
- let the affected resources list expand so every resource can be restored
- widen the ignore popup and cap its height
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* refactor: split component health into dedicated components
Move the health summary, component health tabs and ignore popup out of
the dashboard page into components/health, and share the constants and
helpers through utils/component-health.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* fix: sort component health by severity rank
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* fix: toggle health rows in place and tell empty filters from no checks
- toggle the expanded message and resource ids by mutating the unwrapped
arrays, the template does not pass refs
- show "No checks match the selected filters" when the severity filters
hide existing checks, keep "No issues detected" for a report without
checks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* refactor: fetch component health resources in their own components
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
* feat: move health into a Components tab with the checks as sub-rows
The dashboard showed the summary table, then side tabs with a second
table for each component. It is now one table in a new Components tab
next to the Events tabs: one row per component, which opens to its
checks. Rows start closed, and the component name is a button so the
keyboard can open them. The tab only shows when the addon's resources
exist.
The table's own filter box replaces the severity dropdown. It only looks
at the table's own rows and the checks are in the sub-rows, so the rows
give it the text of their checks, a row only shows the checks it found,
and the rows it found open.
Ignoring a check moves from a popover, which cut off its Reason field
and Ignore button, to an RcModal that starts over each time it opens.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: use RcButton for the component health buttons
The Ignore modal's button already was one. This moves the rest of them,
the row's Ignore, Restore, the "show more" links and the component name,
off the global btn classes.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: manage one ignore rule per check from the row's actions
A check now has one rule, reached through the table's action menu: create
it when the check has none, view, edit or delete it when it has one. View
and edit use the same modal as create. This replaces the Ignore button and
the Restore links, which could only delete a whole rule and said the check
was restored when it wasn't.
The modal's section titles were the radio group's h3, as big as the modal's
own title. They follow what rancher/dashboard does in its forms now.
The actions follow what the user may do. The rules are only loaded with
their schema, and a list that fails no longer empties the table.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: let the tables filter by themselves and show resources as chips
The filter had logic of its own on top of the table's. The nested table now
filters its rows the way the outer one does, with what is typed in the box.
Rows no longer open by themselves, which is how the other tables with
sub-rows behave. Expand All and Collapse All are there instead, copied from
what the table has from shell 3.0.15.
Affected resources are chips under the name the UI has for their type, with
the usual counter badge and the API version beside it. Ignored resources are
outlined instead of filled, and the text of an ignored check is muted. The
links use the shell's wording.
The component rows lose Last Updated. The summary only has one time, for its
counts as a whole, so it said nothing about the component in the row. They say
Error instead of Critical, as the checks inside them do. The Node column goes,
as nothing sets its label.
The Components tab shows the number of errors as a badge, as nothing else on
the page tells there are any.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: name the ignore rule after its check and make its expiry clear
- Name the rule the UI makes after its check, so Kubernetes refuses a
second one for the same check. The row's menu only manages that rule.
- Show the rule's current expiry above the durations, and the new one
under them once a duration is chosen. Edit starts with none chosen,
Save stays off until something changes, and a warning says when an
expired rule would stay expired.
- Delete the rule through the shell's delete prompt, like every other
delete.
- Say which list could not be loaded, instead of showing it as empty.
- Keep the full count of affected resources, say how many ignored ones
are left out of the list, and count them on Show ignored.
- Drop the checks' Last Updated, which is the time of their whole report.
- Leave out the row menu when no check has an action.
- Mark the Components tab with the shell's alert icon when there are
errors, with their number in its tooltip, instead of a badge.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Jack Yu <jack.yu@suse.com>
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Jack Yu <jack.yu@suse.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix: show the VNC console's dialogs in full screen
Only the console went full screen and dialogs render outside of it, so the
Ctrl+Alt+Del and Soft Reboot confirmations, among others, stayed hidden behind
it until full screen was left. Put the whole page in full screen instead.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: bring back deleting saved VNC console shortcut keys
The Vue 3 migration dropped the close button from the list of saved shortcuts,
which left no way to delete one. Restore it, and remove by position in the list:
the old code parsed the displayed HTML to find the shortcut, which cannot match
one with the Space key in it, such as Ctrl+Space.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: tidy the VNC console's custom shortcut keys
Give the saved shortcuts in the menu the same space as the separator above
them, and name the dialog's buttons Cancel and Save, which say what they do.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: align the storage performance options with the Rancher machine pool form
Show the storage performance profile on every volume instead of behind a
collapsible toggle, and move the VM-wide options to a plain Storage
Performance section in the Advanced Options tab. Put the Native I/O tip in
a live region so screen readers announce the cache mode change, use an
integer input for the I/O thread count, and use the same copy as the
Rancher form.
Skip the view-only backup row in the image and container volumes when it
has nothing to show, so it no longer adds an empty gap above the profile.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: announce the storage performance warnings and name the virtio requirement
- Put the bus tip and the Filesystem warning in an always-rendered status
region. They appear above the field being changed, so screen readers need
them announced.
- Say in the bus tip that a dedicated I/O thread needs the virtio bus, because
KubeVirt rejects it on any other bus.
- Mark I/O Thread Count as required while editing, like the Rancher form.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: state only the dedicated I/O thread requirement in the bus tip
Neither the Harvester docs nor KubeVirt tie cache mode or I/O mode to the bus,
so stop saying that those options work best on virtio.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show quotes in high-performance storage hints and keep Custom profile
The Native I/O and I/O threads policy hints were passed to Banner as
:label="t(...)". t() escapes HTML and Banner escapes the label again,
so the quotes showed up as ". Use label-key instead, which renders
the string once.
Picking the Custom performance profile and then choosing options that
match the Default or High Performance preset flipped the selector back
to that preset. Keep an explicit Custom choice and only infer the
profile from the disk values otherwise.
Related: harvester/harvester#11550
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: only keep Custom profile when the user picked it
syncProfile() skipped re-detection whenever the profile was Custom,
including a Custom that was inferred from the disk values. In an
existing-volume row, switching from a volume with a WriteBack override
to one with High Performance values left the selector on Custom.
Track the user's explicit Custom choice in its own flag and use that
in the guard, so an inferred Custom still follows the disk values.
Related: harvester/harvester#11550
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* test: cover the label-key hints of VMPerformanceOptions
Check that the I/O threads policy and no virtio disk hints are passed to Banner as label keys, so their quotes are not escaped twice, and that the I/O threads policy hint is hidden once a policy is set.
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
---------
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Kube-OVN sets a subnet's VPC (ovn-cluster when none is given), but a
subnet it hasn't processed, such as one with an invalid provider, has
none. The VPC page grouped those under "Virtual Private Cloud:" with an
empty name, and its Create Subnet, Topology and actions buttons pointed
at no VPC.
Show None as the VPC name for that group and leave out its VPC buttons.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
The PCI, SR-IOV Network, SR-IOV GPU, vGPU, vGPU MIG and USB device pages
were listed under Advanced. Give them their own top-level group, placed
after Backup and Snapshots. Add-ons stay under Advanced.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: switch the product name with Rancher Prime
Use a [[Harvester]] token for the product name in the translations, so
Rancher 2.16 fills it from the l10n global that harvester-manager
registers: SUSE Virtualization on Rancher Prime, Harvester otherwise.
Rancher before 2.16 shows the tokens as written, so on those hosts (and
standalone) the extension resolves them to Harvester itself.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: switch the standalone product name with the server flavor
Standalone has no Rancher Prime, so register the [[Harvester]] l10n
global from the server-flavor setting instead: SUSE Virtualization on
prime, Harvester otherwise.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: point the network policy banner to the documentation
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: use the SUSE theme in standalone Prime
Standalone Prime kept the harvester brand and only overrode the primary
colour, so the rest of the palette and the fonts didn't match Rancher
Prime. Switch the ui-brand setting to suse in the store when the server
flavor is prime, which makes the shell load the SUSE theme.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the SUSE theme after a brand setting change event
The watcher also reads the setting's value, so a change from the server
loaded into the same object switches the brand back to suse.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* chore(deps): bump @rancher/shell to 3.0.14
3.0.14 resolves [[name]] tokens in translations from values registered
as l10n globals, which the standalone UI needs to pick the product name.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: save cloud-config template edits with @rancher/shell 3.0.14
The YamlEditor of shell 3.0.14 no longer emits onChanges, so editing a
template saved its old cloud config. Copy the text from update:value,
which both shell versions emit.
Jest transforms @replit/codemirror-vim-core, an ESM-only dependency of
the new YamlEditor, like the dashboard does.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the YAML editor heights with CodeMirror 6
The min-height rules targeted the CodeMirror 5 element, so the editors
shrank to their text.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject IP ranges the network settings don't support
The CIDR check of @rancher/shell 3.0.14 also accepts short forms such as
10.1/16, extra parts and IPv6, so the VM migration, RWX and storage
network settings saved them. Use a strict IPv4 CIDR check of our own.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the look of the file selector buttons
The FileSelector of @rancher/shell 3.0.14 no longer takes button classes
and renders a medium secondary button. Pass the variant and size that
match the previous primary and secondary buttons.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep Enter in a migration wizard field on the same step
The Wizard of @rancher/shell 3.0.14 renders its step headers as submit
buttons, so Enter in a text field clicked the first one and jumped back
to step 1.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show the created message after a restore, upgrade or upload
Since @rancher/shell 3.0.14, save() no longer shows the message for
resources with a generated name; callers show it with
notifyGeneratedName().
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: fold the logging output buffer with the CodeMirror 6 helpers
The YAML editor of @rancher/shell 3.0.14 is CodeMirror 6, and its
CodeMirror 5 methods are deprecated.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the shell's table views off in standalone
@rancher/shell 3.0.14 turns its table views on for every list in the
standalone UI, as the server has no ui-configurable-tables feature and
the default is on. The table views drop the filters the lists put in the
table header, which also left the Images list empty. Add the feature,
disabled, to the management store in standalone only.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject zero-padded octets in IP ranges
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: move OS type, CPU model and system options to the VM Basics tab
OS Type, CPU Model and the CPU/system checkboxes (CPU pinning, USB
tablet, TPM, EFI, Secure Boot and their persistent-state options) are
core machine settings, but they were buried at the bottom of Advanced
Options. Show them on the Basics tab, next to CPU and memory.
Install Guest Agent stays in Advanced Options because it changes the
cloud config. It now sits right below the User Data editor (the data it
modifies) through a new optional slot in the Cloud Config component.
Only the placement changes; behaviour and validation are untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* feat: follow the review on the VM Basics layout
- Basics now reads OS Type and CPU Model, then CPU and memory, then the
system checkboxes, the CPU Manager banner and the SSH key, in the order
proposed in review. The checkboxes sit in one wrapper; USB Tablet drops
its extra mt-20 and uses the plain `check` class like the others.
- Advanced Options puts Maintenance Strategy on the same row as Run
Strategy; Reserved Memory moves to its own row.
- The moved labels leave harvester.virtualMachine.advancedOptions: TPM,
EFI, Secure Boot and the persistent-state labels are now under
harvester.virtualMachine.systemOptions (also used by the template
version editor), and the CPU Manager banner text is under
harvester.virtualMachine.cpuPinning.cpuManager.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* feat: match the VM template form and address review on the VM Basics layout
The VM template form still had OS Type, CPU Model and the CPU/system
checkboxes under Advanced Options, so creating a VM and creating a
template put them in different places. Use the same layout as the VM
form:
- Basics: OS Type and CPU Model, then CPU and memory, then the CPU
Pinning, USB Tablet, TPM, EFI and Secure Boot checkboxes (plus the
persistent-state options when they apply), then the SSH key.
- Advanced Options: Run Strategy and Maintenance Strategy on one row,
Reserved Memory on its own row, then Show more and Cloud Config.
Install Guest Agent sits right below the User Data editor through the
after-user-data slot.
Review follow-ups on both forms:
- OS Type shows an info icon in create mode warning that selecting an
image with an OS label on the Volumes tab may change the OS Type
selection, now that OS Type comes before the volumes.
- The CPU Manager banner under CPU Pinning is info in create mode, where
it only explains why the checkbox is disabled, and stays a warning in
edit mode, where it is about the restart.
Only placement and presentation change; behaviour and validation are
untouched.
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
---------
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat: improve vnc console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: keep VNC console retries from kicking the active session
Builds on "feat: improve vnc console" (#1147) by Andy Lee.
- Keep retrying with preserveSession after a failed reconnect attempt, so a
displaced console waits for the other session to be released instead of
failing immediately or taking the console back.
- Close the RFB socket when noVNC asks for credentials, so a failed console
does not hold the VNC session.
- Restore Custom Shortcut Keys, which were removed in #1147.
- Add unit tests for the console reconnect behavior.
Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: expose VNC quality and compression settings
- Add 0-9 sliders for the JPEG quality and compression level, which were
already passed to noVNC but could not be changed.
- Mark the connection status as a polite live region so screen readers
announce connection changes.
Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: gate VNC session protection by version and rework the in-use screen
- Add the vncPreserveSession feature flag for Harvester v1.7.0, the first
release whose KubeVirt (1.6.3) honours preserveSession. Without it the
console connects as before, offers no Take Over and does not reconnect on
its own after the session drops, so two open consoles no longer keep
kicking each other out.
- Replace the error page with a short card that says when the console is in
use, and confirm Take Over in a modal instead of window.confirm.
- Keep the overlay text readable on its dark background.
- Show "Connected (view only)", translate the Ctrl+Alt+Del label and remove
unused translation keys.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: show whether the VNC console has keyboard focus
noVNC hides the canvas focus outline, so nothing showed where typing would go.
Draw a ring around the console while it has focus, show a toolbar hint
("Typing goes to the virtual machine" / "Click the console to type"), focus
the console when it connects and return focus to it after sending keys from
the toolbar.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: confirm Ctrl+Alt+Del and Soft Reboot in the VNC console
Both buttons can restart the virtual machine with one click: Soft Reboot
always, and Ctrl+Alt+Del on most Linux guests. Ask in a modal first, as the
VM list already does for Soft Reboot, and return focus to the console after.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: return focus to the VNC console after its confirm modal closes
The modal gave focus back to the toolbar button that opened it, so typing
did not reach the console until it was clicked again.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: drop the VNC keyboard focus hint from the toolbar
The ring around the console already shows when it has keyboard focus.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Alejandro Bonilla <abonilla@suse.com>
* perf: speed up the VM list with many VMs
The VM list scanned whole store lists for every row and re-evaluated the same values per row on every render and sort. With several hundred VMs this blocked the browser on sorting and on every VM update.
Performance:
- look up launcher pods and migrations through shared indexes (namespace/name -> resource) instead of scanning per row; the indexes are computed per store list, so they stay in sync with in-place store updates
- use the same migration lookup (getLatestMigration) in the VM model and on the VM detail page
- look up PVCs, PVs, VMIs and restore backups by id
- merge VMs and VMIs with a Set
- evaluate the VM state once when sorting by state
- check the unschedulable condition before the pod based state checks
- cache feature flag results and per-schema/per-setting values that are the same for every row
Bug fixes:
- the launcher pod map was never rebuilt, because the store keeps the same array
- pods, volumes and migrations of a VM with the same name in another namespace could be picked up
The order of the volumes of a VM (vm.volumes) now follows the VM spec instead of the store order. Nothing depends on it.
Measured in a synthetic setup, 100 rows per page, sorting by state (Chrome, dev build):
- ~490 VMs, ~500 PVCs/PVs: 1.9 s -> 1.0 s
- ~490 VMs, 600 PVs, 200 migrations: 6.0 s -> 0.7 s, main thread blocked during VM updates 78% -> 32%
With few volumes the gain is much smaller (8-20%).
Related to: https://github.com/harvester/harvester/issues/9513
Signed-off-by: Volker Theile <vtheile@suse.com>
* fix: read VM data from the store of the resource instead of a fixed one
The migrations of a VMI and the migration badge of the state column were read from the hardcoded `harvester` store. In the Rancher explorer (embedded and standalone) the data is loaded into the `cluster` store, so a running migration was shown neither in the VM state nor as badge.
The VM model remembered the store of the current product in a module variable on first use and never updated it. The same model is used in the Harvester product (`harvester` store) and in the Rancher explorer (`cluster` store), and Rancher keeps the page loaded when going from the explorer of a Harvester cluster to Virtualization Management and into the Harvester product. The VM list then read the VMIs, launcher pods, volumes and restores from the wrong store, and running VMs were shown as Starting until the page was reloaded.
Read the data from the store the resource lives in (`this.$getters`, in the formatter the store of the current product). In the Harvester product this is still the `harvester` store, so nothing changes there.
Not covered: volume details like the lock icon of encrypted volumes. The explorer uses the generic Rancher PVC model, which does not know them, and settings based checks (feature flags, backup target) are not loaded there either.
Related to: https://github.com/harvester/harvester/issues/11882
Signed-off-by: Volker Theile <vtheile@suse.com>
---------
Signed-off-by: Volker Theile <vtheile@suse.com>
The storage performance options ship in Harvester v1.9.1, not v1.9.0.
Move highPerformanceStorage to the v1.9.1 feature flags so the UI does
not offer them on v1.9.0 clusters.
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Add an "Enable network boot (PXE)" option to bridge network interfaces and
a VM-level choice to place network boot devices before or after volumes.
The form now owns interface boot order: enabled NICs get sequential boot
orders ahead of or behind the volumes, and a stale bootOrder is no longer
inherited from the old spec.
This also fixes editing a VM whose interface bootOrder was set in YAML
(the documented workaround): the form used to renumber disks from 1 while
keeping the NIC's bootOrder, producing a duplicate that KubeVirt rejects.
The boot order shown on the VM, snapshot and backup detail pages now
includes network interfaces.
Related: harvester/harvester#3325
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat: expose KubeVirt high-performance storage features in VM and Volume UI
Adds UI to configure KubeVirt high-performance disk/storage settings that
were previously only reachable via VMBuilder/Terraform:
- Per-volume "Storage Performance Options": a performance profile
(Default / High Performance / Custom) exposing per-disk cache, io and
dedicatedIOThread on all disk types (VM image/root, new, existing,
container) and on the standalone Volume form.
- VM-wide "High Performance (I/O Threads and Multi-Queue)": blockMultiQueue
and ioThreadsPolicy (+ supplemental-pool thread count), shown only in the
VM section since these are domain-level and cannot be set per-PVC.
- Compatibility guardrails: io=native forces cache=none; cache=none on
Filesystem volumeMode warns; blockMultiQueue requires a virtio disk.
Ref: harvester/harvester#11550
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: address review feedback on high-performance storage UI
Resolves the Copilot review comments on #1133:
- Gate the whole feature behind a new `highPerformanceStorage` release
feature flag (v1.9.0) so older supported clusters never render the
controls or receive unsupported KubeVirt fields.
- Force Cache Mode to "none" whenever Native I/O is selected, including
from the "Default" ('') cache value, and disable every non-"none" cache
option (Default included) while Native is active. Previously the empty
cache value slipped past the guardrail and produced an invalid combo.
- Clear an already-enabled blockMultiQueue when the last virtio disk is
removed, so a disabled checkbox can no longer persist an invalid setting.
- Strip stale cache/io/dedicatedIOThread fields from the merged disk spec
when a regenerated disk no longer requests them, so switching a disk back
to "Default" (or unchecking Dedicated I/O Thread) while editing no longer
silently preserves the previous values.
- Expose the disclosure toggle's state to assistive tech via aria-expanded
and an expand/collapse aria-label.
- Add unit tests for the profile transitions and the Native/cache guardrails.
Ref: harvester/harvester#11550
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: address second-round review on high-performance storage UI
Resolves the two Copilot findings on #1133 and votdev's UX feedback on
harvester/harvester#11550:
- Restore the disk's original bus when the performance profile goes back
to "Default". The "High Performance" preset switches the bus to virtio,
but leaving the preset only cleared cache/io/dedicatedIOThread, so a
SATA/SCSI disk was silently left on virtio — a bus change that can make
an existing guest unbootable. The pre-preset bus is now remembered and
put back, unless the user picked a different bus themselves in the
meantime.
- Pass the VM-wide performance values from the VM detail page to the
shared Volume component. The mixin already parsed them via
getInitConfig(), but the detail caller never forwarded them, so
VMPerformanceOptions fell back to its prop defaults and hid itself in
view mode — configured blockMultiQueue / ioThreadsPolicy settings were
invisible. They are also refreshed in the value watcher so the panel
does not go stale.
- Make the VM-wide "High Performance" panel expandable/collapsible,
matching the per-volume "Storage Performance Options" disclosure. It
stays collapsed unless the VM already has something configured, so the
average user is not faced with specialist tuning controls by default.
- Fix the unit tests to use Vue Test Utils v2 mount options. They used
the v1 top-level `mocks` key, which VTU 2.x ignores, so every case
failed on mount. The repo has no jest config or test script, so this
was not caught. Add coverage for the bus save/restore behaviour.
Ref: harvester/harvester#11550
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
---------
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The LVM add-on reaches GA in v1.9.1 and only supports dm-thin.
Gate the striped option behind a v1.9.1 feature flag, default new
LVM storage classes to dm-thin, and reset a cloned striped type so
older clusters keep the current behaviour.
Related issue: harvester/harvester#11731
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
kickSideNav toggled a dummy favorite via addFavorite/removeFavorite, which persist through prefs/set and issue a PUT /v1/userpreferences on every toggle, flooding the backend and surfacing 500 errors. Switch to the in-memory prefs/load mutation so the SideNav still re-renders without any network request.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: use prime logo when server-flavor is prime
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: expose server-flavor setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add k3k addon UI
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add rancher-k3k addon UI
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove k3k edit page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: k3k addon description
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
In Harvester v1.9.0, we're moving LHv2 from "Experimental" to "Preview",
so I've added a new preview label to the settings interface. I figure
given Experimental had the "error" color, I should make "Preview" use
the warning color, to make it a bit less alarming :-)
Related-to: https://github.com/harvester/harvester/issues/9960
Signed-off-by: Tim Serong <tserong@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
* fix: vGPU doesn't display in edit VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: align PCI passthrough action buttons height
Match the enable/disable passthrough and Actions dropdown buttons to 40px and move the selected-count label below them.
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: prevent duplicated cloud-config for empty user data
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: AI review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* deps: update rancher/shell to 3.0.12-rc.7
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: move filter labels/schedule buttons position
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat(serial-console): add terminal search toolbar and highlight tuning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: clear searach result after close
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fine tune serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: project resource quota not set in POST API payload
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: guard onQuotasInput against undefined payload
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Show a Shareable checkbox when attaching an existing volume whose
PVC is RWX Block and not provisioned by Longhorn. Checking it sets
disk.shareable and shows a data-corruption warning banner.
Related issue: harvester/harvester#9650
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
* fix: VM migration tab not appear when first login
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add access/ volume mode model
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add selected all | clear all actions for selected VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: bugs in VM selection table
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Make syncStaticIpAnnotations idempotent so it no longer mutates VM
annotations when already in sync, breaking a reactive update loop that
froze the browser on the VM detail page. Also stack multiple IP
addresses vertically in the IP Address column.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat(vm): allow Cloud Config for Windows guests
Currently the Cloud Config editor is completely hidden when a VM's
OS Type is set to Windows, and no `cloudinitdisk` volume or secret
is written to the VM spec even if the user has entered content.
This blocks a common Windows-on-Harvester workflow: using
Cloudbase-Init to run first-boot configuration (install VMDP,
enable OpenSSH server, add authorized_keys, join a domain, run
`runcmd` steps, etc.). Users on Windows today have to hand-edit the
VM YAML after creation to attach a cloudinitdisk, which is fragile
and undiscoverable.
Changes:
- Remove the `v-if="!isWindows"` on the CloudConfig component so
the editor is available for every OS type. The Sysprep editor
continues to render only for Windows, so Windows now gets both
panels; Linux is unchanged.
- Drop the `if (!this.isWindows)` guard around the cloudinitdisk
volume serialization so the disk is attached whenever the user
provided user-data or network-data, regardless of OS.
- Drop the `|| this.isWindows` early-return in `saveSecret` so the
cloud-init secret is persisted for Windows VMs too.
- `getInitUserData` now returns a bare `#cloud-config\n` header for
Windows instead of the Linux qemu-guest-agent runcmd template
(which would fail on Cloudbase-Init). VMDP installs the QGA on
Windows as a native service, so the runcmd path is not needed.
The "Install guest agent" checkbox stays disabled for Windows
because it specifically drives the Linux QGA-via-runcmd recipe.
Fixes point 2 of harvester/harvester#11124.
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix(vm): do not clear cloud-config on isWindows watcher fire
The isWindows watcher runs on every change of the isWindows computed
property, including on mount when editing an existing Windows VM. Setting
this['userScript'] and this['networkScript'] to undefined at that point
wipes the cloud-config data that was just loaded from the existing VM's
cloudinit secret, so the Advanced -> Cloud Config editor shows empty
even though the VM has data on the wire.
Remove the two clears - Cloud Config is now supported for Windows guests
by this PR, so there is no reason to unset the user/network scripts when
the OS type is Windows. sshKey and installAgent remain gated (SSH keys
are injected via cloud-init on Linux only, and the qemu-guest-agent
package install checkbox does not apply to Windows).
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
* refactor(vm): Get CloudInit working for VM templates
- Remove unnecessary osType watcher in cloud config. The watcher (see `pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig/DataTemplate.vue`) that cleared the cloud config template for Windows VMs is no longer necessary.
- Automatically strip the CloudInit `User Data` properties `package_update` and `packages` for OS type `Windows`.
Signed-off-by: Volker Theile <vtheile@suse.com>
---------
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
* feat: add VMware VDDK image option to VM migration provider
Add an optional VMware VDDK Image field to the Configure Provider step of the VM migration wizard, bound to spec.settings.vddkInitImage when set and left unset when empty. Supports create and edit flows and populates from the existing provider when editing.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Show an error banner and disable the Create and Start action when the migration plan name matches an existing provider or migration plan name.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: new design for review page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: customize empty table rows message
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fixed the table column
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: update header tag and align fixed header actions in review migration step
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: remove unneeded overflow css
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify relatedResources using ownerReferences uid
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix(vm-migration): keep completed VMs green and linkable in failed plans
When a plan fails overall, VMs that already reached 100% were marked with an error: their progress bar turned red while the label still read "Finished Successfully", and the migrated-VM detail link was hidden.
Skip the plan-level failure fallback for VMs at 100% and drop the !planFailed guard from the detail-link condition so successfully migrated VMs stay green and stay navigable.
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: extract access mode strings to static ACCESS_MODE constant
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: destructure ACCESS_MODE variables in CDISettings.vue accessModeOptions
* refactor: destructure ACCESS_MODE at top level in all consumer files
* fix(lint): reorder imports to top of module in CDISettings, harvesterhci.io.volume, and VirtualMachineVolume
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
formatDuration returned an empty value when a migration was in progress (started set but completed missing), causing the duration column to show an em-dash for all running plans. It now computes elapsed time up to Date.now() when completed is absent, only returning the placeholder when started is unset or timestamps are invalid.
Related issue: harvester/harvester#10417
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor(host): update resource usage gauges and table column headers
- Replace ConsumptionGauge with PercentageBar in CPU/Memory/Storage
formatters to show the percentage next to the progress bar
- Rename the Disk State column header to Disk (via i18n)
- Display the CPU Manager column header on two lines
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add noopener noreferrer rel
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve VM migration dashboard mapping labels and VM detail link
- Display Management Network / Ignored labels via i18n in mappings column and review card
- Add clickable external-link icon to migrated VM detail page after successful migration
- Add tooltip to the VM detail external-link icon
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify duration column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>