Sunday, January 25, 2009

20090125 - xVM (Xen) in OpenSolaris 2009.04 (nv105)

# /usr/bin/pkg set-authority pkg.opensolaris.org.dev
# /usr/bin/pkg set-authority -P pkg.opensolaris.org.dev
# /usr/bin/pkg install pkg:/SUNWxvm@3.1-0.105
# /usr/bin/pkg install pkg:/SUNWlibvirt@0.5.11-0.105
# /usr/bin/pkg install SUNWxvmhvm
# /usr/bin/pkg install SUNWvirtinst

# cat /rpool/boot/grub/menu.lst
splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 30
default 2
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
#---------------------END BOOTADM--------------------
title opensolaris-nv101
findroot (pool_rpool,0,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris-nv101
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
title opensolaris-nv105
findroot (pool_rpool,0,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris-nv105
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
title opensolaris-nv105-xvm
findroot (pool_rpool,0,a)
#splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris-nv105
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

# bootadm set-menu default=2
# init 6

# svcadm enable xvm/store:default
# svcadm enable xvm/vnc-config:default
# svcadm enable
xvm/xend:default
# svcadm enable
xvm/console:default
# svcadm enable
xvm/virtd:default
# svcadm enable
xvm/domains:default

# xm info

host : eddie
release : 5.11
version : snv_105
machine : i86pc
nr_cpus : 2
nr_nodes : 1
sockets_per_node : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 1662
hw_caps : bfebfbff:20100800:00000000:00000140:0000e39d:00000000:00000001
total_memory : 1015
free_memory : 61
xen_major : 3
xen_minor : 1
xen_extra : .4-xvm
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : Tue Dec 09 08:23:53 2008 -0800 15912:5bf81ba8b88b
cc_compiler : gcc version 3.4.3 (csl-sol210-3_4-20050802)
cc_compile_by : xen-discuss
cc_compile_domain : opensolaris.org
cc_compile_date : Tue Dec 9 08:24:27 PST 2008
xend_config_format : 4

# uname -m
i86pc
# uname -i
i86xpv

# uname -m
i86pc
# uname -i
i86xpv

xVM version 3.1.4-xvm
(xVM) Command line:
(xVM) Video information:
(xVM) VGA is text mode 80x25, font 8x16
(xVM) VBE/DDC methods: V2; EDID transfer time: 1 seconds
(xVM) Disc information:
(xVM) Found 1 MBR signatures
(xVM) Found 1 EDD information structures
(xVM) Xen-e820 RAM map:
(xVM) 0000000000000000 - 000000000009fc00 (usable)
(xVM) 000000000009fc00 - 00000000000a0000 (reserved)
(xVM) 00000000000e4000 - 0000000000100000 (reserved)
(xVM) 0000000000100000 - 000000003f7a0000 (usable)
(xVM) 000000003f7a0000 - 000000003f7ae000 (ACPI data)
(xVM) 000000003f7ae000 - 000000003f7f0000 (ACPI NVS)
(xVM) 000000003f7f0000 - 000000003f800000 (reserved)
(xVM) 00000000fee00000 - 00000000fee01000 (reserved)
(xVM) 00000000ffb00000 - 0000000100000000 (reserved)
(xVM) System RAM: 1015MB (1039612kB)
(xVM) Xen heap: 14MB (14772kB)
(xVM) Domain heap initialised: DMA width 32 bits
(xVM) Processor #0 6:15 APIC version 20
(xVM) Processor #1 6:15 APIC version 20
(xVM) IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
(xVM) Enabling APIC mode: Flat. Using 1 I/O APICs
(xVM) Using scheduler: SMP Credit Scheduler (credit)
(xVM) Detected 1662.529 MHz processor.
(xVM) CPU0: Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz stepping 0d
(xVM) Booting processor 1/1 eip 90000
(xVM) CPU1: Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz stepping 0d
(xVM) Total of 2 processors activated.
(xVM) ENABLING IO-APIC IRQs
(xVM) -> Using new ACK method
(xVM) Platform timer overflows in 14998 jiffies.
(xVM) Platform timer is 14.318MHz HPET
(xVM) Brought up 2 CPUs
(xVM) *** LOADING DOMAIN 0 ***
(xVM) Xen kernel: 64-bit, lsb, compat32
(xVM) Dom0 kernel: 64-bit, lsb, paddr 0x40000000 -> 0x40826ea8(xVM) PHYSICAL MEMORY ARRANGEMENT:
(xVM) Dom0 alloc.: 0000000034000000->0000000038000000 (219929 pages to be all
ocated)
(xVM) VIRTUAL MEMORY ARRANGEMENT:
(xVM) Loaded kernel: 0000000040000000->0000000040826ea8
(xVM) Init. ramdisk: 0000000040827000->000000004238c000
(xVM) Phys-Mach map: 000000004238c000->00000000425598c8
(xVM) Start info: 000000004255a000->000000004255a49c
(xVM) Page tables: 000000004255b000->0000000042572000
(xVM) Boot stack: 0000000042572000->0000000042573000
(xVM) TOTAL: 0000000040000000->0000000042800000
(xVM) ENTRY ADDRESS: 0000000040800000
(xVM) Dom0 has maximum 2 VCPUs
(xVM) Initrd len 0x1b65000, start at 0x40827000
(xVM) Scrubbing Free RAM: done.
(xVM) Scrubbing Free RAM: done.
(xVM) Xen trace buffers: disabled
(xVM) Std. Loglevel: Errors and warnings
(xVM) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(xVM) Xen is relinquishing VGA console.
(xVM) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen).
(xVM) Freed 124kB init memory.

# xm mem-set Domain-0 512
# xm list Domain-0
Name ID Mem VCPUs State Time(s)
Domain-0 0 512 2 r----- 87.2

# psrinfo -vp
The physical processor has 2 virtual processors (0 1)
x86 (GenuineIntel 6FD family 6 model 15 step 13 clock 1667 MHz)
Intel(r) Core(tm)2 Duo CPU T5450 @ 1.66GHz

# svccfg -s xend setprop config/dom0-cpus=1
# init 6

# psrinfo
0 on-line since 01/25/2009 15:49:22
1 powered-off since 01/25/2009 15:50:05

# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 923 1 r----- 47.9