diff --git a/docs/Developer-Guide.md b/docs/Developer-Guide.md index 38fa746e2..3b56fa032 100644 --- a/docs/Developer-Guide.md +++ b/docs/Developer-Guide.md @@ -41,11 +41,14 @@ * [Connect to debug console](#connect-to-debug-console) * [Traditional debug console setup](#traditional-debug-console-setup) * [Create a custom image containing a shell](#create-a-custom-image-containing-a-shell) - * [Create a debug systemd service](#create-a-debug-systemd-service) * [Build the debug image](#build-the-debug-image) * [Configure runtime for custom debug image](#configure-runtime-for-custom-debug-image) + * [Connect to the virtual machine using the debug console](#connect-to-the-virtual-machine-using-the-debug-console) + * [Enabling debug console for QEMU](#enabling-debug-console-for-qemu) + * [Enabling debug console for cloud-hypervisor / firecracker](#enabling-debug-console-for-cloud-hypervisor--firecracker) * [Create a container](#create-a-container) * [Connect to the virtual machine using the debug console](#connect-to-the-virtual-machine-using-the-debug-console) + * [Obtain details of the image](#obtain-details-of-the-image) * [Capturing kernel boot logs](#capturing-kernel-boot-logs) # Warning @@ -540,35 +543,6 @@ $ export ROOTFS_DIR=${GOPATH}/src/github.com/kata-containers/kata-containers/too $ script -fec 'sudo -E GOPATH=$GOPATH USE_DOCKER=true EXTRA_PKGS="bash coreutils" ./rootfs.sh centos' ``` -#### Create a debug systemd service - -Create the service file that starts the shell in the rootfs directory: - -``` -$ cat < **Note** Ports 1024 and 1025 are reserved for communication with the agent +> and gathering of agent logs respectively. + +Next, connect to the debug console. The VSOCKS paths vary slightly between +cloud-hypervisor and firecracker. +In case of cloud-hypervisor, connect to the `vsock` as shown: +``` +$ sudo su -c 'cd /var/run/vc/vm/{sandbox_id}/root/ && socat stdin unix-connect:clh.sock' +CONNECT 1026 +``` + +**Note**: You need to type `CONNECT 1026` and press `RETURN` key after entering the `socat` command. + +For firecracker, connect to the `hvsock` as shown: +``` +$ sudo su -c 'cd /var/run/vc/firecracker/{sandbox_id}/root/ && socat stdin unix-connect:kata.hvsock' +CONNECT 1026 ``` **Note**: You need to press the `RETURN` key to see the shell prompt.