Create a new codespace:
1 | gh codespace create |
Generate SSH config:
1 | gh codespace ssh --config > ~/.ssh/codespaces |
Connect to the codespace:
1 | ssh cs.<codespace name>.<branch> |
Run these commands in your codespace:
1 | # Install QEMU |
Relogin(or you will get permission denied on /dev/kvm
) and run QEMU on the codespace:
1 | qemu-system-x86_64 -enable-kvm -display vnc=:0 <other parameters> |
Open SSH tunnel in a new terminal:
1 | ssh cs.<codespace name>.<branch> -L <local port>:localhost:5900 -N |
Finally, use a VNC client to connect to 127.0.0.1:<local port>
.