Bug Description
DataVolume template names in disk.go and database.go are hardcoded strings ("virtwork-disk-data" and "virtwork-database-data" respectively) without incorporating the VM instance name or index. When deploying multiple VMs of the same workload type via `--vm-count > 1`, all VMs reference the same DataVolume name. This will cause resource conflicts in the Kubernetes API since DataVolume names must be unique within a namespace.
Steps to Reproduce
- Run `virtwork run --workloads disk --vm-count 2`
- Observe that both VMs attempt to create/reference a DataVolume named `virtwork-disk-data`
- The second VM fails due to name conflict
Expected Behavior
DataVolume names should incorporate the VM name or an index suffix (e.g., `virtwork-disk-data-0`, `virtwork-disk-data-1`).
Actual Behavior
All VMs of the same workload type reference identical DataVolume names, causing Kubernetes API resource conflicts.
Command
virtwork run
Workload Type
disk, database
Go Version
Not provided
Deployment Mode
Not provided
Additional Context
Severity: High
Files:
- `internal/workloads/disk.go:117` — `vm.BuildDataVolumeTemplate("virtwork-disk-data", ...)`
- `internal/workloads/database.go:127` — `vm.BuildDataVolumeTemplate("virtwork-database-data", ...)`
Bug Description
DataVolume template names in
disk.goanddatabase.goare hardcoded strings ("virtwork-disk-data"and"virtwork-database-data"respectively) without incorporating the VM instance name or index. When deploying multiple VMs of the same workload type via `--vm-count > 1`, all VMs reference the same DataVolume name. This will cause resource conflicts in the Kubernetes API since DataVolume names must be unique within a namespace.Steps to Reproduce
Expected Behavior
DataVolume names should incorporate the VM name or an index suffix (e.g., `virtwork-disk-data-0`, `virtwork-disk-data-1`).
Actual Behavior
All VMs of the same workload type reference identical DataVolume names, causing Kubernetes API resource conflicts.
Command
virtwork run
Workload Type
disk, database
Go Version
Not provided
Deployment Mode
Not provided
Additional Context
Severity: High
Files: