VirtualBox

#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 (3)

logs.zip (156.2 KB ) - added by Osprey 17 months ago.
VM-log_AFTER_TAKING_SNAPSHOT.log (101.3 KB ) - added by Osprey 17 months ago.
VM-log_AFTER_RESTORING_SNAPSHOT.log (86.5 KB ) - added by Osprey 17 months ago.

Download all attachments as: .zip

Change History (16)

comment:1 by aeichner, 17 months ago

Resolution: invalid
Status: newclosed

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.

by Osprey, 17 months ago

Attachment: logs.zip added

comment:2 by Osprey, 17 months ago

Resolution: invalid
Status: closedreopened

When trying to reproduce issue now my VM even crashes after snapshot restore. This never happened with 6.x. I am attaching VM logs after taking a snapshot and after restoring snapshot. I am also attaching messages log file from VM. Today at 13:15 VM was restarted because it was totally unresponsive some seconds after snapshot restore.

Version 0, edited 17 months ago by Osprey (next)

comment:3 by Osprey, 17 months ago

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).

by Osprey, 17 months ago

comment:4 by aeichner, 16 months ago

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 by blue, 16 months ago

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).

Last edited 16 months ago by blue (previous) (diff)

comment:6 by aeichner, 16 months ago

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 by blue, 16 months ago

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 by Osprey, 16 months ago

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 by Osprey, 16 months ago

And I can confirm there is no issue if I switch network adapter.

comment:10 by Larry Finger, 16 months ago

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 by aeichner, 16 months ago

Summary: Port forwarding for SSH does not work after restoring a snapshot in running statePort 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 by aeichner, 16 months ago

Summary: Port forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/nxt 7.0.x maintenancePort forwarding for SSH does not work after restoring a snapshot in running state => fixed in SVN/next 7.0.x maintenance

comment:13 by galitsyn, 15 months ago

Resolution: fixed
Status: reopenedclosed

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.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use