/l3/users/sftsrv/drbd/debian2.tech.net/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 |
|
#sed -i s@/boot/vmlinuz-2.6.10-xenU@`!!`@ /etc/xen/domu1
sed -i s@/boot/vmlinuz-2.6.10-xenU@`ls /boot/vm*xen*`@ /etc/xen/domu1 |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "ExampleDomain" vif = [ '' ] disk = [ 'phy:hda1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "ExampleDomain" vif = [ '' ] disk = [ 'phy:hda1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#sed -i s@ExampleDomain@domu1`@ /etc/xen/domu1
![]() #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # ... # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # > Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#sed -i s@ExampleDomain@domu1`@ /etc/xen/domu1
![]() > |
#sed -i s@ExampleDomain@domu1@ /etc/xen/domu1
![]() |
#sed -i s@ExampleDomain@domu1@ /etc/xen/domu1
|
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ '' ] disk = [ 'phy:hda1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ '' ] disk = [ 'phy:hda1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#sed -i s@phy:hda1@phy:/dev/vg00/domu1@ /etc/xen/domu1
![]() # The nfs server. #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: ... # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#sed -i s@phy:hda1@phy:/dev/vg00/domu1@ /etc/xen/domu1
|
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ '' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ '' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#vi /etc/xen/domu1
![]() --- /tmp/l3-saved-19138.19793.15430 2008-02-27 13:03:30.000000000 +0200 +++ /etc/xen/domu1 2008-02-27 13:04:58.000000000 +0200 @@ -54,7 +54,7 @@ # # vif = [ '', 'bridge=xenbr1' ] -vif = [ '' ] +vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and |
#vi /etc/xen/domu1
|
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#brctl show
![]() # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; ... # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # bridge name bridge id STP enabled interfaces eth0 8000.000475825343 no peth0 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#brctl show
bridge name bridge id STP enabled interfaces eth0 8000.000475825343 no peth0 |
#ls -l /dev/vg00/domu1
![]() #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # ... # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # lrwxrwxrwx 1 root root 22 лют 27 12:21 /dev/vg00/domu1 -> /dev/mapper/vg00-domu1 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#ls -l /dev/vg00/domu1
lrwxrwxrwx 1 root root 22 лют 27 12:21 /dev/vg00/domu1 -> /dev/mapper/vg00-domu1 |
#mount
![]() # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is ... sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) nfsd on /proc/fs/nfsd type nfsd (rw) /dev/mapper/vg00-domu1 on /mnt/domu1 type ext3 (rw) /proc on /mnt/domu1/proc type none (rw,bind) Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#mount
/dev/sda1 on / type ext3 (rw) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) nfsd on /proc/fs/nfsd type nfsd (rw) /dev/mapper/vg00-domu1 on /mnt/domu1 type ext3 (rw) /proc on /mnt/domu1/proc type none (rw,bind) |
#umount /mnt/domu1/proc
![]() # The nfs server. #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: ... # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#umount /mnt/domu1/proc
|
#umount /mnt/domu1/
![]() # The nfs server. #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: ... # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#umount /mnt/domu1/
|
#xm create domu1
![]() # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; ... # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Using config file "/etc/xen/domu1". Started domain domu1 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm create domu1
Using config file "/etc/xen/domu1". Started domain domu1 |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 197.8 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 197.8 |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or ... # The default is # kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#vi /etc/xen/domu1
![]() --- /tmp/l3-saved-19138.12956.15159 2008-02-27 13:07:52.000000000 +0200 +++ /etc/xen/domu1 2008-02-27 13:08:06.000000000 +0200 @@ -11,7 +11,7 @@ kernel = "/boot/vmlinuz-2.6.18-6-xen-686" # Optional ramdisk. -#ramdisk = "/boot/initrd.gz" +ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" # The domain build function. Default is 'linux'. #builder='linux' |
#vi /etc/xen/domu1
--- /tmp/l3-saved-19138.12956.15159 2008-02-27 13:07:52.000000000 +0200 +++ /etc/xen/domu1 2008-02-27 13:08:06.000000000 +0200 @@ -11,7 +11,7 @@ kernel = "/boot/vmlinuz-2.6.18-6-xen-686" # Optional ramdisk. -#ramdisk = "/boot/initrd.gz" +ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" # The domain build function. Default is 'linux'. #builder='linux' |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#ls /boot/initrd*xen*
![]() #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # ... # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # /boot/initrd.img-2.6.18-6-xen-686 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#grep -v ^# /etc/xen/domu1 | grep -xv ''
![]() kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" memory = 64 name = "domu1" vif = [ 'mac=00:16:3e:02:00:01, bridge=eth0' ] disk = [ 'phy:/dev/vg00/domu1,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#ls /boot/initrd*xen*
/boot/initrd.img-2.6.18-6-xen-686 |
#xm create domu1
![]() # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; ... # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Using config file "/etc/xen/domu1". Started domain domu1 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm create domu1
Using config file "/etc/xen/domu1". Started domain domu1 |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 202.1 domu1 2 64 1 -b---- 2.3 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 202.1 domu1 2 64 1 -b---- 2.3 |
#xm console domu1
![]() EXT3 FS on hda1, internal journal Setting the system clock. * Unable to set System Clock to: Wed Feb 27 11:08:41 UTC 2008 Cleaning up ifupdown.... Loading kernel modules...done. Checking file systems...fsck 1.40.6 (09-Feb-2008) done. Setting kernel variables...done. Mounting local filesystems...done. Activating swapfile swap...done. ... lo: Disabled Privacy Extensions IPv6 over IPv4 tunneling driver done. INIT: Entering runlevel: 4 Starting system log daemon.... Starting kernel log daemon.... Starting OpenBSD Secure Shell server: sshd. Starting periodic command scheduler: crond. Debian GNU/Linux lenny/sid debian2 tty1 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm console domu1
TCP bind hash table entries: 2048 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 2048) TCP reno registered audit: initializing netlink socket (disabled) audit(1204110516.748:1): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API io scheduler noop registered io scheduler anticipatory registered ... Configuring network interfaces...NET: Registered protocol family 10 lo: Disabled Privacy Extensions IPv6 over IPv4 tunneling driver done. INIT: Entering runlevel: 4 Starting system log daemon.... Starting kernel log daemon.... Starting OpenBSD Secure Shell server: sshd. Starting periodic command scheduler: crond. Debian GNU/Linux lenny/sid debian2 tty1 |
#xm list
![]() #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old ... # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 204.0 domu1 2 64 1 -b---- 4.3 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 204.0 domu1 2 64 1 -b---- 4.3 |
#xm console domu1
![]() collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) debian2:~# ping 192.168.15.254 PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.411 ms --- 192.168.15.254 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.411/0.411/0.411/0.000 ms debian2:~# ping 192.168.15.212 PING 192.168.15.212 (192.168.15.212) 56(84) bytes of data. --- 192.168.15.212 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1009ms debian2:~# ping 192.168.15.12 PING 192.168.15.12 (192.168.15.12) 56(84) bytes of data. 64 bytes from 192.168.15.12: icmp_seq=1 ttl=64 time=0.029 ms --- 192.168.15.12 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.029/0.029/0.029/0.000 ms Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm console domu1
Debian GNU/Linux lenny/sid debian2 tty1 debian2 login: Debian GNU/Linux lenny/sid debian2 tty1 debian2 login: root Linux debian2 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ... debian2:~# ping 192.168.15.212 PING 192.168.15.212 (192.168.15.212) 56(84) bytes of data. --- 192.168.15.212 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1009ms debian2:~# ping 192.168.15.12 PING 192.168.15.12 (192.168.15.12) 56(84) bytes of data. 64 bytes from 192.168.15.12: icmp_seq=1 ttl=64 time=0.029 ms --- 192.168.15.12 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.029/0.029/0.029/0.000 ms |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 206.1 domu1 2 64 1 -b---- 4.3 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 206.1 domu1 2 64 1 -b---- 4.3 |
#mkdir /mnt/domu2
![]() # The nfs server. #nfs_server = '169.254.1.0' # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: ... # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#mkdir /mnt/domu2
|
#cat /tmp/
![]() # Root directory on the nfs server. #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; ... # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # gconfd-root/ mc-root/ serverauth.tXiTUL2900 .X0-lock .ICE-unix/ orbit-root/ ssh-vcjNOA2916/ .X11-unix/ Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm list
![]() #nfs_root = '/full/path/to/root/directory' # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old ... # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 222.7 domu1 2 64 1 -b---- 4.4 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#cat /tmp/
![]() gconfd-root/ mc-root/ serverauth.tXiTUL2900 .X0-lock .ICE-unix/ orbit-root/ ssh-vcjNOA2916/ .X11-unix/ |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 250 2 r----- 222.7 domu1 2 64 1 -b---- 4.4 |
#slogin gateway.bitimpulse.com
![]() root@gateway ~# root@gateway ~# slogin mail.softservecom.com root@gateway ~# root@gateway ~# root@gateway ~# root@gateway ~# slogin mail.softservecom.com The authenticity of host 'mail.softservecom.com (195.160.232.17)' can't be established. RSA key fingerprint is ee:43:f0:b9:1e:23:5a:f7:5e:97:da:f1:6c:d0:8a:8a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'mail.softservecom.com,195.160.232.17' (RSA) to the list of known hosts. ... Loading "installonlyn" plugin Setting up Upgrade Process Setting up repositories dag 100% |=========================| 1.1 kB 00:00 base 100% |=========================| 1.1 kB 00:00 updates 100% |=========================| 951 B 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 1.5 MB 00:14 |
#slogin gateway.bitimpulse.com
root@gateway ~# root@gateway ~# slogin mail.softservecom.com root@gateway ~# root@gateway ~# root@gateway ~# root@gateway ~# slogin mail.softservecom.com The authenticity of host 'mail.softservecom.com (195.160.232.17)' can't be established. RSA key fingerprint is ee:43:f0:b9:1e:23:5a:f7:5e:97:da:f1:6c:d0:8a:8a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'mail.softservecom.com,195.160.232.17' (RSA) to the list of known hosts. ... Loading "installonlyn" plugin Setting up Upgrade Process Setting up repositories dag 100% |=========================| 1.1 kB 00:00 base 100% |=========================| 1.1 kB 00:00 updates 100% |=========================| 951 B 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 1.5 MB 00:14 |
#xm console domu1
![]() # Sets runlevel 4. extra = "4" #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old # one; ... # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # debian2:~# debian2:~# debian2:~# debian2:~# Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm console domu1
debian2:~# debian2:~# debian2:~# debian2:~# |
#xm console domu1
![]() # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # The default is # root@192.168.15.12's password: Cannot open logfile /mnt/domu2/var/log/yum.log base 100% |=========================| 1.1 kB 00:00 primary.xml.gz 100% |=========================| 834 kB 00:11 debian2:~# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully debian2:~# logout Debian GNU/Linux lenny/sid debian2 tty1 Отр:1 http://192.168.15.254 sid/main xbill 2.1-6 [51,5kB] |
#xm console domu1
debian2:~# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully debian2:~# logout Debian GNU/Linux lenny/sid debian2 tty1 |
#mcedit /tmp/centos.repo
![]() [ ] pdates/i386/../mirror.centos.org/centos/5.1/updates/i386/ G-KEY-CentOS-5mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 |
#mcedit /tmp/centos.repo
[ ] pdates/i386/../mirror.centos.org/centos/5.1/updates/i386/ G-KEY-CentOS-5mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 |
#yum -c /tmp/yu
![]() |
#yum -c /tmp/centos.repo
![]() |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2/
![]() Cannot open logfile /mnt/domu2//var/log/yum.log http://mirror.centos.org/centos/5.1/os/i386/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again |
#yum -c /tmp/yu
![]() |
#yum -c /tmp/centos.repo
![]() |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2/
Cannot open logfile /mnt/domu2//var/log/yum.log http://mirror.centos.org/centos/5.1/os/i386/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again |
#slogin 192.168.15.12
![]() The authenticity of host '192.168.15.12 (192.168.15.12)' can't be established. RSA key fingerprint is 2c:0a:ba:38:21:4f:b7:48:0e:1d:03:49:6e:27:d1:5f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.12' (RSA) to the list of known hosts. root@192.168.15.12's password: Permission denied, please try again. root@192.168.15.12's password: |
#slogin 192.168.15.12
![]() The authenticity of host '192.168.15.12 (192.168.15.12)' can't be established. RSA key fingerprint is 2c:0a:ba:38:21:4f:b7:48:0e:1d:03:49:6e:27:d1:5f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.12' (RSA) to the list of known hosts. root@192.168.15.12's password: Permission denied, please try again. root@192.168.15.12's password: |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2
![]() Cannot open logfile /mnt/domu2/var/log/yum.log http://mirror.centos.org/centos/5.1/os/i386/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2
Cannot open logfile /mnt/domu2/var/log/yum.log http://mirror.centos.org/centos/5.1/os/i386/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again |
#mcedit /tmp/centos.repo
![]() i386/ |
#mcedit /tmp/centos.repo
i386/ |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base
![]() Cannot open logfile /mnt/domu2/var/log/yum.log base 100% |=========================| 1.1 kB 00:00 primary.xml.gz 100% |=========================| 834 kB 00:11 |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base
![]() Cannot open logfile /mnt/domu2/var/log/yum.log base 100% |=========================| 1.1 kB 00:00 primary.xml.gz 100% |=========================| 834 kB 00:11 |
#slogin 192.168.15.12
![]() root@192.168.15.12's password: Last login: Wed Feb 27 11:09:12 2008 Linux debian2 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. debian2:~# debian2:~# debian2:~# logout Connection to 192.168.15.12 closed. |
#slogin 192.168.15.12
root@192.168.15.12's password: Last login: Wed Feb 27 11:09:12 2008 Linux debian2 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. debian2:~# debian2:~# debian2:~# logout Connection to 192.168.15.12 closed. |
#man nc
|
#ls /mnt/domu2/
![]() bin boot dev etc home lib media mnt opt proc root sbin selinux srv sys tmp usr var |
#ls /mnt/domu2/
bin boot dev etc home lib media mnt opt proc root sbin selinux srv sys tmp usr var |
#mcedit /tmp/centos.repo
|
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base
![]() ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: NetworkManager i386 1:0.6.4-6.el5 base 397 k acl i386 2.2.39-2.1.el5 base 67 k acpid i386 1.0.4-5 base 22 k amtu i386 1.0.4-4 base 23 k anacron i386 2.3-45.el5.centos base 35 k apmd i386 1:3.2.2-5 base 73 k ... beecrypt i386 4.1.2-10.1.1 base 116 k bind-libs i386 30:9.3.3-10.el5 base 838 k binutils i386 2.17.50.0.6-5.el5 base 2.9 M bluez-gnome i386 0.5-5.fc6 base 22 k bluez-libs i386 3.7-1 base 54 k bzip2-libs i386 1.0.3-3 base 37 k cairo i386 1.2.4-3.el5_1 updates 394 k centos-release i386 10:5-1.0.el5.centos.1 base 19 k centos-release-notes i386 5.1.0-2 base 39 k chkconfig i386 1.3.30.1-1 base 158 k |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: NetworkManager i386 1:0.6.4-6.el5 base 397 k acl i386 2.2.39-2.1.el5 base 67 k acpid i386 1.0.4-5 base 22 k amtu i386 1.0.4-4 base 23 k anacron i386 2.3-45.el5.centos base 35 k apmd i386 1:3.2.2-5 base 73 k ... beecrypt i386 4.1.2-10.1.1 base 116 k bind-libs i386 30:9.3.3-10.el5 base 838 k binutils i386 2.17.50.0.6-5.el5 base 2.9 M bluez-gnome i386 0.5-5.fc6 base 22 k bluez-libs i386 3.7-1 base 54 k bzip2-libs i386 1.0.3-3 base 37 k cairo i386 1.2.4-3.el5_1 updates 394 k centos-release i386 10:5-1.0.el5.centos.1 base 19 k centos-release-notes i386 5.1.0-2 base 39 k chkconfig i386 1.3.30.1-1 base 158 k |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base --exclude=sysreport
![]() Package Arch Version Repository Size ============================================================================= Installing: NetworkManager i386 1:0.6.4-6.el5 base 397 k acl i386 2.2.39-2.1.el5 base 67 k acpid i386 1.0.4-5 base 22 k amtu i386 1.0.4-4 base 23 k anacron i386 2.3-45.el5.centos base 35 k apmd i386 1:3.2.2-5 base 73 k aspell i386 12:0.60.3-7.1 base 936 k ... bluez-gnome i386 0.5-5.fc6 base 22 k bluez-libs i386 3.7-1 base 54 k bzip2-libs i386 1.0.3-3 base 37 k cairo i386 1.2.4-3.el5_1 updates 394 k centos-release i386 10:5-1.0.el5.centos.1 base 19 k centos-release-notes i386 5.1.0-2 base 39 k chkconfig i386 1.3.30.1-1 base 158 k coreutils i386 5.97-12.1.el5 base 3.6 M cpio i386 2.6-20 base 121 k cracklib i386 2.8.9-3.3 base 58 k |
#yum -c /tmp/centos.repo --installroot=/mnt/domu2 -y groupinstall Base --exclude=sysreport
Package Arch Version Repository Size ============================================================================= Installing: NetworkManager i386 1:0.6.4-6.el5 base 397 k acl i386 2.2.39-2.1.el5 base 67 k acpid i386 1.0.4-5 base 22 k amtu i386 1.0.4-4 base 23 k anacron i386 2.3-45.el5.centos base 35 k apmd i386 1:3.2.2-5 base 73 k aspell i386 12:0.60.3-7.1 base 936 k ... bluez-gnome i386 0.5-5.fc6 base 22 k bluez-libs i386 3.7-1 base 54 k bzip2-libs i386 1.0.3-3 base 37 k cairo i386 1.2.4-3.el5_1 updates 394 k centos-release i386 10:5-1.0.el5.centos.1 base 19 k centos-release-notes i386 5.1.0-2 base 39 k chkconfig i386 1.3.30.1-1 base 158 k coreutils i386 5.97-12.1.el5 base 3.6 M cpio i386 2.6-20 base 121 k cracklib i386 2.8.9-3.3 base 58 k |
#ls /mnt/domu2/bin/
![]() arch cut doexec gettext ln mv rm sync true awk date domainname grep loadkeys netstat rmdir tar umount basename dbus-cleanup-sockets dumpkeys gtar login nice rvi taskset uname bash dbus-daemon echo gunzip ls nisdomainname rview tcptraceroute unicode_start cat dbus-monitor ed gzip mail pgawk sed tcsh unicode_stop chgrp dbus-send egrep hostname mkdir ping setfont touch unlink chmod dbus-uuidgen env igawk mknod ping6 sh tracepath usleep chown dd ex ipcalc mktemp ps sleep tracepath6 vi cp df false kbd_mode more pwd sort traceroute view cpio dmesg fgrep kill mount raw stty traceroute6 ypdomainname csh dnsdomainname gawk link mountpoint red su tracert zcat |
#ls /mnt/domu2/bin/
arch cut doexec gettext ln mv rm sync true awk date domainname grep loadkeys netstat rmdir tar umount basename dbus-cleanup-sockets dumpkeys gtar login nice rvi taskset uname bash dbus-daemon echo gunzip ls nisdomainname rview tcptraceroute unicode_start cat dbus-monitor ed gzip mail pgawk sed tcsh unicode_stop chgrp dbus-send egrep hostname mkdir ping setfont touch unlink chmod dbus-uuidgen env igawk mknod ping6 sh tracepath usleep chown dd ex ipcalc mktemp ps sleep tracepath6 vi cp df false kbd_mode more pwd sort traceroute view cpio dmesg fgrep kill mount raw stty traceroute6 ypdomainname csh dnsdomainname gawk link mountpoint red su tracert zcat |
#ls /mnt/domu2/
![]() bin boot dev etc home lib media misc mnt opt proc root sbin selinux srv sys tmp usr var |
#ls /mnt/domu2/
bin boot dev etc home lib media misc mnt opt proc root sbin selinux srv sys tmp usr var |
#ls /mnt/domu2/dev/
![]() null |
#ls /mnt/domu2/dev/
null |
#mc
|
#ls /mnt/domu2/proc/
|
gconfd-root/ mc-root/ serverauth.tXiTUL2900 .X0-lock .ICE-unix/ orbit-root/ ssh-vcjNOA2916/ .X11-unix/
Время первой команды журнала | 12:58:53 2008- 2-27 | |||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:53:30 2008- 2-27 | |||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.00 | |||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.68 | |||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008