Ticket #21172 (closed defect: fixed)
Port forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/next 7.0.x maintenance
Reported by: | Osprey | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 7.0.0 |
Keywords: | port forwarding | Cc: | |
Guest type: | Linux | Host type: | Linux |
Description
Steps to reproduce:
- Configure port forwarding rule for some port on host to port 22 on virtual machine (used for SSH)
- Establish SSH session to host port that is forwarded: it is working
- take a snapshot of running VM
- restore a snapshot of running VM
- Try to establish SSH session to host port that is forwarded: connection just hangs and it does not get established (BUG)
- Restart VM and SSH can be established again
The same functionality was working on Virtualbox 6.x with the same VM.
Attachments
Change History
comment:1 Changed 3 months ago by aeichner
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 2 months ago by Osprey
- Status changed from closed to reopened
- Resolution invalid deleted
EDIT: Deleted. Will provide a new update.
comment:3 Changed 2 months ago by Osprey
I am uploading a set of logs after the snapshot was taken and when the snapshot was restored (SSH not working after restoring, I think that general port forwarding is not working).
comment:4 Changed 8 weeks ago by aeichner
Thanks for the logs, it looks like one of the requirements is to not restore the VM immediately but you have to wait for a while to make it break. Basically all network related activity seems to be broken until the VM is rebooted. Can you confirm that trying to reach an external host from within the VM doesn't work for you as well when you restored the state?
comment:5 Changed 8 weeks ago by blue
I am having the same issue (can confirm it) with 7.0.4; actually no network seems to be available at all - it is not possible to access the outer network from within the VM (e.g. ping 8.8.8.8) and also none of the port forwardings seem to work anymore (I never experienced similar problems with VBox 6.x); my current (only) solution seems to be to shutdown the VM and start it up again (afterwards networking works fine again).
comment:6 Changed 8 weeks ago by aeichner
So I'm able to reproduce your issue then which is great because it makes debugging it much easier. As a temporary workaround you can try to switch the network adapter from virtio-net to e1000, that one shouldn't exhibit this behavior.
comment:7 Changed 8 weeks ago by blue
Thanks for the confirmation and workaround (I'll try that); now I also understand why not so many other people are experiencing this issue - probably not many did switch to virtio-net (actually the reason I did was that the performance seemed to be much better with it).
comment:8 Changed 8 weeks ago by Osprey
I can confirm that network does not seem to work at all until VM restart. This issue was introduced in 7.x because it was not present in 6.x.
comment:9 Changed 8 weeks ago by Osprey
And I can confirm there is no issue if I switch network adapter.
comment:10 Changed 8 weeks ago by Larry Finger
I can confirm that this is a real bug with virtio-dev. I can also confirm that it is new with 7.0.X. Versions 6.1.X do not show the problem.
comment:11 Changed 8 weeks ago by aeichner
- Summary changed from Port forwarding for SSH does not work after restoring a snapshot in running state to Port forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/nxt 7.0.x maintenance
Thanks for the report, this will be fixed in the next 7.0.x maintenance release.
comment:12 Changed 8 weeks ago by aeichner
- Summary changed from Port forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/nxt 7.0.x maintenance to Port forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/next 7.0.x maintenance
comment:13 Changed 3 weeks ago by galitsyn
- Status changed from reopened to closed
- Resolution set to fixed
Hello,
We just released VirtualBox 7.0.6. This issue should be fixed in this version. You can download it from https://www.virtualbox.org/wiki/Downloads.
This is not reproducible here. Please attach a log of the affected VM from the working state (after the snapshot was taken) and non-working state (when the snapshot was restored) and reopen this ticket.