Guest User

Untitled

a guest
Jan 10th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 KB | None | 0 0
  1. #VBoxManage guestcontrol clone77 -v run hanging?
  2.  
  3. #make a fifo for demo so i can read a fixed amount of text on the host from the guest
  4. mknod myfifo /tmp/qqq
  5.  
  6. #generate a steady stream of text into a fifo on the guest
  7. cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' > /tmp/qqq
  8.  
  9. #test it within the guest. generated 100 bytes of simple test at a slow rate
  10. #pv generates both stdout an stderr
  11. [root@localhost ~]# pv -L 10 -s 100 -S /tmp/qqq
  12. dc4bd3d877 10 B 0:00:01 [9.75 B/s] [===============> ] 10%
  13. ...
  14. 3d03dd4ad8 20 B 0:00:02 [9.78 B/s] [===============================> ] 20%
  15. 691d518df4 30 B 0:00:03 [9.76 B/s] [===============================================> ] 30%
  16. 7625821aa3 40 B 0:00:04 [9.79 B/s] [===============================================================> ] 40%
  17. 010781eeb9 50 B 0:00:05 [10.8 B/s] [===============================================================================> ] 50%
  18. 034426f6b8 60 B 0:00:06 [9.86 B/s] [===============================================================================================> ] 60%
  19. f161ba3d9e 70 B 0:00:07 [9.86 B/s] [===============================================================================================================> ] 70%
  20. c9fbb9971a 80 B 0:00:08 [9.92 B/s] [===============================================================================================================================> ] 80%
  21. 8d98b0c315 90 B 0:00:09 [9.65 B/s] [===============================================================================================================================================> ] 90%
  22. 4f3e87f5c9 100 B 0:00:10 [10.9 B/s] [==============================================================================================================================================================>] 100%
  23. 100 B 0:00:10 [9.98 B/s] [==============================================================================================================================================================>] 100%
  24. [root@localhost ~]#
  25.  
  26. #Run it via VBoxManage from the host
  27. #should read 100 bytes from it with progress on stderr and stream on stdout
  28. #start it up like this
  29. #see it again down below afterwards
  30. VBoxManage guestcontrol clone77 -v run --exe /bin/pv --username xxx --password xxx --verbose --wait-stdout --wait-stderr -- pv -L 10 -s 100 -S /tmp/qqq
  31.  
  32. #see the process running on the guest
  33. Every 2.0s: ps -aef|grep 24340 Wed Jan 3 12:16:56 2018
  34.  
  35. self 24340 24336 0 12:16 pts/1 00:00:00 /bin/pv -L 10 -s 100 -S /tmp/qqq
  36. root 24341 23636 0 12:16 pts/3 00:00:00 watch ps -aef|grep 24340
  37. root 24342 24341 0 12:16 pts/3 00:00:00 watch ps -aef|grep 24340
  38. root 24343 24342 0 12:16 pts/3 00:00:00 sh -c ps -aef|grep 24340
  39. root 24345 24343 0 12:16 pts/3 00:00:00 grep 24340
  40.  
  41. #see the output in the vbox service within the guest
  42. 00:30:50.356968 timesync vgsvcTimeSyncWorker: Host: 2018-01-03T20:16:38.968000000Z (MinAdjust: 200 ms)
  43. 00:30:50.357170 timesync vgsvcTimeSyncWorker: Guest: - 2018-01-03T20:16:39.133997000Z => -165 997 000 ns drift
  44. 00:31:00.361826 timesync vgsvcTimeSyncWorker: Host: 2018-01-03T20:16:48.969000000Z (MinAdjust: 200 ms)
  45. 00:31:00.361901 timesync vgsvcTimeSyncWorker: Guest: - 2018-01-03T20:16:49.138855000Z => -169 855 000 ns drift
  46. 00:31:03.511394 control Client ID=257 now is using protocol 2
  47. 00:31:03.511473 control Spawning new guest session ID=1, szUser=self, szPassword=XXX, szDomain=, fFlags=0, using protocol 2
  48. 00:31:03.534134 sess9 Session ID=1 thread running, client ID=284
  49. 00:31:03.535961 control Thread for session ID=1 started
  50. 00:31:03.536086 control Opening a new guest session returned rc=VINF_SUCCESS
  51. 00:31:03.554137 control Waiting for host msg ...
  52. 00:31:03.554885 control Skipping uMsg=100, cParms=12, rc=VINF_SUCCESS
  53. 00:31:03.555967 control Waiting for host msg ...
  54. 00:31:03.557026 control Skipping uMsg=102, cParms=4, rc=VINF_SUCCESS
  55. 00:31:03.557378 control Waiting for host msg ...
  56. 00:31:10.363809 timesync vgsvcTimeSyncWorker: Host: 2018-01-03T20:16:58.965000000Z (MinAdjust: 200 ms)
  57. 00:31:10.363903 timesync vgsvcTimeSyncWorker: Guest: - 2018-01-03T20:16:59.140837000Z => -175 837 000 ns drift
  58. 00:31:20.364587 timesync vgsvcTimeSyncWorker: Host: 2018-01-03T20:17:08.966000000Z (MinAdjust: 200 ms)
  59. 00:31:20.364658 timesync vgsvcTimeSyncWorker: Guest: - 2018-01-03T20:17:09.141616000Z => -175 616 000 ns drift
  60. 00:31:30.365280 timesync vgsvcTimeSyncWorker: Host: 2018-01-03T20:17:18.973000000Z (MinAdjust: 200 ms)
  61. 00:31:30.365352 timesync vgsvcTimeSyncWorker: Guest: - 2018-01-03T20:17:19.142308000Z => -169 308 000 ns drift
  62.  
  63. #wait for it to finish on the guest
  64. Every 2.0s: ps -aef|grep 24340 Wed Jan 3 12:17:56 2018
  65.  
  66. root 24354 23636 0 12:17 pts/3 00:00:00 watch ps -aef|grep 24340
  67. root 24363 24354 0 12:17 pts/3 00:00:00 watch ps -aef|grep 24340
  68. root 24364 24363 0 12:17 pts/3 00:00:00 sh -c ps -aef|grep 24340
  69. root 24366 24364 0 12:17 pts/3 00:00:00 grep 24340
  70.  
  71.  
  72. #nothing ever returns on the host and this is hung
  73. $ VBoxManage guestcontrol clone77 -v run --exe /bin/pv --username xx --password xxx --verbose --wait-stdout --wait-stderr -- pv -L 10 -s 100 -S /tmp/qqq
  74. Creating guest session as user 'self'...
  75. Waiting for guest session to start...
  76. Successfully started guest session (ID 1)
  77. Starting guest process ...
  78. Process '/bin/pv' (PID 24340) started
Add Comment
Please, Sign In to add comment