lima icon indicating copy to clipboard operation
lima copied to clipboard

Ability to perform instance reboot using limactl cli

Open hasan4791 opened this issue 2 years ago • 4 comments

Description

If we have sockets shared across host & guest, issuing reboot from the instance is breaking the connection. I had to run 2 commands inorder to reboot the instance from limactl. So it would be great if we provide reboot feature from limactl itself.

hasan4791 avatar Nov 09 '23 11:11 hasan4791

You can do stop and start

afbjorklund avatar Nov 09 '23 12:11 afbjorklund

yes, but if cli supports reboot which does stop&start, it would be great.

hasan4791 avatar Nov 09 '23 14:11 hasan4791

@AkihiroSuda I'm working on this one and have an issue. I'm calling stopAction initially which is stopping the instance fine and calling startAction which starts the instance, but the limactl commands never throws any output of hostagent and the process stays awake untill ctrl+c. I believe it has something to do with the context, but what it is, I dont know.

INFO[0000] Using the existing instance "default"        
DEBU[0000] Make sure "user-v2" network is stopped       
DEBU[0000] Make sure usernet network is stopped         
DEBU[0000] Make sure "shared" network is stopped        
DEBU[0000] Make sure "bridged" network is stopped       
DEBU[0000] Make sure "host" network is stopped          
INFO[0000] Starting the instance "default" with VM driver "qemu" 
DEBU[0000] Executed [codesign --verify /opt/homebrew/bin/qemu-system-aarch64]: out=""  error="<nil>"
DEBU[0000] Executed [codesign --display --entitlements - --xml /opt/homebrew/bin/qemu-system-aarch64]: out="Executable=/opt/homebrew/Cellar/qemu/8.1.2/bin/qemu-system-aarch64\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"https://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><dict><key>com.apple.security.hypervisor</key><true/></dict></plist>\n"  error="<nil>"
INFO[0000] QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement                 
FATA[0600] did not receive an event with the "running" status 
(issue-1994) lima> 

hasan4791 avatar Nov 10 '23 11:11 hasan4791

Does the current context is released by stopAction when its done?

hasan4791 avatar Nov 10 '23 11:11 hasan4791