/l3/users/max-public/nt-scale/debian3.unix.nt/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 |
|
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data. 64 bytes from 192.168.30.2: icmp_req=1 ttl=64 time=0.603 ms 64 bytes from 192.168.30.2: icmp_req=2 ttl=64 time=0.408 ms ^C --- 192.168.30.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.408/0.505/0.603/0.100 ms |
#ping 192.168.30.13
![]() PING 192.168.30.13 (192.168.30.13) 56(84) bytes of data. 64 bytes from 192.168.30.13: icmp_req=1 ttl=64 time=0.261 ms 64 bytes from 192.168.30.13: icmp_req=2 ttl=64 time=0.076 ms 64 bytes from 192.168.30.13: icmp_req=3 ttl=64 time=0.063 ms 64 bytes from 192.168.30.13: icmp_req=4 ttl=64 time=0.071 ms 64 bytes from 192.168.30.13: icmp_req=5 ttl=64 time=0.068 ms 64 bytes from 192.168.30.13: icmp_req=6 ttl=64 time=0.069 ms 64 bytes from 192.168.30.13: icmp_req=7 ttl=64 time=0.067 ms 64 bytes from 192.168.30.13: icmp_req=8 ttl=64 time=0.119 ms 64 bytes from 192.168.30.13: icmp_req=9 ttl=64 time=0.111 ms ... 64 bytes from 192.168.30.13: icmp_req=30 ttl=64 time=0.109 ms 64 bytes from 192.168.30.13: icmp_req=31 ttl=64 time=0.096 ms 64 bytes from 192.168.30.13: icmp_req=32 ttl=64 time=0.102 ms 64 bytes from 192.168.30.13: icmp_req=33 ttl=64 time=0.111 ms 64 bytes from 192.168.30.13: icmp_req=34 ttl=64 time=0.104 ms 64 bytes from 192.168.30.13: icmp_req=35 ttl=64 time=0.107 ms ^C --- 192.168.30.13 ping statistics --- 35 packets transmitted, 35 received, 0% packet loss, time 33997ms rtt min/avg/max/mdev = 0.063/0.103/0.261/0.038 ms |
#ping 192.168.30.13
PING 192.168.30.13 (192.168.30.13) 56(84) bytes of data. 64 bytes from 192.168.30.13: icmp_req=1 ttl=64 time=0.261 ms 64 bytes from 192.168.30.13: icmp_req=2 ttl=64 time=0.076 ms 64 bytes from 192.168.30.13: icmp_req=3 ttl=64 time=0.063 ms 64 bytes from 192.168.30.13: icmp_req=4 ttl=64 time=0.071 ms 64 bytes from 192.168.30.13: icmp_req=5 ttl=64 time=0.068 ms 64 bytes from 192.168.30.13: icmp_req=6 ttl=64 time=0.069 ms 64 bytes from 192.168.30.13: icmp_req=7 ttl=64 time=0.067 ms 64 bytes from 192.168.30.13: icmp_req=8 ttl=64 time=0.119 ms 64 bytes from 192.168.30.13: icmp_req=9 ttl=64 time=0.111 ms ... 64 bytes from 192.168.30.13: icmp_req=30 ttl=64 time=0.109 ms 64 bytes from 192.168.30.13: icmp_req=31 ttl=64 time=0.096 ms 64 bytes from 192.168.30.13: icmp_req=32 ttl=64 time=0.102 ms 64 bytes from 192.168.30.13: icmp_req=33 ttl=64 time=0.111 ms 64 bytes from 192.168.30.13: icmp_req=34 ttl=64 time=0.104 ms 64 bytes from 192.168.30.13: icmp_req=35 ttl=64 time=0.107 ms ^C --- 192.168.30.13 ping statistics --- 35 packets transmitted, 35 received, 0% packet loss, time 33997ms rtt min/avg/max/mdev = 0.063/0.103/0.261/0.038 ms |
#xm console dom1
![]() root@debian13:~# root@debian13:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3e:54:76:6e inet addr:192.168.30.13 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe54:766e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:153 errors:0 dropped:0 overruns:0 frame:0 TX packets:61 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:18439 (18.0 KiB) TX bytes:5490 (5.3 KiB) ... PING google.com (173.194.70.113) 56(84) bytes of data. 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=1 ttl=49 time=38.7 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=2 ttl=49 time=38.8 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=3 ttl=49 time=38.8 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=4 ttl=49 time=38.6 ms c64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=5 ttl=49 time=38.7 ms ^C --- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 38.631/38.783/38.874/0.194 ms |
#xm console dom1
root@debian13:~# root@debian13:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3e:54:76:6e inet addr:192.168.30.13 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe54:766e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:153 errors:0 dropped:0 overruns:0 frame:0 TX packets:61 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:18439 (18.0 KiB) TX bytes:5490 (5.3 KiB) ... PING google.com (173.194.70.113) 56(84) bytes of data. 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=1 ttl=49 time=38.7 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=2 ttl=49 time=38.8 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=3 ttl=49 time=38.8 ms 64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=4 ttl=49 time=38.6 ms c64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_req=5 ttl=49 time=38.7 ms ^C --- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 38.631/38.783/38.874/0.194 ms |
#xm show
![]() Error: Subcommand show not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. vncviewer Attach to <Domain>'s VNC server. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. ... unpause Unpause a paused domain. uptime Print uptime for all/some domains. usb-add Add the usb device to FV VM. usb-del Delete the usb device to FV VM. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm show
![]() Error: Subcommand show not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. vncviewer Attach to <Domain>'s VNC server. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. ... unpause Unpause a paused domain. uptime Print uptime for all/some domains. usb-add Add the usb device to FV VM. usb-del Delete the usb device to FV VM. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm liat
![]() Error: Subcommand liat not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. vncviewer Attach to <Domain>'s VNC server. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. ... unpause Unpause a paused domain. uptime Print uptime for all/some domains. usb-add Add the usb device to FV VM. usb-del Delete the usb device to FV VM. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm liat
![]() Error: Subcommand liat not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. vncviewer Attach to <Domain>'s VNC server. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. ... unpause Unpause a paused domain. uptime Print uptime for all/some domains. usb-add Add the usb device to FV VM. usb-del Delete the usb device to FV VM. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 216.1 dom1 1 128 1 -b---- 2.2 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 216.1 dom1 1 128 1 -b---- 2.2 |
#vim /etc/rc.local
![]() |
#By default this script does nothing.
![]() # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface l address 10.0.35.43 netmask 255.255.255.0 network 10.0.35.0 broadcast 10.0.35.255 # The p gateway 10.0.35.1erface # dns-* options are implemented by the resolvconf package, if installed allow-h dns-nameservers 10.0.35.10 ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/network/interfaces" 29L, 765C written |
#By default this script does nothing.
# and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface l address 10.0.35.43 netmask 255.255.255.0 network 10.0.35.0 broadcast 10.0.35.255 # The p gateway 10.0.35.1erface # dns-* options are implemented by the resolvconf package, if installed allow-h dns-nameservers 10.0.35.10 ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/network/interfaces" 29L, 765C written |
#ifconifg
![]() bash: ifconifg: command not found |
#ifconfig
![]() br30 Link encap:Ethernet HWaddr 00:07:e9:0c:45:11 inet addr:192.168.30.3 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:167 errors:0 dropped:0 overruns:0 frame:0 TX packets:125 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:18124 (17.6 KiB) TX bytes:16702 (16.3 KiB) eth0 Link encap:Ethernet HWaddr 00:07:e9:0c:45:11 inet addr:10.0.35.43 Bcast:10.0.35.255 Mask:255.255.255.0 ... TX packets:53 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5168 (5.0 KiB) TX bytes:5168 (5.0 KiB) vif1.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:77 errors:0 dropped:0 overruns:0 frame:0 TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:5817 (5.6 KiB) TX bytes:23333 (22.7 KiB) |
#ifconfig
br30 Link encap:Ethernet HWaddr 00:07:e9:0c:45:11 inet addr:192.168.30.3 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:167 errors:0 dropped:0 overruns:0 frame:0 TX packets:125 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:18124 (17.6 KiB) TX bytes:16702 (16.3 KiB) eth0 Link encap:Ethernet HWaddr 00:07:e9:0c:45:11 inet addr:10.0.35.43 Bcast:10.0.35.255 Mask:255.255.255.0 ... TX packets:53 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5168 (5.0 KiB) TX bytes:5168 (5.0 KiB) vif1.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:77 errors:0 dropped:0 overruns:0 frame:0 TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:5817 (5.6 KiB) TX bytes:23333 (22.7 KiB) |
#cat /etc/sysctl.conf
![]() # # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase ... # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # |
#cat /etc/sysctl.conf
# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase ... # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # |
#ifup
![]() ifup: Use --help for help |
#ifup eth0
![]() ifup: interface eth0 already configured |
#ping 192.168.30.13
![]() PING 192.168.30.13 (192.168.30.13) 56(84) bytes of data. 64 bytes from 192.168.30.13: icmp_req=1 ttl=64 time=0.125 ms 64 bytes from 192.168.30.13: icmp_req=2 ttl=64 time=0.105 ms 64 bytes from 192.168.30.13: icmp_req=3 ttl=64 time=0.110 ms 64 bytes from 192.168.30.13: icmp_req=4 ttl=64 time=0.110 ms 64 bytes from 192.168.30.13: icmp_req=5 ttl=64 time=0.113 ms ^C --- 192.168.30.13 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 0.105/0.112/0.125/0.013 ms |
#ping 192.168.30.13
PING 192.168.30.13 (192.168.30.13) 56(84) bytes of data. 64 bytes from 192.168.30.13: icmp_req=1 ttl=64 time=0.125 ms 64 bytes from 192.168.30.13: icmp_req=2 ttl=64 time=0.105 ms 64 bytes from 192.168.30.13: icmp_req=3 ttl=64 time=0.110 ms 64 bytes from 192.168.30.13: icmp_req=4 ttl=64 time=0.110 ms 64 bytes from 192.168.30.13: icmp_req=5 ttl=64 time=0.113 ms ^C --- 192.168.30.13 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 0.105/0.112/0.125/0.013 ms |
#vim /etc/resolv.conf
![]() |
#~
![]() user@192.168.30.13's password: Permission denied, please try again. user@192.168.30.13's password: Permission denied, please try again. user@192.168.30.13's password: |
#~
![]() user@192.168.30.13's password: Permission denied, please try again. user@192.168.30.13's password: Permission denied, please try again. user@192.168.30.13's password: |
#ssh root@192.168.30.13
![]() root@192.168.30.13's password: Linux debian13 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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. Last login: Fri Feb 24 10:13:40 2012 root@debian13:~# passwd --help Usage: passwd [options] [LOGIN] ... root root root@debian13:~# passwd user passwd: user 'user' does not exist root@debian13:~# users root root root@debian13:~# xm list -bash: xm: command not found root@debian13:~# exit logout Connection to 192.168.30.13 closed. |
#ssh root@192.168.30.13
![]() root@192.168.30.13's password: Linux debian13 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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. Last login: Fri Feb 24 10:13:40 2012 root@debian13:~# passwd --help Usage: passwd [options] [LOGIN] ... root root root@debian13:~# passwd user passwd: user 'user' does not exist root@debian13:~# users root root root@debian13:~# xm list -bash: xm: command not found root@debian13:~# exit logout Connection to 192.168.30.13 closed. |
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.30 eth0.40 iface eth0 inet static address 10.0.35.43 netmask 255.255.255.0 ... dns-search unix.nt iface eth0.30 inet manual up brctl addbr br30 up brctl addif br30 eth0.30 up ifconfig br30 192.168.30.3/24 # address 192.168.30.3 # netmask 255.255.255.0 iface eth0.40 inet static address 192.168.40.3 netmask 255.255.255.0 |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 633.6 dom1 1 128 1 -b---- 2.5 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 633.6 dom1 1 128 1 -b---- 2.5 |
#xm list
![]() Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 816.7 dom1 2 128 1 -b---- 0.0 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 816.7 dom1 2 128 1 -b---- 0.0 |
#scp
![]() usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
#scp
![]() usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
#scp root@10.0.35.5:/root/clone-vm /root/clone-vm
![]() ssh: connect to host 10.0.35.5 port 22: No route to host |
#scp root@10.0.35.5:/root/clone-vm /root/clone-vm
![]() ssh: connect to host 10.0.35.5 port 22: No route to host |
#ping 10.0.35.5
![]() PING 10.0.35.5 (10.0.35.5) 56(84) bytes of data. From 10.0.35.43 icmp_seq=1 Destination Host Unreachable From 10.0.35.43 icmp_seq=2 Destination Host Unreachable From 10.0.35.43 icmp_seq=3 Destination Host Unreachable ^C --- 10.0.35.5 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4024ms pipe 3 |
#ping 10.0.35.5
![]() PING 10.0.35.5 (10.0.35.5) 56(84) bytes of data. From 10.0.35.43 icmp_seq=1 Destination Host Unreachable From 10.0.35.43 icmp_seq=2 Destination Host Unreachable From 10.0.35.43 icmp_seq=3 Destination Host Unreachable ^C --- 10.0.35.5 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4024ms pipe 3 |
#ping 10.0.35.45
![]() PING 10.0.35.45 (10.0.35.45) 56(84) bytes of data. 64 bytes from 10.0.35.45: icmp_req=1 ttl=64 time=0.562 ms ^C --- 10.0.35.45 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.562/0.562/0.562/0.000 ms |
#ping 10.0.35.45
PING 10.0.35.45 (10.0.35.45) 56(84) bytes of data. 64 bytes from 10.0.35.45: icmp_req=1 ttl=64 time=0.562 ms ^C --- 10.0.35.45 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.562/0.562/0.562/0.000 ms |
#scp root@10.0.35.45:/root/clone-vm /root/clone-vm
![]() clone-vm 100% 568 0.6KB/s 00:00 |
#scp root@10.0.35.45:/root/clone-vm /root/clone-vm
clone-vm 100% 568 0.6KB/s 00:00 |
#vim ./clone-vm
--- /tmp/l3-saved-3051.26591.726 2012-02-24 12:56:18.000000000 +0200 +++ ./clone-vm 2012-02-24 12:58:46.000000000 +0200 @@ -24,6 +24,7 @@ DEST=/dev/VG0/${DEST_NAME} set -e +set -x lvcreate -L 4G -n ${DEST_NAME} /dev/VG0 mkfs.ext3 ${DEST} mkdir -p /mnt2/ @@ -31,7 +32,7 @@ mount ${DEST} /mnt2/ rsync -a /mnt/ /mnt2/ cat <<EOF - edit /mnt/etc/network/interfaces and /etc/hostname + edit /mnt2/etc/network/interfaces and /mnt2/etc/hostname and then exit EOF bash |
#chmod +x ./clone-vm
![]() |
#./clone-vm
![]() Usage: ./clone-vm source-volume dest-volume Example: ./clone-vm vol1 vol2 |
#./clone-vm
![]() Usage: ./clone-vm source-volume dest-volume Example: ./clone-vm vol1 vol2 |
#./clone-vm /dev/VG0/vol1 /dev/VG0/vol2
![]() ++ lvcreate -L 4G -n /dev/VG0/vol2 /dev/VG0 Logical volume "vol2" created ++ mkfs.ext3 /dev/VG0//dev/VG0/vol2 mke2fs 1.41.12 (17-May-2010) Could not stat /dev/VG0//dev/VG0/vol2 --- No such file or directory The device apparently does not exist; did you specify it correctly? |
#./clone-vm /dev/VG0/vol1 /dev/VG0/vol2
![]() ++ lvcreate -L 4G -n /dev/VG0/vol2 /dev/VG0 Logical volume "vol2" created ++ mkfs.ext3 /dev/VG0//dev/VG0/vol2 mke2fs 1.41.12 (17-May-2010) Could not stat /dev/VG0//dev/VG0/vol2 --- No such file or directory The device apparently does not exist; did you specify it correctly? |
#./clone-vm /dev/VG0/vol1 vol2
![]() ++ lvcreate -L 4G -n vol2 /dev/VG0 Logical volume "vol2" already exists in volume group "VG0" |
#./clone-vm /dev/VG0/vol1 vol2
![]() ++ lvcreate -L 4G -n vol2 /dev/VG0 Logical volume "vol2" already exists in volume group "VG0" |
#lvremove /dev/VG0/vol2
![]() Do you really want to remove active logical volume vol2? [y/n]: y Logical volume "vol2" successfully removed |
#lvremove /dev/VG0/vol2
Do you really want to remove active logical volume vol2? [y/n]: y Logical volume "vol2" successfully removed |
#~
if [ $# != 2 ] then cat <<EOF Usage: $0 source-volume dest-volume Example: $0 vol1 vol2 EOF exit 1 "./clone-vm" 41L, 581C ... mount ${SOURCE} /mnt/ mount ${DEST} /mnt2/ rsync -a /mnt/ /mnt2/ cat <<EOF edit /mnt2/etc/network/interfaces and /mnt2/etc/hostname and then exit EOF bash umount /mnt umount /mnt2 |
#vim /mnt2/etc/network/interfaces
![]() --- /tmp/l3-saved-4776.19396.28159 2012-02-24 13:04:01.000000000 +0200 +++ /mnt2/etc/network/interfaces 2012-02-24 13:04:31.000000000 +0200 @@ -8,7 +8,7 @@ # The primary network interface allow-hotplug eth0 iface eth0 inet static - address 192.168.30.13 + address 192.168.30.23 netmask 255.255.255.0 gateway 192.168.30.3 # dns-* options are implemented by the resolvconf package, if installed |
#vim /mnt2/etc/hostname
![]() --- /tmp/l3-saved-4776.13945.20220 2012-02-24 13:04:58.000000000 +0200 +++ /mnt2/etc/hostname 2012-02-24 13:05:09.000000000 +0200 @@ -1 +1 @@ -debian13 +debian23 |
#ls /etc/xen/
![]() dom1 knoppix1 scripts xend-config.sxp xend-pci-permissive.sxp xend-pci-quirks.sxp |
#ls /etc/xen/
![]() dom1 knoppix1 scripts xend-config.sxp xend-pci-permissive.sxp xend-pci-quirks.sxp |
#ls /etc/xen/
dom1 knoppix1 scripts xend-config.sxp xend-pci-permissive.sxp xend-pci-quirks.sxp |
#~
![]() # # By default, no frame buffer device is configured. # # To create one using the SDL backend and sensible defaults: # # vfb = [ 'sdl=1' ] [ ] # # This uses environment variables XAUTHORITY and DISPLAY. You # can override that: ... # ex. # scsi_id -gu -s /block/sdb # 36000b5d0006a0000006a0257004c0000 # # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as # which the specified guest domain recognize. # #vscsi = [ '/dev/sdx, 0:0:0:0' ] [ ] #============================================================================ "/etc/xen/dom2" 212L, 7550C written |
#~
![]() # # or more than one interface may be configured: # # vif = [ '', 'bridge=xenbr1' ] #vif = [ 'bridge=eth0' ] vif = ['bridge=br30'] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE ... # ex. # scsi_id -gu -s /block/sdb # 36000b5d0006a0000006a0257004c0000 # # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as # which the specified guest domain recognize. # #vscsi = [ '/dev/sdx, 0:0:0:0' ] [ ] #============================================================================ "/etc/xen/dom2" 212L, 7550C written |
#~
#cpus = "" # leave to Xen to pick #cpus = "0" # all vcpus run on CPU0 #cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5 #cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3 m2" # Number of Virtual CPUS to use, default is 1 #vcpus = 1 #---------------------------------------------------------------------------- # Define network interfaces. # By default, no network interfaces are configured. You may have one created ... # ex. # scsi_id -gu -s /block/sdb # 36000b5d0006a0000006a0257004c0000 # # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as # which the specified guest domain recognize. # #vscsi = [ '/dev/sdx, 0:0:0:0' ] [ ] #============================================================================ "/etc/xen/dom2" 212L, 7550C written |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 1417.7 dom1 2 128 1 -b---- 0.5 |
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.30 eth0.40 iface eth0 inet static address 10.0.35.43 netmask 255.255.255.0 network 10.0.35.0 broadcast 10.0.35.255 gateway 10.0.35.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt iface eth0.30 inet manual up brctl addbr br30 up brctl addif br30 eth0.30 up ifconfig br30 192.168.30.3/24 # address 192.168.30.3 # netmask 255.255.255.0 iface eth0.40 inet static address 192.168.40.3 netmask 255.255.255.0
# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies # See http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions too #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 ################################################################### # Additional settings - these settings can improve the network # security of the host and prevent against some network attacks # including spoofing attacks and man in the middle attacks through # redirection. Some network environments, however, require that these # settings are disabled so review and enable them as needed. # # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 #net.ipv6.conf.all.accept_redirects = 0 # _or_ # Accept ICMP redirects only for gateways listed in our default # gateway list (enabled by default) # net.ipv4.conf.all.secure_redirects = 1 # # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 #
Время первой команды журнала | 11:26:27 2012- 2-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:07:09 2012- 2-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.77 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 2.48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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