Xen - domU 的設定

 

 

man xmdomain.cfg

 


 

Paravirtualization:

kernel      = '/boot/vmlinuz-2.6.32-5-xen-amd64'
ramdisk     = '/boot/initrd.img-2.6.32-5-xen-amd64'

vcpus       = '1'
memory      = '512'

root        = '/dev/xvda2 ro'
disk        = [
                  'file:/xen/domains/debian6/disk.img,xvda2,w',
                  'file:/xen/domains/debian6/swap.img,xvda1,w',
              ]




name        = 'debian6'

vif         = [ 'ip=192.168.88.155,mac=00:16:3E:6B:25:B7,bridge=vmbr0' ]

on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

 

 

hvm:

kernel = '/usr/lib/xen-4.0/boot/hvmloader'
builder = 'hvm'
memory = '512'
device_model='/usr/lib/xen-4.0/bin/qemu-dm'

# Disks
disk = [
        'file:/xen/domains/centos6/centos6.img,ioemu:hda,w',
        'file:/home/iso/CentOS-6.3-i386-minimal.iso,ioemu:hdc:cdrom,r'
        ]

# Hostname
name = 'centos6'

# Networking
vif = ['type=ioemu, bridge=vmbr0']

# Behaviour
boot='d'                                   <-- default c  // boot = "dc"

vnc='1'
vnclisten="192.168.88.151"
vncdisplay="10"
vncpasswd=""

 

 


 

VNC

 

/etc/xen/xend-config.sxp

(vnc-listen '0.0.0.0')
(vncpasswd 'secret')

/etc/init.d/xend restart

 

 

domU 獨立設定:

 

在 HVM 時:

vnc='1'                        <-- 啟用 vnc

vncpasswd=""

vncdisplay="10"         <-- tcp port 5910

vnclisten="192.168.88.151"

 

在 PVM 時:

VNC capabilities that are built into the Xen guest domain (domain0)
(virtual frame buffer (vfb))
127.0.0.1:5900

vfb = [ 'type=vnc' ]

vfb = [ 'type=vnc,vncdisplay=10,vncpasswd=youpwhere' ]

 


 

 

Creative Commons license icon Creative Commons license icon