-
Notifications
You must be signed in to change notification settings - Fork 479
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
How can I forward the port of the virtual machine? #1287
Comments
We haven't messed with the standard qemu networking so those options should work. Can you provide an example pypanda script showing how you were adding them to extra args? |
Taking the following code as an example, I try to forward port 22 of the virtual machine to port 2222 of the host.
Then I execute in the host:
And got no response. |
Hm, it looks like you're passing the args right. The first thing that might be the issue is that the snapshot you're restoring to was probably taken without those network arguments which might cause a problem, I'm not positive if qemu allows you do change the nic forwarding args when loading a snapshot, but it didn't give you an error so maybe it's allowed. If you run the guest interactively on the command line instead of with pypanda, do you see anything differet?
See if that works, or even drop the Also are you sure an ssh server is running inside the guest? Might be worth running netcat in the guest listening on port 22 to see if any traffic shows up |
If I run the following command I get an error.
If I remove |
A couple of things that might help:
Otherwise, you'll get those messages and hanging behavior you see above when running with
After those two things, the netcat test passes:
|
Thank you so much guys, my problem was solved very well! |
I used the following two methods, and it seemed that it could not work. I added them to extra_args.
1: -netdev user,id=net0,hostfwd=tcp::8888-:8888 -device e1000,netdev=net0
2: -net user,hostfwd=tcp::8888-:8888 -net -nic
The text was updated successfully, but these errors were encountered: