Description of problem:
After creating a virtual machine, I exposed the ssh port with the following command:
virtctl expose vm lars-test-vm-1 --port=22 --name=lars-test-ssh --type=NodePort
Which generated the following service:
- nodePort: 32733
This worked fine and I was able to connect to the virtual machine by running "ssh -p 32733 <worker-hostname>".
I then stopped the virtual machine:
virtcl stop lars-test-vm-1
And restarted it:
virtctl start lars-test-vm-1
Now I am no longer able to connect to the ssh port on the virtual machine. Additionally, if I delete the service and re-run the `virtctl expose` command, the new NodePort is also unable to connect.
Version-Release number of selected component (if applicable):
OCP 4.5.13 baremetal
Steps to Reproduce:
1. start new virtual machine
2. expose a service using 'virtctl expose ... --type=NodePort'
3. stop the virtual machine
4. start the virtual machine
NodePort can no longer access the virtual machine
I am able to connect to a virtual machine after restarting it.
Lars, does the VM have IP configured after the restart? Services aside, are you able to ping outside network from the VM after the restart?
I can't reproduce the behavior I was seeing, so maybe something else was going on. There's been an OCP upgrade and a complete power shutdown/restart since then. Maybe I just hadn't had enough coffee.
Hehe, no worries man! I suspect it may have been caused by the guest IP configuration. Sometimes the guest uses its DHCP client on the first boot but (unless configured by the user) not on the second+. Please let me know if this happens again.