Skip to content

Instantly share code, notes, and snippets.

@egernst
Forked from mcastelino/Debug CC QEMU pc-lite.md
Last active April 28, 2017 07:54
Show Gist options
  • Select an option

  • Save egernst/34dab7fd8c7b261bc890a24e0e9cd649 to your computer and use it in GitHub Desktop.

Select an option

Save egernst/34dab7fd8c7b261bc890a24e0e9cd649 to your computer and use it in GitHub Desktop.
Debugging Clear Containers Kernel and Rootfs using qemu-lite

#Debug the kernel and rootfs for Clear Containers with pc lite

sudo qemu-lite-system-x86_64 -machine pc-lite,accel=kvm,kernel_irqchip,nvdimm -cpu host -m 256,maxmem=1G,slots=2 -smp 2 -no-user-config -nodefaults -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -kernel ./vmlinux-4.9.4-53.container -append reboot=k panic=1 rw tsc=reliable no_timer_check noreplace-smp root=/dev/pmem0p1  init=/usr/lib/systemd/systemd initcall_debug rootfstype=ext4 rootflags=dax,data=ordered dhcp rcupdate.rcu_expedited=1 clocksource=kvm-clock console=hvc0 single iommu=false -device virtio-serial-pci,id=virtio-serial0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -nographic -object memory-backend-file,id=mem0,share,mem-path=./clear-13280-containers.img,size=235929600 -device nvdimm,memdev=mem0,id=nv0 -no-reboot -device virtio-net-pci,netdev=net0,mac=DE:AD:BE:EF:07:83 -netdev tap,id=net0,ifname=net0,script=no,downscript=no,queues=2,vhost=off

You will see an output such as

char device redirected to /dev/pts/4 (label charconsole0)

Now connect to it

 minicom -D /dev/pts/4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment