Shutting Down


The initial exploration of our UML is finished. We will cover everything in much more detail later, but this chapter has provided a taste of how UML works and how to use it. There is one final task: to shut down the UML. Figure 3.3 shows the output of the halt command run on the UML.

Figure 3.3. Output from halting a UML

usermode:~ halt Broadcast message from root (tty0) Wed Feb 23 00:00:32 2005... The system is going down for system halt NOW !! INIT: Switching to runlevel: 0 INIT: Sending processes the TERM signal INIT: Sending processes the KILL signal Stopping web server: apache. /usr/sbin/apachectl stop: httpd (no pid file) not running Stopping internet superserver: inetd. Stopping MySQL database server: mysqld. Stopping OpenBSD Secure Shell server: sshd. Saving the System Clock time to the Hardware Clock... hwclock: Can't open /dev/tty1, errno=19: No such device. hwclock is unable to get I/O port access:  the iopl(3) call failed. Hardware Clock updated to Wed Feb 23 00:00:38 EST 2005. Stopping portmap daemon: portmap. Stopping NFS kernel daemon: mountd nfsd. Unexporting directories for NFS kernel daemon...done. Stopping NFS common utilities: lockd statd. Stopping system log daemon: klogd syslogd. Sending all processes the TERM signal... done. Sending all processes the KILL signal... done. Saving random seed... done. Unmounting remote filesystems... done. Deconfiguring network interfaces: done. Deactivating swap... done. Unmounting local filesystems... done. * route del -host 192.168.0.253 dev tap0 * bash -c echo 0 > /proc/sys/net/ipv4/conf/tap0/proxy_arp * arp -i eth1 -d 192.168.0.253 pub Power down. * route del -host 192.168.0.253 dev tap0 * bash -c echo 0 > /proc/sys/net/ipv4/conf/tap0/proxy_arp * arp -i eth1 -d 192.168.0.253 pub ~ 27056:

Just as with a physical system, this is a mirror image of the boot. All the services that were running are shut down, followed by the kernel shutting itself down. The only things you don't see on a physical system are the networking messages, which are the mirror images of the ones we saw when bringing up the network. These are cleaning up the routing and the proxy arp that were set up when we configured UML networking.

Once all this has happened, the UML exits, and we are back to the shell prompt from which we started. The UML has simply vanished, just like any other process that has finished its work.



User Mode Linux
User Mode Linux
ISBN: 0131865056
EAN: 2147483647
Year: N/A
Pages: 116
Authors: Jeff Dike

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net