Update driver.rb stop method to wait for response after send shutdown (only control port) #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added wait for prompt "(qemu) " text on QEMU Monitor console when stopping vm after send shutdown command.
Only control_port implementation (which need to be used in Windows) is changed. I don't have a Mac to test it so didn't touch Mac/Unix socket implementation.
Same solution may work on Mac/Unix socket implementation.
I used IO Class, gets Method with sep (Separator) Argument.
https://ruby-doc.org/3.2.2/IO.html#method-i-gets
I was having this error every time I stop (halt) machine:
I used "(qemu) " as prompt text (with an ending space) because qemu monitor source code also use same text:
https://github.com/qemu/qemu/blob/master/monitor/hmp.c#L57
Tested with:
vagrant 2.3.8
vagrant-qemu 0.3.6
host windows 11
qemu MINGW64 mingw-w64-x86_64-qemu 9.0.0-1
vagrantfile centos-7 example in project readme