From: Matthew R. S. <use...@go...> - 2003-06-17 13:52:05
|
On Mon 2003-06-16 22:19, James W McMechan wrote: > I often setup "cad" to halt "shutdown -h 0" instead of a reboot this can > be done from uml_mconsole > It also helps to always set umid= so that you don't have to hunt up the > id. Sounds like this is the way to go for projects where the entire filesystem is built as part of the project's build process. Not sure why it didn't occur to me to do this before. Thanks to everyone who suggested this. It is certainly cleaner than using a separate communications channel to signal that a clean shutdown should occur. > This does not require a working network or console connection as it uses > the mconsole administration interface if you can do "uml_mconsole X > halt", then "uml_mconsole X cad" should change the UML's init state, this > does not always work (even halt sometimes fails) but most times when the > system is still partly working it will shutdown. Sounds like an appropriate way to shut down a running VM with the most chance of keeping filesystems in a consistent state is to: 1) initiate CAD via mconsole (after making sure the VM's inittab is setup correctly of course) 2) wait X seconds; if process is still hanging around, issue a halt via mconsole 3) wait X seconds; if process is STILL around, kill -9 :) > I don't quite understand what the umlrun stuff is doing, and why it is > leaving a process running. umlrun description from its package file: ------ umlrun makes it simple to non-interactively execute shell commands within a User-Mode Linux system, and collect their output. This is useful for automating system simulations ------ The process it leaves running at the end of bootup is the one that waits for commands to run from the host, then sends the output back to the host for it to collect. At the end of the batch it receives a shutdown command and umlrun then shuts down the VM. -- Matthew R. Scott OMAjA / http://www.omaja.com/ |