Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Power on and off fail to work on VMs with .spec.running field defined #19

Open
starbops opened this issue Jul 30, 2024 · 2 comments
Assignees
Labels
area/ipmi Front-end protocol related and it's IPMI kind/bug Something isn't working

Comments

@starbops
Copy link
Owner

Describe the bug

Given the following VirtualMachine object defined:

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: testvm
spec:
  running: false
  template:
    metadata:
      labels:
        kubevirt.io/size: small
        kubevirt.io/domain: testvm
    spec:
      domain:
        devices:
          disks:
            - name: containerdisk
              disk:
                bus: virtio
            - name: cloudinitdisk
              disk:
                bus: virtio
          interfaces:
          - name: default
            masquerade: {}
        resources:
          requests:
            memory: 64M
      networks:
      - name: default
        pod: {}
      volumes:
        - name: containerdisk
          containerDisk:
            image: quay.io/kubevirt/cirros-container-disk-demo
        - name: cloudinitdisk
          cloudInitNoCloud:
            userDataBase64: SGkuXG4=

Users will fail to power on the VM with ipmitool power on command. There's no relevant logs shown in the corresponding virtbmc Pod.

If the VM is already in the running state, it cannot be powered off via ipmitool power off either. Same "unsupported command" output returned by the tool.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare a Linux box
  2. Install RKE2
  3. Install KubeVirt
  4. Deploy KubeVirtBMC
  5. Create a VirtualMachine with .spec.running field defined
  6. Try to power on the VM using ipmitool

Expected behavior

Users should be able to power on and off the

Screenshots

image

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Kubernetes version: v1.28.11+rke2r1
  • KubeVirt version: v1.1.0
  • KubeVirtBMC version: v0.3.0

Additional context

We only handle power on and off commands with VM RunStrategy. We better also have .spec.running taken into account.

@starbops starbops added kind/bug Something isn't working area/ipmi Front-end protocol related and it's IPMI labels Jul 30, 2024
@starbops
Copy link
Owner Author

starbops commented Nov 5, 2024

Still having the same issue even we supported both running and runStrategy styles in the virtbmc component.

This is because we hard-coded the agent image to starbops/virtbmc:dev:

virtBMCImageName = "starbops/virtbmc"
virtBMCImageTag = "dev"

We need to expose these values as configurable flags.

@starbops
Copy link
Owner Author

We can now verify this again since we had #33 fixed.

@starbops starbops self-assigned this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipmi Front-end protocol related and it's IPMI kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant