bug: kvm multi host plan fails
See original GitHub issueProblem
kcli cannot create VMs, via a plan, spread across multiple physical hosts
Scenario
I have 3 kvm/libvirt nodes with the following plan:
---
parameters:
image: ubuntu2204
disk_size: 20
dev-cp-1:
client: lab-01
profile: large
image: {{ image }}
reservehost: false
disks:
- size: {{ disk_size }}
nets: [ br10 ]
dev-cp-2:
client: lab-02
profile: large
image: {{ image }}
reservehost: false
disks:
- size: {{ disk_size }}
nets: [ br10 ]
dev-cp-3:
client: lab-03
profile: large
image: {{ image }}
reservehost: false
disks:
- size: {{ disk_size }}
nets: [ br10 ]
Observations
- When I run
kcli create plan -f ~/.kcli/plans/k3s-dev1.yml k3s-dev
the first VM is created on the correct kvm node however kcli reports
lunix@lumbergh] (main) -> kcli create plan -f ~/.kcli/plans/k3s-dev1.yml k3s-dev
Deploying Vms...
Hypervisor not compatible with nesting. Skipping
Waiting for vm dev-cp-1 to finish customisation
VM dev-cp-1 not found
If I look on lab-01 the vm does exist.
Reading https://github.com/karmab/kcli/blob/master/kvirt/config.py#L2427 and I think perhaps the wait_finish method is connecting to my default ‘client’(kvm host) and not the appropriate one specified in the plan.
- If I change the plan so that each node has
client: lab-01
and runkcli -C lab-01 create plan -f ~/.kcli/plans/k3s-dev1.yml k3s-dev
then the plan completes.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
1004167 – KVM fails with "KVM internal error. Suberror: 2"
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 2 weeks. If you are still experiencing this...
Read more >KVM live migration fails but VM migrates · Issue #4695
we can observe strange errors when KVM virtual machine live-migration fails with error exit code, but VM itself actually migrates to another ......
Read more >5 Known Issues
If the installation fails on the setup due to network issues causing the KVM host to go into a NonResponsive status on the...
Read more >Bug #1651248 “Ubuntu16.10-KVM:Big configuration with ...
Bug Description · 1) In this configuration, Carol installed patch driver on KVM host to avoid the BUG_ON. · 2) To avoid missing...
Read more >KVM start failed (ubuntu image) - virtualization
Please, show virsh list --all . · To stop used virsh shutdown vm1 and it was created using virsh create vm1. · Are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
to use kube workflows with multihosts, you will need to leverage the vmrules functionality that allows you to overwrite attributes of vms at deployment time, matching them by their names (either through globbing or regex).
For instance, you would use the following in your parameter file
Actually, you can use this paramfile with your plan and remove the client lines you currently have and you will have the same behaviour
Thanks @karmab. I was able to run
kcli create plan -f ~/.kcli/plans/k3s-dev1.yml k3s-dev
and it completed just fine now.I haven’t tested using the built in
kube
creation because I am not sure how to do multi-host with that.