Xen64-server: различия между версиями

Материал из wiki.nntc.nnov.ru
Перейти к навигации Перейти к поиску
(Новая страница: «/etc/network/interfaces <pre> auto br_inet iface br_inet inet static address 192.168.254.254 network 192.168.254.0 netmas…»)
 
 
Строка 130: Строка 130:
 
sdl=0
 
sdl=0
 
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=6,vncpasswd=******' ]
 
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=6,vncpasswd=******' ]
 +
</pre>
 +
 +
cat /etc/xen/internet-hvm-server
 +
 +
<pre>
 +
import os, re
 +
arch = os.uname()[4]
 +
if re.search('64', arch):
 +
    arch_libdir = 'lib64'
 +
else:
 +
    arch_libdir = 'lib'
 +
 +
kernel = "/usr/lib/xen-4.1/boot/hvmloader"
 +
 +
builder = 'hvm'
 +
memory  = '2048'
 +
vcpus = 2
 +
cpu_freq = 38
 +
shadow_memory = 8
 +
 +
#gfx_passthru=1
 +
#pci=['0000:02:00.0']
 +
 +
disk = [ 'phy:/dev/vg/internet-hvm-server,hda,w','phy:/dev/vg/internet-hvm-server-home,hdb,w' ] 
 +
# , 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]
 +
 +
#  Hostname and Networking
 +
name    = 'internet-hvm-server'
 +
#vif  = [ 'type=ioemu, bridge=br_lan' ]
 +
#vif = ['mac=00:17:3f:09:f8:0d, bridge=br_inet', 'mac=00:17:34:80:f4:1d, bridge=br_wifi', 'mac=00:17:3f:08:f9:2d, bridge=br_lan' ]
 +
vif = ['mac=00:16:3e:4f:82:c1, bridge=br_inet', 'mac=00:16:3e:3d:14:cc, bridge=br_wifi', 'mac=00:16:3e:7d:ff:65, bridge=br_lan']
 +
 +
#for sponn
 +
#vif = ['mac=00:16:3e:4f:82:c1, bridge=br_inet', 'mac=00:16:3e:3d:14:cc, bridge=br_wifi', 'mac=00:16:3e:7d:ff:65, bridge=br_lan', 'mac=b4:c9:18:c8:8c:a1, bridge=virbr0']
 +
 +
#  Behaviour
 +
boot='cd'  #d is cdrom boot, c is disk boot.
 +
 +
#serial='pty'
 +
#usbdevice='tablet'
 +
 +
vnc=1
 +
vncviewer=1
 +
sdl=0
 +
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=2,vncpasswd=********' ]
 +
</pre>
 +
 +
cat /etc/xen/lamp-stud-hvm-server
 +
 +
<pre>
 +
import os, re
 +
arch = os.uname()[4]
 +
if re.search('64', arch):
 +
    arch_libdir = 'lib64'
 +
else:
 +
    arch_libdir = 'lib'
 +
 +
kernel = "/usr/lib/xen-4.1/boot/hvmloader"
 +
 +
builder = 'hvm'
 +
memory  = '2048'
 +
vcpus = 2
 +
cpu_freq = 38
 +
shadow_memory = 8
 +
 +
#gfx_passthru=1
 +
#pci=['0000:02:00.0']
 +
 +
disk = [ 'phy:/dev/vg/lamp-stud-hvm-server,hda,w', 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]
 +
 +
#  Hostname and Networking
 +
name    = 'lamp-stud-hvm-server'
 +
vif = [ 'mac=00:17:3f:41:83:12, bridge=br_lan', 'mac=00:18:3d:71:fa:48, bridge=br_wifi' ]
 +
 +
#  Behaviour
 +
boot='cd'  #d is cdrom boot, c is disk boot.
 +
 +
#serial='pty'
 +
#usbdevice='tablet'
 +
 +
vnc=1
 +
vncviewer=1
 +
sdl=0
 +
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=4,vncpasswd=12' ]
 +
</pre>
 +
 +
cat /etc/xen/ldap-server
 +
 +
<pre>
 +
#memory = 1024
 +
memory = 512
 +
name = "ldap-server"
 +
vcpus = 2
 +
vif = ['mac=00:16:3e:4b:e3:92, bridge=br_lan']
 +
 +
disk = ['phy:/dev/vg/ldap-server,sda1,w','phy:/dev/vg/ldap-server-var,sda2,w']
 +
 +
#,'phy:/dev/vg/ldap-server-home,sda3,w']
 +
 +
kernel          = "/boot/vmlinuz-2.6.24-31-xen"
 +
ramdisk        = "/boot/initrd.img-2.6.24-31-xen"
 +
 +
root            = "/dev/sda1 ro"
 +
 +
on_xend_stop    = "shutdown"
 +
on_xend_start  = "start"
 +
extra          = 'xencons=tty'
 +
</pre>
 +
 +
cat /etc/xen/samba-server
 +
<pre>
 +
memory = 512
 +
name = "samba-server"
 +
vcpus = 1
 +
vif = ['mac=00:16:3e:12:7e:28, bridge=br_lan']
 +
 +
disk = ['phy:/dev/vg/samba-server,sda1,w','phy:/dev/vg/samba-server-home,sda2,w']
 +
 +
kernel          = "/boot/vmlinuz-2.6.24-24-xen"
 +
ramdisk        = "/boot/initrd.img-2.6.24-24-xen"
 +
 +
root            = "/dev/sda1 ro"
 +
 +
on_xend_stop    = "shutdown"
 +
on_xend_start  = "start"
 +
extra          = 'xencons=tty'
 +
</pre>
 +
 +
cat /etc/xen/web-hvm-server
 +
 +
<pre>
 +
import os, re
 +
arch = os.uname()[4]
 +
if re.search('64', arch):
 +
    arch_libdir = 'lib64'
 +
else:
 +
    arch_libdir = 'lib'
 +
 +
kernel = "/usr/lib/xen-4.1/boot/hvmloader"
 +
 +
builder = 'hvm'
 +
memory  = '3072'
 +
vcpus = 4
 +
cpu_freq = 38
 +
shadow_memory = 8
 +
 +
#gfx_passthru=1
 +
#pci=['0000:02:00.0']
 +
 +
disk = [ 'phy:/dev/vg/web-hvm-server,hda,w' ]
 +
 +
#, 'phy:/dev/vg/moodle-server-var,hdb,w']
 +
 +
#, 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]
 +
 +
#  Hostname and Networking
 +
name    = 'web-hvm-server'
 +
#vif = [ 'mac=00:16:3e:4f:83:c2, bridge=br_lan', 'mac=00:16:3e:7e:f1:43, bridge=br_wifi' ]
 +
vif = [ 'mac=00:16:3e:1b:dd:20, bridge=br_lan', 'mac=00:16:3e:f4:83:c2, bridge=br_wifi' ]
 +
 +
#  Behaviour
 +
boot='dc'  #d is cdrom boot, c is disk boot.
 +
 +
#serial='pty'
 +
#usbdevice='tablet'
 +
 +
usb=1
 +
 +
usbdevice='host:002.003'
 +
 +
vnc=1
 +
vncviewer=1
 +
sdl=0
 +
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=3,vncpasswd=12' ]
 +
</pre>
 +
 +
cat /etc/xen/zimbra-server
 +
 +
<pre>
 +
#
 +
# Configuration file for the Xen instance zimbra-ne-udalyat, created
 +
# by xen-tools 4.2.1 on Sat Jan 12 17:06:37 2013.
 +
#
 +
 +
#
 +
#  Kernel + memory size
 +
#
 +
kernel      = '/boot/vmlinuz-3.2.0-34-generic'
 +
ramdisk    = '/boot/initrd.img-3.2.0-34-generic'
 +
 +
vcpus      = '4'
 +
memory      = '4096'
 +
 +
#
 +
#  Disk device(s).
 +
#
 +
root        = '/dev/xvda1 ro'
 +
disk        = [
 +
  'phy:/dev/vg/zimbra-server,xvda1,w',
 +
  'phy:/dev/vg/zimbra-server-data,xvdb1,w',
 +
              ]
 +
 +
#
 +
#  Hostname
 +
#
 +
name        = 'zimbra-server'
 +
 +
#
 +
#  Networking
 +
#
 +
vif        = [ 'mac=00:16:3E:E5:22:75,bridge=br_lan' ]
 +
 +
#
 +
#  Behaviour
 +
#
 +
on_poweroff = 'destroy'
 +
on_reboot  = 'restart'
 +
on_crash    = 'restart'
 
</pre>
 
</pre>

Текущая версия на 13:38, 19 сентября 2013

/etc/network/interfaces

auto br_inet
       iface br_inet inet static
           address 192.168.254.254
           network 192.168.254.0
           netmask 255.255.255.0
           bridge_ports eth0

auto br_lan
       iface br_lan inet static
           address 192.168.10.254
           network 192.168.10.0
           netmask 255.255.255.0
           broadcast 192.168.10.255
           gateway 192.168.10.1
	   dns_nameservers 192.168.10.1
           bridge_ports eth1

auto br_wifi
       iface br_wifi inet static
           #address 172.16.1.254
           #network 172.16.0.0
           #netmask 255.240.0.0
	   #broadcast 172.31.255.255
	   address 192.168.12.5
	   network 192.168.12.0
	   netmask 255.255.255.254
           bridge_ports eth2

xm list

xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1234     8     r----- 574644.6
asterisk-hvm-server                         16   512     2     -b----    595.6
calculate-hvm-server                        24  1024     4     -b----  14721.3
internet-hvm-server                         13  2048     2     -b---- 151665.4
lamp-stud-hvm-server                         8  2048     2     -b----  61441.7
ldap-server                                 15   512     2     -b----   1078.3
samba-server                                 5   512     1     -b----  18430.4
web-hvm-server                               6  3072     4     -b---- 286711.1
zimbra-server                                7  4096     4     r----- 1320609.7

cat /etc/xen/asterisk-hvm-server

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

builder = 'hvm'
#memory  = '1024'
memory  = '512'
vcpus = 2
shadow_memory = 8

#gfx_passthru=1
#pci=['0000:02:00.0']

disk = [ 'phy:/dev/vg/asterisk-hvm-server,hda,w' ]
#, 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]

#  Hostname and Networking
name    = 'asterisk-hvm-server'
#vif  = [ 'type=ioemu, bridge=br_lan' ]
vif = ['mac=00:17:3f:07:f8:5c, bridge=br_lan', 'mac=00:17:3f:08:f9:51, bridge=br_wifi']

#  Behaviour
boot='cd'  #d is cdrom boot, c is disk boot.

#serial='pty'
#usbdevice='tablet'

usb=1
usbdevice='host:12d1:1001'

vnc=1
vncviewer=1
sdl=0
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=1,vncpasswd=*******' ]

cat /etc/xen/calculate-hvm-server

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

builder = 'hvm'
memory  = '1024'
vcpus = 4
shadow_memory = 16

#disk = [ 'phy:/dev/vg/calculate-hvm-server-root,hda,w', 'phy:/dev/sdc,hdb,w' ]
disk = [ 'phy:/dev/vg/calculate-hvm-server-root,hda,w', 'phy:/dev/vg/calculate-hvm-server-data,hdb,w' ]
#old
#'phy:/dev/disk/by-uuid/8e0fbcca-94d6-4057-a905-3b1ade861f19,hdb,w' ]

#disk = [ 'phy:/dev/vg/calculate-hvm-server-root,hda,w', 'phy:/dev/vg/calculate-hvm-server-data,hdb,w', 'tap:aio:/mnt/cds/home-cds-storage.img,hdc,w' ]
#disk = [ 'phy:/dev/vg/calculate-hvm-server-root,hda,w', 'tap:aio:/mnt/cds/home-cds-storage.img,hdc,w' ]
#disk = [ 'phy:/dev/vg/calculate-hvm-server-root,hda,w']

#, 'file:/home/administrator/pmagic.iso,hdc:cdrom,r' ]

#  Hostname and Networking
name    = 'calculate-hvm-server'
vif = ['mac=00:16:ee:d2:f4:2c, bridge=br_lan']

#  Behaviour
boot='dc'  #d is cdrom boot, c is disk boot.

vnc=1
vncviewer=1
sdl=0
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=6,vncpasswd=******' ]

cat /etc/xen/internet-hvm-server

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

builder = 'hvm'
memory  = '2048'
vcpus = 2
cpu_freq = 38
shadow_memory = 8

#gfx_passthru=1
#pci=['0000:02:00.0']

disk = [ 'phy:/dev/vg/internet-hvm-server,hda,w','phy:/dev/vg/internet-hvm-server-home,hdb,w' ]  
# , 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]

#  Hostname and Networking
name    = 'internet-hvm-server'
#vif  = [ 'type=ioemu, bridge=br_lan' ]
#vif = ['mac=00:17:3f:09:f8:0d, bridge=br_inet', 'mac=00:17:34:80:f4:1d, bridge=br_wifi', 'mac=00:17:3f:08:f9:2d, bridge=br_lan' ]
vif = ['mac=00:16:3e:4f:82:c1, bridge=br_inet', 'mac=00:16:3e:3d:14:cc, bridge=br_wifi', 'mac=00:16:3e:7d:ff:65, bridge=br_lan']

#for sponn
#vif = ['mac=00:16:3e:4f:82:c1, bridge=br_inet', 'mac=00:16:3e:3d:14:cc, bridge=br_wifi', 'mac=00:16:3e:7d:ff:65, bridge=br_lan', 'mac=b4:c9:18:c8:8c:a1, bridge=virbr0']

#  Behaviour
boot='cd'  #d is cdrom boot, c is disk boot.

#serial='pty'
#usbdevice='tablet'

vnc=1
vncviewer=1
sdl=0
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=2,vncpasswd=********' ]

cat /etc/xen/lamp-stud-hvm-server

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

builder = 'hvm'
memory  = '2048'
vcpus = 2
cpu_freq = 38
shadow_memory = 8

#gfx_passthru=1
#pci=['0000:02:00.0']

disk = [ 'phy:/dev/vg/lamp-stud-hvm-server,hda,w', 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]

#  Hostname and Networking
name    = 'lamp-stud-hvm-server'
vif = [ 'mac=00:17:3f:41:83:12, bridge=br_lan', 'mac=00:18:3d:71:fa:48, bridge=br_wifi' ]

#  Behaviour
boot='cd'  #d is cdrom boot, c is disk boot.

#serial='pty'
#usbdevice='tablet'

vnc=1
vncviewer=1
sdl=0
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=4,vncpasswd=12' ]

cat /etc/xen/ldap-server

#memory = 1024
memory = 512
name = "ldap-server"
vcpus = 2
vif = ['mac=00:16:3e:4b:e3:92, bridge=br_lan']

disk = ['phy:/dev/vg/ldap-server,sda1,w','phy:/dev/vg/ldap-server-var,sda2,w']

#,'phy:/dev/vg/ldap-server-home,sda3,w']

kernel          = "/boot/vmlinuz-2.6.24-31-xen"
ramdisk         = "/boot/initrd.img-2.6.24-31-xen"

root            = "/dev/sda1 ro"

on_xend_stop    = "shutdown"
on_xend_start   = "start"
extra           = 'xencons=tty'

cat /etc/xen/samba-server

memory = 512
name = "samba-server"
vcpus = 1
vif = ['mac=00:16:3e:12:7e:28, bridge=br_lan']

disk = ['phy:/dev/vg/samba-server,sda1,w','phy:/dev/vg/samba-server-home,sda2,w']

kernel          = "/boot/vmlinuz-2.6.24-24-xen"
ramdisk         = "/boot/initrd.img-2.6.24-24-xen"

root            = "/dev/sda1 ro"

on_xend_stop    = "shutdown"
on_xend_start   = "start"
extra           = 'xencons=tty'

cat /etc/xen/web-hvm-server

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen-4.1/boot/hvmloader"

builder = 'hvm'
memory  = '3072'
vcpus = 4
cpu_freq = 38
shadow_memory = 8

#gfx_passthru=1
#pci=['0000:02:00.0']

disk = [ 'phy:/dev/vg/web-hvm-server,hda,w' ]

#, 'phy:/dev/vg/moodle-server-var,hdb,w']

#, 'file:/home/administrator/precisesrv64.iso,hdc:cdrom,r' ]

#  Hostname and Networking
name    = 'web-hvm-server'
#vif = [ 'mac=00:16:3e:4f:83:c2, bridge=br_lan', 'mac=00:16:3e:7e:f1:43, bridge=br_wifi' ]
vif = [ 'mac=00:16:3e:1b:dd:20, bridge=br_lan', 'mac=00:16:3e:f4:83:c2, bridge=br_wifi' ]

#  Behaviour
boot='dc'  #d is cdrom boot, c is disk boot.

#serial='pty'
#usbdevice='tablet'

usb=1

usbdevice='host:002.003'

vnc=1
vncviewer=1
sdl=0
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=3,vncpasswd=12' ]

cat /etc/xen/zimbra-server

#
# Configuration file for the Xen instance zimbra-ne-udalyat, created
# by xen-tools 4.2.1 on Sat Jan 12 17:06:37 2013.
#

#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-3.2.0-34-generic'
ramdisk     = '/boot/initrd.img-3.2.0-34-generic'

vcpus       = '4'
memory      = '4096'

#
#  Disk device(s).
#
root        = '/dev/xvda1 ro'
disk        = [
		  'phy:/dev/vg/zimbra-server,xvda1,w',
		  'phy:/dev/vg/zimbra-server-data,xvdb1,w',
              ]

#
#  Hostname
#
name        = 'zimbra-server'

#
#  Networking
#
vif         = [ 'mac=00:16:3E:E5:22:75,bridge=br_lan' ]

#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'