* 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>
* fix: regenerate stale cloud-init secret name after VM name change
When creating a VM, the cloud-init/sysprep secret name was generated
once and cached for the component's lifetime (needNewSecret is always
false during create). If a first create attempt was rejected by the
API (e.g. duplicate name) and the user corrected the name and retried,
the VM was created successfully but reused the secret name derived
from the rejected attempt, and any subsequent secret-creation failure
surfaced as a stale error after the VM already existed.
Now the secret name (and Windows sysprep secret name) is regenerated
whenever the VM name prefix used to generate it no longer matches the
current name, and is proactively reset on a failed create attempt so
retries always start fresh.
Fixesharvester/harvester#11174
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* feat: allow suer give static IP for VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
When editing a Virtual Machine's volumes, if the user selects 'No media' for the Image, the 'harvesterhci.io/os' label is incorrectly removed from the VM's metadata.
Related to: https://github.com/harvester/harvester/issues/10947
Signed-off-by: Volker Theile <vtheile@suse.com>
* feat: add filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update some wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and enable filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and update icon button positioning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove wrong feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: vm template
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add filesystem tab in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update some wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and enable filesystem tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add support for filesystem feature flag and update icon button positioning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: tab name
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add autoattachPodInterface in edit VM mode if no network interface configured
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded code
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: do not set cpu.maxSockets for ARM clusters
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: remove maxSocket to fix bug on ARM cluster
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: allow edit as yaml in create VM page if empty CPU or memory
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove getCPUMemoryValidation
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: unable to create VM via l2vlan network
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on discussion
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: unable to attach Ti volume in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: only consider Ti / Gi for attached volume
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add maxCPU and maxMemory
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add hotplug dialog
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add restart message
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: let VM template support cpuMemoryHotplug
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add max-hotplug-ratio setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* reset network / user script when choosing windows
Signed-off-by: Andy Lee <andy.lee@suse.com>
* change OS type from Windows init user and network data
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
(cherry picked from commit 9dd8ae479ad608f3e3a6fe55848113ef4184cc1f)
Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
* fix undefined error whenclick save in edit as yaml
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix VM isEqual logic and fix undefined error
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add volume mode option for non-longhorn volume
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix default storage class in create VM page
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>