-
Notifications
You must be signed in to change notification settings - Fork 126
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/Feature request] IP addresses does not persist on KubeVirt VMIs after restart #500
Comments
Hi @saffronjam, could you please share the logs? |
Hi, We are using a two-node setup, here are the logs for the two nodes for the Whereabouts pod when I created 10 VMI's requesting IP's. It seems to be only verbose and debug logs. Node 1:
Node 2 (a larger node causing more of the 10 VMs I created to start here):
Scripts to reproduceThe following scripts uses this VM template:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: $NAME
spec:
runStrategy: Always
template:
spec:
domain:
devices:
interfaces:
- bridge: {}
name: host-network-bridge
memory:
guest: 512Mi
resources: {}
terminationGracePeriodSeconds: 180
networks:
- multus:
default: true
networkName: kube-system/host-network-bridge
name: host-network-bridge And the NAD config from above: {
"cniVersion": "0.3.1",
"name": "host-network-bridge",
"type": "bridge",
"bridge": "br0",
"ipam": {
"type": "whereabouts",
"range": "192.168.100.2-192.168.100.254/24",
"gateway": "192.168.100.1",
"routes": [
{
"dst": "0.0.0.0/0",
"gw": "192.168.100.1"
}
],
"dns": {
"nameservers": [
"8.8.8.8",
"8.8.4.4"
]
}
}
}
Here are a few commands I used:
for i in {1..10}; do NAME="vm-$i" envsubst <vm-templ.yml | kubectl apply -f -; done
kubectl get vmis -o json | jq -r '.items[] | "\(.metadata.name)\t\(.status.interfaces[0].ipAddress)\t\(.status.nodeName)"' | sort -t '-' -k2,2n > ip-$(date +%Y%m%d-%H%M%S).txt
kubectl delete vmi --all -n default
kubectl get vmis -o json | jq -r '.items[] | "\(.metadata.name)\t\(.status.interfaces[0].ipAddress)\t\(.status.nodeName)"' | sort -t '-' -k2,2n > ip-$(date +%Y%m%d-%H%M%S).txt
kubectl delete vm --all -n default This should create two files where the IPs are different, meaning it is not sticky, which we would really like to have! 😄 Lmk if you need any other logs or information regarding our setup. |
@maiqueb, any thoughts here? |
Hello! We've been trying out whereabouts for our VM management using KubeVirt and it has worked great so far.
However, we've noticed that restarts to KubeVirt VMI's seems to release the IP address, even though the VM is very much still there. We also know that we are not the only one asking for this behavior.
We are using kubemacpool to ensure VMs get their unique MAC address that persist, but this IP management seems to not work the same way.
So, we are not sure if this is a bug or a feature request, or just "help wanted", hence the loose style of this issue.
And we ask for some pointers in how we can ensure sticky IP address assignment to VMs from a pool.
System info
Whereabouts version: 0.8.0 (latest as of writing this)
Kubernetes version: 1.30.3
KubeVirt version: 1.3.1
Config
Reproduce
Thanks!
The text was updated successfully, but these errors were encountered: