Журнал лабораторных работ

Содержание

Журнал

Четверг (02/23/12)

/dev/pts/4
14:17:18
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----     69.7
/dev/pts/3
14:20:49
#mx dmsg
bash: mx: команда не найдена
/dev/pts/4
14:20:49
#mx dmsg
bash: mx: команда не найдена
/dev/pts/3
14:21:47
#mx dmesg
bash: mx: команда не найдена
/dev/pts/4
14:21:47
#mx dmesg
bash: mx: команда не найдена
/dev/pts/3
14:21:51
#xm dmesg
(XEN) Xen version 4.0.1 (Debian 4.0.1-4) (waldi@debian.org) (gcc version 4.4.5 (Debian 4.4.5-8) ) Mon Nov  7 09:18:26 CET 2011
(XEN) Bootloader: GRUB 1.98+20100804-14+squeeze1
(XEN) Command line: placeholder
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN)  Found 2 MBR signatures
(XEN)  Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
...
(XEN)  TOTAL:         c0000000->c3800000
(XEN)  ENTRY ADDRESS: c1420000
(XEN) Dom0 has maximum 2 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 152kB init memory.
/dev/pts/4
14:21:51
#xm dmesg
(XEN) Xen version 4.0.1 (Debian 4.0.1-4) (waldi@debian.org) (gcc version 4.4.5 (Debian 4.4.5-8) ) Mon Nov  7 09:18:26 CET 2011
(XEN) Bootloader: GRUB 1.98+20100804-14+squeeze1
(XEN) Command line: placeholder
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN)  Found 2 MBR signatures
(XEN)  Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
...
(XEN)  TOTAL:         c0000000->c3800000
(XEN)  ENTRY ADDRESS: c1420000
(XEN) Dom0 has maximum 2 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 152kB init memory.
/dev/pts/3
14:22:02
#ls /dev/VG0/vol1
/dev/VG0/vol1
/dev/pts/4
14:22:02
#ls /dev/VG0/vol1
/dev/VG0/vol1
/dev/pts/3
14:23:40
#zless /usr/share/doc/xen-utils-common/examples/xmexample1.gz
/dev/pts/4
14:23:40
#zless /usr/share/doc/xen-utils-common/examples/xmexample1.gz
/dev/pts/3
14:25:07
#zcat /usr/share/doc/xen-utils-common/examples/xmexample1.gz > /etc/xen/dom1

/dev/pts/4
14:25:07
#zcat /usr/share/doc/xen-utils-common/examples/xmexample1.gz > /etc/xen/dom1

/dev/pts/3
14:25:18
#vim /etc/xen/dom1
/dev/pts/4
14:25:18
#vim /etc/xen/dom1
--- /tmp/l3-saved-2662.26883.28547	2012-02-23 15:25:28.000000000 +0200
+++ /etc/xen/dom1	2012-02-23 15:31:11.000000000 +0200
@@ -8,10 +8,10 @@
 
 #----------------------------------------------------------------------------
 # Kernel image file.
-kernel = "/boot/vmlinuz-2.6.10-xenU"
+kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
 
 # Optional ramdisk.
-#ramdisk = "/boot/initrd.gz"
+ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae"
 
 # The domain build function. Default is 'linux'.
 #builder='linux'
@@ -21,10 +21,10 @@
 # WARNING: Creating a domain with insufficient memory may cause out of
 #          memory errors. The domain needs enough memory to boot kernel
 #          and modules. Allocating less than 32MBs is not recommended.
-memory = 64
+memory = 128
 
 # A name for your domain. All domains must have different names.
-name = "ExampleDomain"
+name = "dom1"
 
 # 128-bit UUID for the domain.  The default behavior is to generate a new UUID
 # on each call to 'xm create'.
@@ -55,7 +55,7 @@
 #
 # vif = [ '', 'bridge=xenbr1' ]
 
-vif = [ '' ]
+vif = [ 'bridge=eth0' ]
 
 #----------------------------------------------------------------------------
 # Define the disk devices you want the domain to have access to, and
@@ -64,7 +64,7 @@
 # where UNAME is the device, DEV is the device name the domain will see,
 # and MODE is r for read-only, w for read-write.
 
-disk = [ 'phy:hda1,hda1,w' ]
+disk = [ 'phy:VG0/vol1,sda1,w' ]
 
 #----------------------------------------------------------------------------
 # Define frame buffer device.
@@ -131,7 +131,7 @@
 #hostname= "vm%d" % vmid
 
 # Set root device.
-root = "/dev/hda1 ro"
+root = "/dev/sda1 ro"
 
 # Root device for nfs.
 #root = "/dev/nfs"
/dev/pts/3
14:31:11
#grep -v ^$ /etc/xen/dom1
#  -*- mode: python; -*-
#============================================================================
# Python configuration setup for 'xm create'.
# This script sets the parameters used when a domain is created using 'xm create'.
# You use a separate script for each domain you want to create, or
# you can set the parameters for the domain on the xm command line.
#============================================================================
#----------------------------------------------------------------------------
# Kernel image file.
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
...
#          - /dev/sgxx or sgx
#          - result of 'scsi_id -gu -s'.
#            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' ]
#============================================================================
/dev/pts/4
14:31:11
#grep -v ^$ /etc/xen/dom1
#  -*- mode: python; -*-
#============================================================================
# Python configuration setup for 'xm create'.
# This script sets the parameters used when a domain is created using 'xm create'.
# You use a separate script for each domain you want to create, or
# you can set the parameters for the domain on the xm command line.
#============================================================================
#----------------------------------------------------------------------------
# Kernel image file.
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
...
#          - /dev/sgxx or sgx
#          - result of 'scsi_id -gu -s'.
#            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' ]
#============================================================================
/dev/pts/3
14:31:32
#grep -v ^# /etc/xen/dom1
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae"
memory = 128
name = "dom1"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:VG0/vol1,sda1,w' ]
root = "/dev/sda1 ro"
extra = "4"
/dev/pts/4
14:31:32
#grep -v ^# /etc/xen/dom1
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae"
memory = 128
name = "dom1"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:VG0/vol1,sda1,w' ]
root = "/dev/sda1 ro"
extra = "4"
/dev/pts/3
14:31:42
#grep -v ^# /etc/xen/dom1|strings
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae"
memory = 128
name = "dom1"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:VG0/vol1,sda1,w' ]
root = "/dev/sda1 ro"
extra = "4"
/dev/pts/4
14:31:42
#grep -v ^# /etc/xen/dom1|strings
kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae"
ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae"
memory = 128
name = "dom1"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:VG0/vol1,sda1,w' ]
root = "/dev/sda1 ro"
extra = "4"
/dev/pts/3
14:33:27
#renamed and a new domain started in its place.
Using config file "/etc/xen/dom1".
^C
/dev/pts/4
14:33:27
#renamed and a new domain started in its place.
Using config file "/etc/xen/dom1".
^C
/dev/pts/3
14:34:44
#xm create dom1
Using config file "/etc/xen/dom1".
Error: Domain 'dom1' already exists with ID '1'
/dev/pts/4
14:34:44
#xm create dom1
Using config file "/etc/xen/dom1".
Error: Domain 'dom1' already exists with ID '1'
/dev/pts/3
14:34:48
#xm destroy dom1

/dev/pts/4
14:34:48
#xm destroy dom1

/dev/pts/3
14:35:09
#xm create dom1
Using config file "/etc/xen/dom1".
^C
/dev/pts/4
14:35:09
#xm create dom1
Using config file "/etc/xen/dom1".
^C
/dev/pts/3
14:36:42
#xm create dom1
Using config file "/etc/xen/dom1".
Error: Domain 'dom1' already exists with ID '2'
/dev/pts/4
14:36:42
#xm create dom1
Using config file "/etc/xen/dom1".
Error: Domain 'dom1' already exists with ID '2'
/dev/pts/3
14:36:45
#xm destroy dom1

/dev/pts/4
14:36:45
#xm destroy dom1

/dev/pts/3
14:36:52
#vim /etc/xen/dom1
/dev/pts/4
14:36:52
#vim /etc/xen/dom1
--- /tmp/l3-saved-2662.16262.880	2012-02-23 15:36:57.000000000 +0200
+++ /etc/xen/dom1	2012-02-23 15:37:22.000000000 +0200
@@ -55,7 +55,8 @@
 #
 # vif = [ '', 'bridge=xenbr1' ]
 
-vif = [ 'bridge=eth0' ]
+#vif = [ 'bridge=eth0' ]
+vif = []
 
 #----------------------------------------------------------------------------
 # Define the disk devices you want the domain to have access to, and
/dev/pts/3
14:37:22
#xm create dom1
Using config file "/etc/xen/dom1".
Started domain dom1 (id=3)
/dev/pts/4
14:37:22
#xm create dom1
Using config file "/etc/xen/dom1".
Started domain dom1 (id=3)
14:37:55
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    152.4
dom1                                         3   128     1     -b----      1.7
/dev/pts/3
14:37:55
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    152.4
dom1                                         3   128     1     -b----      1.7
14:38:19
#xm shutdown dom1

/dev/pts/4
14:38:19
#xm shutdown dom1

/dev/pts/3
14:39:05
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    154.1
dom1                                         3   128     1     -b----      1.9
/dev/pts/4
14:39:05
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    154.1
dom1                                         3   128     1     -b----      1.9
/dev/pts/3
14:39:09
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    154.6
dom1                                         3   128     1     -b----      1.9
/dev/pts/4
14:39:09
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    154.6
dom1                                         3   128     1     -b----      1.9
/dev/pts/3
14:39:11
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    155.5
dom1                                         3   128     1     -b----      1.9
/dev/pts/4
14:39:11
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7038     2     r-----    155.5
dom1                                         3   128     1     -b----      1.9
/dev/pts/3
14:39:12
#xm list