tree: cd17f772b061167c87f255b12529a0194ade01c5 [path history] [tgz]
  1. config/
  2. metrics/
  3. mm/
  4. network/
  5. arc_vm.cc
  6. arc_vm.h
  7. arc_vm_test.cc
  8. balloon_policy.cc
  9. balloon_policy.h
  10. balloon_policy_test.cc
  11. BUILD.gn
  12. byte_unit.h
  13. concierge_daemon.cc
  14. concierge_daemon.h
  15. crosvm_control.cc
  16. crosvm_control.h
  17. dbus_adaptor.cc
  18. dbus_adaptor.h
  19. dbus_proxy_util.cc
  20. dbus_proxy_util.h
  21. DIR_METADATA
  22. disk_image.cc
  23. disk_image.h
  24. dlc_helper.cc
  25. dlc_helper.h
  26. dlc_helper_test.cc
  27. fake_crosvm_control.cc
  28. fake_crosvm_control.h
  29. main.cc
  30. OWNERS
  31. pci_utils.cc
  32. pci_utils.h
  33. plugin_vm.cc
  34. plugin_vm.h
  35. plugin_vm_config.h
  36. plugin_vm_helper.cc
  37. plugin_vm_helper.h
  38. plugin_vm_usb.h
  39. power_manager_client.cc
  40. power_manager_client.h
  41. power_manager_client_test.cc
  42. README.md
  43. seneschal_server_proxy.cc
  44. seneschal_server_proxy.h
  45. service.cc
  46. service.h
  47. service_arc.cc
  48. service_arc_utils.cc
  49. service_arc_utils.h
  50. service_arc_utils_test.cc
  51. service_common.cc
  52. service_common.h
  53. service_common_test.cc
  54. service_plugin.cc
  55. service_start_vm_helper.cc
  56. service_start_vm_helper.h
  57. service_start_vm_helper_test.cc
  58. service_test.cc
  59. shadercached_helper.cc
  60. shadercached_helper.h
  61. shadercached_helper_test.cc
  62. shill_client.cc
  63. shill_client.h
  64. ssh_keys.cc
  65. ssh_keys.h
  66. startup_listener_impl.cc
  67. startup_listener_impl.h
  68. sysfs_notify_watcher.cc
  69. sysfs_notify_watcher.h
  70. tap_device_builder.cc
  71. tap_device_builder.h
  72. termina_vm.cc
  73. termina_vm.h
  74. termina_vm_test.cc
  75. thread_utils.cc
  76. thread_utils.h
  77. thread_utils_test.cc
  78. tracing.cc
  79. tracing.h
  80. untrusted_vm_utils.cc
  81. untrusted_vm_utils.h
  82. untrusted_vm_utils_test.cc
  83. virtio_blk_metrics.cc
  84. virtio_blk_metrics.h
  85. virtio_blk_metrics_test.cc
  86. vm_base_impl.cc
  87. vm_base_impl.h
  88. vm_builder.cc
  89. vm_builder.h
  90. vm_builder_test.cc
  91. vm_permission_interface.cc
  92. vm_permission_interface.h
  93. vm_util.cc
  94. vm_util.h
  95. vm_util_test.cc
  96. vm_wl_interface.cc
  97. vm_wl_interface.h
  98. vm_wl_interface_test.cc
  99. vmm_swap_history_file.h
  100. vmm_swap_history_file_manager.cc
  101. vmm_swap_history_file_manager.h
  102. vmm_swap_low_disk_policy.cc
  103. vmm_swap_low_disk_policy.h
  104. vmm_swap_low_disk_policy_test.cc
  105. vmm_swap_metrics.cc
  106. vmm_swap_metrics.h
  107. vmm_swap_metrics_test.cc
  108. vmm_swap_policy.proto
  109. vmm_swap_tbw_policy.cc
  110. vmm_swap_tbw_policy.h
  111. vmm_swap_tbw_policy_test.cc
  112. vmm_swap_usage_policy.cc
  113. vmm_swap_usage_policy.h
  114. vmm_swap_usage_policy_test.cc
  115. vmplugin_dispatcher_interface.cc
  116. vmplugin_dispatcher_interface.h
  117. vsock_cid_pool.cc
  118. vsock_cid_pool.h
vm_tools/concierge/README.md

vm_concierge

vm_concierge is a daemon that exposes a D-Bus interface to control lifetime of crosvm. See /vm_tools/README.md for details.

Hacking

If you are modifying protocols, cros_workon vm_protos for grpc and chromeos-base/system_api for dbus.

cros_workon --board ${BOARD} start \
  chromeos-base/system_api chromeos-base/vm_host_tools chromeos-base/vm_protos

Then it is possible to iterate on vm_concierge.

cros_workon_make --test --board=${BOARD} \
  chromeos-base/system_api \
  --install  # If system_api changed.
cros_workon_make --test --board=${BOARD} \
  chromeos-base/vm_protos \
  --install  # If vm_protos changed.
cros_workon_make --test --board=${BOARD} chromeos-base/vm_host_tools

When deploying modifications to device, you can cros deploy the result.

cros_workon_make --test --install --board=brya chromeos-base/vm_host_tools && \
cros deploy $DUT vm_host_tools

Obtaining backtrace on crash

Observe the logs on the device. Trigger what you are trying to debug. For inspiration, the following are examples of triggering crash and observing logs.

tail -f /var/log/messages & start vm_concierge; fg
tail -f /var/log/messages & stop vm_concierge; fg
tail -f /var/log/messages & vmc stop termina; fg

Observe the dump log file on your workstation to get a backtrace. Using tast symbolize

scp dut:/var/spool/crash/vm_concierge.20230413.101819.53856.31734.dmp .
tast symbolize vm_concierge.20230413.101819.53856.31734.dmp

When concierge fails to start up

concierge is started via upstart on /etc/init/vm_concierge.conf. Failure is silent. Adding logging may help. Example:

https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3600040

When crosvm fails to start up

Adding strace to crosvm may help sometimes. For arcvm, arcvm_dev.conf can be used like this:

precrosvm:/usr/local/bin/strace
precrosvm:-T
precrosvm:-ttt
precrosvm:--decode-fds=path
precrosvm:--decode-pids=comm
precrosvm:-f
precrosvm:-o
precrosvm:/run/vm/crosvm_strace

For others, code change is needed, like: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3205434