Thursday, May 28, 2009

OpenSolaris CommunityOne West Presentation Material

Tuesday, April 14, 2009

OpenSolaris Live USB Creator in Windows

Last Saturday, Hiroshi Chonan announced this:
Hello All!

Nowadays, there are lot of OpenSolaris-flavored USB Images. Didn't you
feel difficult when creating LiveUSB sticks?
Do you want to create sticks using easy way on Windows PC?

I wrote utility to create OpenSolaris LiveUSB stick which work under
Windows OS.

Please check URL below ;
http://devzone.sites.pid0.org/OpenSolaris/opensolaris-liveusb-creator
Hiroshi Chonan

--
Hiroshi Chonan
SCA # OS0255

Labels:

Wednesday, February 11, 2009

OpenSolaris Bible - Free Chapters

Thursday, January 08, 2009

SNMP on OpenSolaris 2008.11

Apparently there isn't any SNMP service daemon available in the OpenSolaris
# uname -a
SunOS opensolaris 5.11 snv_101b i86pc i386 i86pc Solaris

# svcs -a | grep -i snmp
disabled       22:28:58 svc:/network/device-discovery/printers:snmp

If you want to explore SNMP, you may want to download the Net-SNMP. In my case, I downloaded the source code for net-snmp-5.4.2.1 and configured & compiled with the default settings. BTW, I installed the SunStudio Express via the OpenSolaris Package Manager. The default location will be in /usr/local

# which cc
/usr/bin/cc

# ls -l /usr/bin/cc
lrwxrwxrwx 1 root root 33 2008-12-04 09:09 /usr/bin/cc -> ../../opt/SunStudioExpress/bin/cc

# cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2008/10/22
usage: cc [ options] files.  Use 'cc -flags' for details

# CC=cc

# export CC/stdin>

# ./configure
....

# make
...

# make install

You need to configure it with /usr/local/bin/snmpconf -g basic_setup for basic configuration. Simply answer a dozen of questions and the software will create snmpd.conf file. Now all you have to do is to launch the snmpd daemon with this configuration file.
/usr/local/sbin/snmpd -c /usr/local/etc/snmpd.conf
Below shows you how you can explore the SNMP MIB information. I am using based on version 2c of the SNMP. You can get individual MIB data (eg. sysDesrc.0 - system description), recursively get the SNMP tree on the system, interface (if) or even the entire mib-2 section of the MIB-2 tree. BTW, my opensolaris is running in my VirtualBox

# /usr/local/bin/snmpget -c public -v 2c localhost sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: SunOS opensolaris 5.11 snv_101b i86pc

# /usr/local/bin/snmpwalk -c public -v 2c localhost system
SNMPv2-MIB::sysDescr.0 = STRING: SunOS opensolaris 5.11 snv_101b i86pc
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.3
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (115731) 0:19:17.31
SNMPv2-MIB::sysContact.0 = STRING: chihung@singnet.com.sg
SNMPv2-MIB::sysName.0 = STRING: opensolaris
SNMPv2-MIB::sysLocation.0 = STRING: home
SNMPv2-MIB::sysServices.0 = INTEGER: 79
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.9 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (1) 0:00:00.01

# /usr/local/bin/snmpwalk -c public -v 2c localhost if
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo0
IF-MIB::ifDescr.2 = STRING: e1000g0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 8232
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 127000000
IF-MIB::ifSpeed.2 = Gauge32: 1000000000
IF-MIB::ifPhysAddress.1 = STRING: 
IF-MIB::ifPhysAddress.2 = STRING: 8:0:27:41:ea:8
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 3686760
IF-MIB::ifInOctets.2 = Counter32: 6909176
IF-MIB::ifInUcastPkts.1 = Counter32: 11974
IF-MIB::ifInUcastPkts.2 = Counter32: 6268
IF-MIB::ifInNUcastPkts.1 = Counter32: 0
IF-MIB::ifInNUcastPkts.2 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInDiscards.2 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 0
IF-MIB::ifInUnknownProtos.1 = Counter32: 0
IF-MIB::ifInUnknownProtos.2 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 3694152
IF-MIB::ifOutOctets.2 = Counter32: 498473
IF-MIB::ifOutUcastPkts.1 = Counter32: 11998
IF-MIB::ifOutUcastPkts.2 = Counter32: 3699
IF-MIB::ifOutNUcastPkts.1 = Counter32: 0
IF-MIB::ifOutNUcastPkts.2 = Counter32: 127
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutDiscards.2 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutErrors.2 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 0
IF-MIB::ifOutQLen.2 = Gauge32: 0
IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero
IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero

# /usr/local/bin/snmpwalk -c public -v 2c localhost mib-2
.....

See this image for the SNMP MIB tree layout

Labels: ,

Thursday, December 04, 2008

OpenSolaris 2008.11 Finally Arrived

OpenSolaris 2008.11 has finally arrived yesterday, but in December(12) not November (11). Anyway, the installation was pretty smooth on my Sun xVM VirtualBox.

Previous OS 2008.05 was not very pleasant because the Package Manager GUI could not be launched for no reason. 2008.11 seems to be pretty good and now I am sitting in the coffee shop downloading Sun Studio.

There is a lot good stuff in this new release, example, ZFS Time Slider (something like MacOSX's Time Machine)

If you do not have time to read up, you may want to just view this 12min+ webcast

Labels:

Thursday, July 17, 2008

OpenSolaris Curriculum Development Resources

I stumbled upon the OpenSolaris Curriculum Development Resources while I was trying to find other stuff on Solaris. Tonnes of material on almost every aspect of OpenSolaris.

Labels:

Wednesday, June 18, 2008

Cool Stuff from OpenSolaris 2008.05

You have to read this OpenSolaris 2008.05 review from Ashwin Bhat, a Sun Campus Ambassador. He has more or less summarised most of the cool stuff in OpenSolaris

Labels:

Friday, June 06, 2008

Storage Solution on OpenSolaris

I blogged about Sun Open Storage few weeks ago and I am sure you will agree with me that the future for storage will be based on open standards.

If we are in the same frequency, you should read this article:
Building a Storage Server on top of OpenSolaris by Thomas Nau from University of Ulm, Germany

With ZFS, iSCSI (target and initiator), CIFS, NFS (NFSv4.1, a.k.a parallel NFS (pNFS) in the pipeline) all being "first-class citizen" in OpenSolaris, I am sure OpenSolaris will rock.

Labels: ,

Sunday, May 18, 2008

Sun Open Storage

Sun Microsystems is going to change the landscape of storage from proprietary to open standard and they call it Sun Open Storage. As mentioned in the OpenSolaris's Storage Community web page:
The importance of OpenSolaris as a storage operating system has really emerged with the new and updated storage features, such as ZFS, NFS, pNFS, Shared QFS, Storage Archive Manager, Honeycomb fixed content management, Availability Suite, iSCSI, etc. OpenSolaris is now being embedded in storage appliances or used on hybrid server/storage devices to manage very large collections of data.

A White Paper: What is Open Storage describes the concept, cost saving and value proposition of having open standard for the storage software stack (Click here to view image from original site). Sun claims that open storage architecture offers 90 percent less $/GB storage compared to a closed storage architecture.

With the advance features in hardware and softwware like: OpenSolaris, ZFS, Common Internet File System (CIFS) server, other storage projects and Sun Fire X4500 (a.k.a Thumper), it is not hard to envisage how all these pieces fit together to realise an open standard storage.

There is another article in Sun Developers Network describing how to Set Up an OpenSolaris Storage Server in 10 Minutes or Less. BTW, a new startup company, Nexenta Systems, has been developing open source based storage software solutions.

Also, a video featuring Sun's Andy Bechtolsheim, Matt Baier, and Jeff Bonwick join John Fowler to discuss advancements in Open Storage.

Labels: , ,

Thursday, May 15, 2008

OpenSolaris 200805, Missing Header Files

As you know, I am now running OpenSolaris 2008.05 under VirtualBox in my Windows Vista. Today I had time to install the SunStudio 12 and Sun HPC Cluster Tools 7.1 in my virtual opensolaris so that I can compile all my favourite open source and HPC tools.

I realised that the this OpenSolaris 2008.05 does not come with OS header files (eg. stdio.h, ....) and X Windows include files (eg, X11/Xlib.h, ...), probably because the LiveCD version cannot afford to put too many things in 700MB. Anyway, you need to install SUNWhea and SUNWxwinc packages using "packagemanager" CLI. BTW, I was not able to launch the "Package Manager" from the "System" -> "Administration". The GUI Package Manager screwed up my keyboard input for no obvious reason.

See screen dumps for packagemanager in action.

Labels: ,

Thursday, November 01, 2007

CentOS 5 in openSolaris xVM

As you already know that I installed openSolaris build 75 recently and promised to blog more about the xVM. Good news, I managed to install CentOS 5 after a lot of attempts based on CDROM, Hard Disk, NFS, ...

I copied ISO images of CentOS5, openSUSE 10.3, and Solaris 10 U4 to the SunFire X4600. I tried to install a guest xvm on top of the openSolaris using DVD and ISO, but no luck in any of these. Same for NFS installation, the "virt-install" command just complained that it cannot find the NFS server. However, I was able to mount it manually.

Today, I tried the HTTP method and CentOS 5 worked but the others just failed. The CentOS 5 ISO was mounted using the LOFI ("lofiadm -a") followed by "mount -F hsfs". The mount point will be the "DocumentRoot" for the Apache web server. Below shows some of the details:

Make sure you boot up openSolaris xVM (this is not the default)

root@opensolaris# uname -a
SunOS opensolaris 5.11 snv_75 i86pc i386 i86xpv

root@opensolaris# svcs -a | grep xvm
online         Oct_30   svc:/system/xvm/store:default
online         Oct_30   svc:/system/xvm/xend:default
online         Oct_30   svc:/system/xvm/console:default
online         Oct_30   svc:/system/xvm/domains:default

root@opensolaris# ps -ef | grep xen
    root   336     1   0   Oct 30 ?           0:01 /usr/lib/xenstored --pid-file=/var/run/xenstore.pid
    root   418     1   0   Oct 30 ?           0:01 /usr/lib/xenconsoled start
    root   366     1   0   Oct 30 ?           0:30 python /usr/lib/xend start

For installation, you need "virt-install" (install guest operating system on xVM system) and "virsh" (management user interface for guest domains). You can either supply all the necessary arguments to virt-install. If insufficient details in creating the domain, it will prompt you for the details. By default, 1 CPU will be allocated to the guest domain. In this exercise, I forced it to use 4 'cos I have 16 CPUs in the server. You can always shutdown the domain and change the number of vcpu. In this domain, I allocated 4 CPUs, 4 GB memory and 10GB of disk space. The whole domain of 10GB will be housed in 1 file and you will see that this file has been used as lofi (loop back file system).

root@opensolaris# virt-install -vcpus=4
What is the name of your virtual machine? centos5
 How much RAM should be allocated (in megabytes)? 4096
 What would you like to use as the disk (path)? /data/xvm/centos5.xvm
 How large would you like the disk (/data/xvm/centos5.xvm) to be (in gigabytes)? 10
 Would you like to enable graphics support? (yes or no) no
 What is the install location? http://10.0.12.251/centos5/
....
....
[answer all the questions to setup the CentOS5]

root@opensolaris# xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0 27759    16     r-----   7321.9
centos5                                    7  4096     4     -b----      7.3

root@opensolaris# xm list -l centos5
(domain
    (domid 7)
    (on_crash restart)
    (memory 4096)
    (uuid 3816e1f7-5e95-1841-0adc-5fc4a5360aa5)
    (bootloader_args )
    (name centos5)
    (maxmem 4096)
    (on_reboot restart)
    (on_poweroff destroy)
    (localtime 0)
    (vcpus 4)
    (bootloader /usr/lib/xen/bin/pygrub)
    (shadow_memory 0)
    (cpu_weight 256)
    (cpu_cap 0)
    (features )
    (on_xend_start ignore)
    (on_xend_stop shutdown)
    (start_time 1193889884.81)
    (cpu_time 7.283464146)
    (online_vcpus 4)
    (image (linux (kernel )))
    (status 2)
    (memory_dynamic_min 4096)
    (memory_dynamic_max 4096)
    (state -b----)
    (store_mfn 7498403)
    (console_mfn 7498402)
    (device
        (vif
            (bridge )
            (mac 00:16:3e:14:84:e5)
            (uuid b7628569-99c7-6b55-d120-13c4e0b5630d)
        )
    )
    (device
        (vbd
            (uname file:/data/xvm/centos5.xvm)
            (driver paravirtualised)
            (mode w)
            (dev xvda)
            (uuid 6666b6c5-6667-a8cf-17fd-52a7374881c7)
        )
    )
)

root@opensolaris# ls -l /data/xvm/centos5.xvm
-rwxr-xr-x   1 root     root     10737418240 Nov  1 13:26 /data/xvm/centos5.xvm

root@opensolaris# lofiadm
Block Device             File
/dev/lofi/1              /data/xvm/centos5.xvm

Now the guest domain is ready, let us login via the "xm" command and explore whether the new guest domain has been configured properly. Ctrl-] is the keyboard sequence to break out from the xvm.

root@opensolaris# xm console centos5
Bootdata ok (command line is ro root=/dev/VolGroup00/LogVol00 console=xvc0)
Linux version 2.6.18-8.el5xen (mockbuild@builder6.centos.org) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Thu Mar 15 19:56:43 EDT 2007
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000100800000 (usable)
No mptable found.
Built 1 zonelists.  Total pages: 1050624
Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=xvc0
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 2613.400 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
Software IO TLB disabled
Memory: 4096768k/4202496k available (2321k kernel code, 96972k reserved, 1312k data, 168k init)
Calibrating delay using timer specific routine.. 6538.09 BogoMIPS (lpj=13076195)
Security Framework v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: Physical Processor ID: 7
CPU: Processor Core ID: 1
(SMP-)alternatives turned off
Brought up 1 CPUs
checking if image is initramfs... it is
Grant table initialized
NET: Registered protocol family 16
ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread 377A0 could not acquire Mutex [2] [20060707]
Initializing CPU#1
migration_cost=1074
migration_cost=1074Initializing CPU#2

migration_cost=1074
Brought up 4 CPUs
Initializing CPU#3
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 262144 (order: 9, 2097152 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14-xen <tigran@veritas.com>
audit: initializing netlink socket (disabled)
audit(1193918686.777:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
SELinux:  Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 991108A46E99ED4B
- User ID: CentOS (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
Xen virtual console successfully installed as xvc0
Bootdata ok (command line is ro root=/dev/VolGroup00/LogVol00 console=xvc0)
Linux version 2.6.18-8.el5xen (mockbuild@builder6.centos.org) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Thu Mar 15 19:56:43 EDT 2007
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000100800000 (usable)
No mptable found.
Built 1 zonelists.  Total pages: 1050624
Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=xvc0
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 2613.400 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
Software IO TLB disabled
Memory: 4096768k/4202496k available (2321k kernel code, 96972k reserved, 1312k data, 168k init)
Calibrating delay using timer specific routine.. 6538.09 BogoMIPS (lpj=13076195)
Security Framework v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: Physical Processor ID: 7
CPU: Processor Core ID: 1
(SMP-)alternatives turned off
Brought up 1 CPUs
checking if image is initramfs... it is
Grant table initialized
NET: Registered protocol family 16
ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread 377A0 could not acquire Mutex [2] [20060707]
Initializing CPU#1
migration_cost=1074
migration_cost=1074Initializing CPU#2

migration_cost=1074
Brought up 4 CPUs
Initializing CPU#3
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 262144 (order: 9, 2097152 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14-xen <tigran@veritas.com>
audit: initializing netlink socket (disabled)
audit(1193918686.777:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
SELinux:  Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 991108A46E99ED4B
- User ID: CentOS (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
Xen virtual console successfully installed as xvc0
Event-channel device installed.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
TCP bic registered
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
Write protecting the kernel read-only data: 439k
Red Hat nash version 5.1.19.6 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0
Loading ohci-hcd.ko module
Loading ehci-hcd.ko module
Loading jbd.ko module
Loading ext3.ko module
Loading xenblk.ko module
Registering block device major 202
 xvda: xvda1 xvda2
Loading dm-mod.ko module
device-mapper: ioctl: 4.11.0-ioctl (2006-09-14) initialised: dm-devel@redhat.com
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Making device-mapper control node
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2
Activating logical volumes
  2 logical volume(s) in volume group "VolGroup00" now active
Creating root device.
Mounting root filesystem.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Setting up other filesystems.
Setting up new root fs
no fstab.sys, mounting internal defaults
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
SELinux:  Disabled at runtime.
SELinux:  Unregistering netfilter hooks
audit(1193918690.801:2): selinux=0 auid=4294967295
INIT: version 2.86 booting
                Welcome to  CentOS release 5 (Final)
                Press 'I' to enter interactive startup.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock  (utc): Thu Nov  1 20:04:50 SGT 2007 [  OK  ]
Starting udev: [  OK  ]
Setting hostname centos5:  [  OK  ]
Setting up Logical Volume Management:   2 logical volume(s) in volume group "VolGroup00" now active
[  OK  ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00: clean, 42848/2080768 files, 369765/2080768 blocks
[/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a /dev/xvda1
/boot: clean, 36/26104 files, 15441/104388 blocks
[  OK  ]
Remounting root filesystem in read-write mode:  [  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling local filesystem quotas:  [  OK  ]
Enabling /etc/fstab swaps:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Starting background readahead: [  OK  ]
Checking for hardware changes [  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  [  OK  ]
Starting auditd: [  OK  ]
Starting system logger: [  OK  ]
Starting kernel logger: [  OK  ]
Starting irqbalance: [  OK  ]
Starting portmap: [  OK  ]
Starting NFS statd: [  OK  ]
Starting RPC idmapd: [  OK  ]
Starting system message bus: [  OK  ]
[  OK  ] Bluetooth services:[  OK  ]
Mounting other filesystems:  [  OK  ]
Starting PC/SC smart card daemon (pcscd): [  OK  ]
Starting hidd: [  OK  ]
Starting autofs:  Loading autofs4: [  OK  ]
Starting automount: [  OK  ]
[  OK  ]
Starting cups: [  OK  ]
Starting sshd: [  OK  ]
Starting xinetd: [  OK  ]
Starting sendmail: [  OK  ]
Starting sm-client: [  OK  ]
Starting console mouse services: [  OK  ]
Starting crond: [  OK  ]
Starting anacron: [  OK  ]
Starting atd: [  OK  ]
Starting yum-updatesd: [  OK  ]
Starting Avahi daemon... [  OK  ]
Starting HAL daemon: [  OK  ]
Starting smartd: [  OK  ]

CentOS release 5 (Final)
Kernel 2.6.18-8.el5xen on an x86_64

centos5 login: chihung
Password:
Last login: Thu Nov  1 19:55:29 from 10.0.12.33
[chihung@centos5 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      7.7G  1.2G  6.2G  16% /
/dev/xvda1             99M   12M   82M  13% /boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm

[chihung@centos5 ~]$ which tclsh
/usr/bin/tclsh
[chihung@centos5 ~]$ tclsh
% parray tcl_platform
tcl_platform(byteOrder) = littleEndian
tcl_platform(machine)   = x86_64
tcl_platform(os)        = Linux
tcl_platform(osVersion) = 2.6.18-8.el5xen
tcl_platform(platform)  = unix
tcl_platform(threaded)  = 1
tcl_platform(user)      = chihung
tcl_platform(wordSize)  = 8
% set tcl_patchLevel
8.4.13
% exit

[chihung@centos5 ~]$ exit

[chihung@centos5 ~]$ su -

[root@centos5 proc]# xentop
xentop - 12:13:56   Xen 3.0.4-1-xvm
2 domains: 1 running, 1 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
Mem: 33029676k total, 33028064k used, 1612k free    CPUs: 16 @ 2613MHz
      NAME  STATE   CPU(sec) CPU(%)     MEM(k) MEM(%)  MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS   VBD_OO   VBD_
RD   VBD_WR SSID
   centos5 --b---          8    0.0    4194072   12.7    4194304      12.7     4    1        0        0    1        0
 0        0    0
  Domain-0 -----r       7350    0.0   28424612   86.1   no limit       n/a    16    0        0        0    0        0
 0        0    0

[root@centos5 proc]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : Dual Core AMD Opteron(tm) Processor 885
stepping        : 2
cpu MHz         : 2613.400
cache size      : 1024 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy
bogomips        : 6538.09
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : Dual Core AMD Opteron(tm) Processor 885
stepping        : 2
cpu MHz         : 2613.400
cache size      : 1024 KB
physical id     : 1
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy
bogomips        : 6538.09
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : Dual Core AMD Opteron(tm) Processor 885
stepping        : 2
cpu MHz         : 2613.400
cache size      : 1024 KB
physical id     : 2
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy
bogomips        : 6538.09
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : Dual Core AMD Opteron(tm) Processor 885
stepping        : 2
cpu MHz         : 2613.400
cache size      : 1024 KB
physical id     : 3
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy
bogomips        : 6538.09
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

[root@centos5 proc]# cat /proc/meminfo
MemTotal:      4194304 kB
MemFree:       3911712 kB
Buffers:         11708 kB
Cached:         117648 kB
SwapCached:          0 kB
Active:          51032 kB
Inactive:       105476 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      4194304 kB
LowFree:       3911712 kB
SwapTotal:     2031608 kB
SwapFree:      2031608 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:       27168 kB
Mapped:           8720 kB
Slab:            11084 kB
PageTables:       2612 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   4128760 kB
Committed_AS:    66944 kB
VmallocTotal: 34359738367 kB
VmallocUsed:      1080 kB
VmallocChunk: 34359737267 kB

[root@centos5 proc]# uname -a
Linux centos5 2.6.18-8.el5xen #1 SMP Thu Mar 15 19:56:43 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

[root@centos5 proc]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:3E:14:84:E5
          inet addr:10.0.12.34  Bcast:10.0.12.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe14:84e5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9518 (9.2 KiB)  TX bytes:9536 (9.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@centos5 proc]# top 
top - 20:10:23 up 5 min,  1 user,  load average: 0.00, 0.04, 0.02
Tasks:  78 total,   1 running,  77 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4194304k total,   281992k used,  3912312k free,    11796k buffers
Swap:  2031608k total,        0k used,  2031608k free,   117720k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1654 root      15   0 12568 1212  916 R    0  0.0   0:00.03 top
    1 root      18   0 10308  712  592 S    0  0.0   0:00.06 init [3]
    2 root      RT   0     0    0    0 S    0  0.0   0:00.00 [migration/0]
    3 root      34  19     0    0    0 S    0  0.0   0:00.00 [ksoftirqd/0]
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 [watchdog/0]
    5 root      10  -5     0    0    0 S    0  0.0   0:00.00 [events/0]
    6 root      10  -5     0    0    0 S    0  0.0   0:00.00 [khelper]
    7 root      10  -5     0    0    0 S    0  0.0   0:00.00 [kthread]
    9 root      10  -5     0    0    0 S    0  0.0   0:00.00 [xenwatch]
   10 root      10  -5     0    0    0 S    0  0.0   0:00.00 [xenbus]
   14 root      RT  -5     0    0    0 S    0  0.0   0:00.00 [migration/1]
   15 root      34  19     0    0    0 S    0  0.0   0:00.00 [ksoftirqd/1]
   16 root      RT  -5     0    0    0 S    0  0.0   0:00.00 [watchdog/1]
   17 root      10  -5     0    0    0 S    0  0.0   0:00.00 [events/1]

[root@centos5 proc]# exit

[chihung@centos5 ~]$ exit

CentOS release 5 (Final)
Kernel 2.6.18-8.el5xen on an x86_64

centos5 login: root@opensolaris#

To manage those guest domains, you need to use "virsh"

root@opensolaris# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # help
Commands:

    capabilities    capabilities
    connect         (re)connect to hypervisor
    console         connect to the guest console
    create          create a domain from an XML file
    start           start a (previously defined) inactive domain
    destroy         destroy a domain
    define          define (but don't start) a domain from an XML file
    domid           convert a domain name or UUID to domain id
    domuuid         convert a domain name or id to domain UUID
    dominfo         domain information
    domname         convert a domain id or UUID to domain name
    domstate        domain state
    dumpxml         domain information in XML
    help            print help
    list            list domains
    nodeinfo        node information
    quit            quit this interactive terminal
    reboot          reboot a domain
    restore         restore a domain from a saved state in a file
    resume          resume a domain
    save            save a domain state to a file
    schedinfo       show/set scheduler parameters
    dump            dump the core of a domain to a file for analysis
    shutdown        gracefully shutdown a domain
    setmem          change memory allocation
    setmaxmem       change maximum memory limit
    setvcpus        change number of virtual CPUs
    suspend         suspend a domain
    undefine        undefine an inactive domain
    vcpuinfo        domain vcpu information
    vcpupin         control domain vcpu affinity
    version         show version
    vncdisplay      vnc display
    attach-device   attach device from an XML file
    detach-device   detach device from an XML file

virsh # vcpuinfo centos5
VCPU:           0
CPU:            7
State:          blocked
CPU time:       4.3s
CPU Affinity:   yyyyyyyyyyyyyyyy

VCPU:           1
CPU:            0
State:          blocked
CPU time:       1.9s
CPU Affinity:   yyyyyyyyyyyyyyyy

VCPU:           2
CPU:            3
State:          blocked
CPU time:       1.4s
CPU Affinity:   yyyyyyyyyyyyyyyy

VCPU:           3
CPU:            12
State:          blocked
CPU time:       1.2s
CPU Affinity:   yyyyyyyyyyyyyyyy

virsh # nodeinfo
CPU model:           i86pc
CPU(s):              16
CPU frequency:       2613 MHz
CPU socket(s):       8
Core(s) per socket:  2
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         33029120 kB

virsh # version
Compiled against library: libvir 0.2.3
Using library: libvir 0.2.3
Using API: Xen 3.0.1
Running hypervisor: Xen 3.0

virsh # dumpxml centos5
<domain type='xen' id='8'>
  <name>centos5</name>
  <uuid>3816e1f75e9518410adc5fc4a5360aa5</uuid>
  <bootloader>/usr/lib/xen/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
  </os>
  <memory>4194304</memory>
  <vcpu>4</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <interface type='ethernet'>
      <mac address='00:16:3e:14:84:e5'/>
    </interface>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/data/xvm/centos5.xvm'/>
      <target dev='xvda'/>
    </disk>
    <console tty='/dev/pts/3'/>
  </devices>
</domain>

virsh # dumpxml Domain-0
<domain type='xen' id='0'>
  <name>Domain-0</name>
  <uuid>00000000000000000000000000000000</uuid>
  <memory>28423168</memory>
  <vcpu>16</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
  </devices>
</domain>

virsh # quit

BTW, the xm, virt-install and virsh frontend to xVM are mostly implemented in Python.

root@opensolaris# pwd
/usr/lib/python2.4/vendor-packages/xen

root@opensolaris# ls
__init__.py   __init__.pyc  lowlevel      sv            util          web           xend          xm

root@opensolaris# pwd
/usr/lib/python2.4/vendor-packages/xen/xm

root@opensolaris# ls
XenAPI.py          cfgbootpolicy.pyc  dumppolicy.py      labels.pyc         migrate.py         resources.pyc
XenAPI.pyc         console.py         dumppolicy.pyc     loadpolicy.py      migrate.pyc        rmlabel.py
__init__.py        console.pyc        getlabel.py        loadpolicy.pyc     new.py             rmlabel.pyc
__init__.pyc       create.py          getlabel.pyc       main.py            new.pyc            shutdown.py
addlabel.py        create.pyc         help.py            main.pyc           opts.py            shutdown.pyc
addlabel.pyc       dry-run.py         help.pyc           makepolicy.py      opts.pyc
cfgbootpolicy.py   dry-run.pyc        labels.py          makepolicy.pyc     resources.py

root@opensolaris# head -1 /usr/sbin/xm
#!/usr/bin/env python

Hope those output helps you to 'interact' with the xvm in openSolaris.

Labels: , , ,

Friday, October 26, 2007

OpenSolaris and Tcl

Just installed OpenSolaris Build 75 and booted it up with xVM (Xen). I tried Brandz before with CentOS 3 with OpenSolaris Build 59, that was quite some time ago. However, I was not very pleased with Brandz running an old Linux kernel 2.4.

Anyway, I need to dig into Xen and tried to understand all the ins and outs. Stay tune, for sure I will blog about my findings.

One of the findings is that Tcl is in the main stream. Also, Tcl binding for PostgreSQL is fully integrated too.

In Solaris 10, it used to be in /usr/sfw (Sunfreeware) directory and is running a pretty old version Tcl 8.3.3.

# pkginfo | grep -i tcl
system      SUNWTcl                          Tcl - Tool Command Language
system      SUNWTk                           Tk - TCL GUI Toolkit
system      SUNWpostgr-82-pl                 PostgreSQL 8.2 additional Perl, Python & TCL server procedural languages
system      SUNWpostgr-82-tcl                Tcl binding library for PostgreSQL 8.2
system      SUNWpostgr-tcl                   A Tcl client library for PostgreSQL

# pkginfo -l SUNWTcl
   PKGINST:  SUNWTcl
      NAME:  Tcl - Tool Command Language
  CATEGORY:  system
      ARCH:  i386
   VERSION:  11.11.0,REV=2007.10.02.00.53
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  Tcl - Tool Command Language (8.4.14)
    PSTAMP:  sfwnv-x20071002010749
  INSTDATE:  Oct 26 2007 13:40
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:      736 installed pathnames
                   9 shared pathnames
                  17 directories
                   3 executables
               10154 blocks used (approx)

Labels: ,

Thursday, July 19, 2007

OpenSolaris in a 4GB Thumb Drive, then Ubuntu

I brought a 4GB thumb drive a month ago to try loading OpenSolaris Belenix 0.6 LiveCD. In the web site, it says:
Usbdump integrated into the LiveCD. You can now boot from the CD pop in a USB stick and execute usbdump in a terminal to get BeleniX on USB.
Although it works, the /usr partition is mounted as read only and therefore I cannot do any package installation.

Anyway, the 4GB thumb moves on to Ubuntu 6.10. Why not the latest 7.04 'cos most of the people complained about having problem with this version. This article from Pendrivelinux.com has a very detailed step-by-step guide.

I partitioned 2GB FAT16 for the OS, and 2GB ext2 for my /opt. It is possible to do "apt-get install" to install packages.

What's next for my 4GB? I have no idea.

Labels: , , ,