Thursday, January 29, 2009

20090129 - CPUID differences

Interestingly, found that VMware Workstation 6.0 masks the CPUID and stepping differently from the native processor, but VMware WS6.5 corrects this.

eg:

Native:

VMware workstation 6.0:
VMware workstation 6.5:
Compare this with VirtualBox 2.1.0:

VirtualBox:

Tuesday, January 27, 2009

20090127 - Disabling cores in Linux

Disabling cores in Linux:

Interestingly enough, the cores are numbered and enabled incrementally across sockets.

[root@minint-9o1oqe2 ~]# egrep 'core id|phys|proc' /proc/cpuinfo
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3
processor : 4
physical id : 1
core id : 0
processor : 5
physical id : 1
core id : 1
processor : 6
physical id : 1
core id : 2
processor : 7
physical id : 1
core id : 3



maxcpus=1
processor : 0
physical id : 0
core id : 0

maxcpus=2
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1

maxcpus=3
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2

maxcpus=4
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3

maxcpus=5
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3
processor : 4
physical id : 1
core id : 0

maxcpus=6
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3
processor : 4
physical id : 1
core id : 0
processor : 5
physical id : 1
core id : 1

maxcpus=7
processor : 0
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3
processor : 4
physical id : 1
core id : 0
processor : 5
physical id : 1
core id : 1
processor : 6
physical id : 1
core id : 2

maxcpus=8
physical id : 0
core id : 0
processor : 1
physical id : 0
core id : 1
processor : 2
physical id : 0
core id : 2
processor : 3
physical id : 0
core id : 3
processor : 4
physical id : 1
core id : 0
processor : 5
physical id : 1
core id : 1
processor : 6
physical id : 1
core id : 2
processor : 7
physical id : 1
core id : 3

20090126 - OpenSolaris drivers - or lack thereof

5 different computers. All incapable of running OpenSolaris. See previous post for #1.

And the Acer Aspire Laptop won't even start X11.

Heres three more examples (currently in Windows mode).



Monday, January 26, 2009

20090126 - OpenSolaris driver support

On a pretty simple laptop (Asus), my gigabit network adapter isn't recognised (even by Open Solaris 2009.04): (PCI VID:DID = 1969:1048). This apparently is a Attansic L1.

There's a fantastic java applet to be able to detect hardware compatability:

http://www.sun.com/bigadmin/hcl/hcts/device_detect.jsp

My gigabit network appears unsupported (unless you count alpha development third party drivers).

Sunday, January 25, 2009

20090125 - Difference in isainfo non-xen vs xen

Xen:

root@eddie:~# isainfo -v
64-bit amd64 applications
ssse3 cx16 sse3 sse2 sse fxsr mmx cmov cx8 tsc fpu
32-bit i386 applications
ssse3 ahf cx16 sse3 sse2 sse fxsr mmx cmov cx8 tsc fpu

non-Xen :

root@eddie:~# isainfo -v
64-bit amd64 applications
ssse3 cx16 mon sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
ssse3 ahf cx16 mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

20090125 - No VT-X support

Even though I have an Intel Core2 Duo, it seems to not have virtualisation on chip:

http://www.intel.com/products/processor_number/chart/core2duo.htm

# virt-install -n hvm -r 128 --vcpus=1 -f /export/vms/hvm.dsk --vnc --vncport=5901 --hvm

Unsupported virtualization type

# 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

# isainfo -v

64-bit amd64 applications
ssse3 cx16 sse3 sse2 sse fxsr mmx cmov cx8 tsc fpu
32-bit i386 applications
ssse3 ahf cx16 sse3 sse2 sse fxsr mmx cmov cx8 tsc fpu

20090125 - VT support in OpenSolaris

Ok, so it's about 20 years after everyone else did this (SCO, Linux, BSDI, 386BSD, NetBSD, FreeBSD, even Novell), but at least Sun are now doing it!

Here's how:

# svcadm enable vtdaemon
# svcadm enable console-login:vt2
# svcadm enable console-login:vt3
# svcadm enable console-login:vt4
# svcadm enable console-login:vt5
# svcadm enable console-login:vt6
# svccfg -s vtdaemon setprop general/enabled=true
# svccfg -s vtdaemon setprop options/hotkeys=true
# svccfg -s vtdaemon setprop options/secure=false
# svcadm refresh vtdaemon
# svcadm restart vtdaemon

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

Thursday, January 22, 2009

20090122 - Para Virtualisation

Another downside:

Opensolaris para VM can't be created on a Linux Xen (Oracle VM) hypervisor, because it expects that the guest is also Linux.


OracleVM# virt-install --paravirt --name sol --ram 512 --file /OVS/running_pool/sol/sol.dsk --nographics --location nfs:10.128.16.205:/media/SOL_11_X86


Starting install...
ERROR: Invalid NFS location given: [Errno 2] No such file or directory: '/var/lib/xen/xennfs.E7Dg5V/images/xen/vmlinuz'

20090122 - xVM (Xen) in OpenSolaris

Ok, so Xen in OpenSolaris isn't quite as polished as Xen in Linux - for a couple of reasons.

virt-install doesn't quite work properly yet:

bash-3.2# virt-install
What is the name of your virtual machine? sol_para_vm
How much RAM should be allocated (in megabytes)? 512
What would you like to use as the disk (file path)? /export/vms/sol_para_vm.dsk
Would you like to enable graphics support? (yes or no) yes
What is the install location? /media/SOL_11_X86


Starting install...
virDomainCreateLinux() failed POST operation failed: (xend.err 'Device 0 (vkbd) could not be connected. Hotplug scripts not working.')
Domain installation may not have been
successful. If it was, you can restart your domain
by running 'virsh start sol_para_vm'; otherwise, please
restart your installation.
Wed, 21 Jan 2009 09:32:55 ERROR virDomainCreateLinux() failed POST operation failed: (xend.err 'Device 0 (vkbd) could not be connected. Hotplug scripts not working.')
Traceback (most recent call last):
File "/usr/bin/virt-install", line 511, in ?
main()
File "/usr/bin/virt-install", line 471, in main
dom = guest.start_install(conscb,progresscb)
File "/export/builds/xvm_101///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 878, in start_install
File "/export/builds/xvm_101///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 899, in _do_install
File "libvirt.py", line 585, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: virDomainCreateLinux() failed POST operation failed: (xend.err 'Device 0 (vkbd) could not be connected. Hotplug scripts not working.')


However, these can be fixed by a couple of actions:

By NFS (root,ro) sharing out the /media/SOL_11_X86 mount, It is possible to create a Solaris Xen instance. The only trick is that the automated installer bombs out and you have to restart it with a NFS source, pointing back to the installation source that you've already specified:


So the sequence to create a para VM runs like this:

-bash-3.2# mkfile -n 8g /export/vms/solaris_para_vm.dsk
-bash-3.2# share -o ro,root /media/SOL_11_X86
-bash-3.2# virt-install --paravirt --name solaris_para_vm --ram 512 --file /export/vms/solaris_para_vm.dsk --nographics --location nfs:10.128.16.205:/media/SOL_11_X86



Starting install...
Creating domain... 0 B 00:20
v3.1.4-xvm chgset 'Mon Oct 13 22:14:51 2008 -0700 15904:94bd0a643efe'
SunOS Release 5.11 Version snv_101 32-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring /dev
/
1. Solaris Interactive Text (Console session) (default)
2. Apply driver updates
3. Single user shell

Enter the number of your choice.
Timed out, continuing.

Solaris Interactive Text (Console session)

ERROR: no source install media defined
Trying DHCP on xnf0
Success
Reading ZFS config: done.
ERROR: Cannot find Java software, Exiting to shell
# TERM=xterms ; export TERM
# stty rows 25 cols 80
# install-solaris
Starting Solaris installation program...
Executing JumpStart preinstall phase...
Searching for SolStart directory...
Checking rules.ok file...
Using begin script: install_begin
Using finish script: patch_finish
Executing SolStart preinstall phase...
Executing begin script "install_begin"...
Begin script install_begin execution completed.

On the following screens, you can accept the defaults or you can customize
how Solaris software will be installed by:

- Selecting the type of Solaris software to install
- Selecting disks to hold software you've selected
- Selecting unbundled products to be installed with Solaris
- Specifying how file systems are laid out on the disks

After completing these tasks, a summary of your selections (called a
profile) will be displayed.

There are two ways to install your Solaris software:

- "Standard" installs your system from a standard Solaris Distribution.
Selecting "Standard" allows you to choose between initial install
and upgrade, if your system is upgradable.
- "Flash" installs your system from one or more Flash Archives.




────────────────────────────────────────────────────────────────────────────────
F2_Standard F4_Flash F5_Exit F6_Help


During the installation of Solaris software, you may be using one or more
CDs/DVDs. With the exception of the currently booted CD/DVD, you can choose
to have the system eject each CD/DVD automatically after it is installed or
you can choose to manually eject each CD/DVD.

Note: The currently booted CD/DVD must be manually ejected during system
reboot.


[X] Automatically eject CD/DVD
[ ] Manually eject CD/DVD










────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit


After Solaris software is installed, the system must be rebooted. You can
choose to have the system automatically reboot, or you can choose to
manually reboot the system if you want to run scripts or do other
customizations before the reboot. You can manually reboot a system by using
the reboot(1M) command.


[X] Auto Reboot
[ ] Manual Reboot












────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit











You may need to manually eject the CD/DVD or select a different
boot device after reboot to avoid repeating the installation
process.









────────────────────────────────────────────────────────────────────────────────
F2_OK


Please specify the media from which you will install the Solaris Operating
System.

Media:


[ ] CD/DVD
[X] Network File System













────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit


Please specify the path to the network file system from which you will
install the Solaris Operating System. Example:

NFS Location: server:/path_to_Solaris_image

============================================================================

NFS Location: 10.128.16.205:/media/SOL_11_X86













────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back

─ Initializing ─────────────────────────────────────────────────────────────────





The system is being initialized.















Loading install media, please wait...


- Sun Microsystems, Inc. ("Sun")
│ SOFTWARE LICENSE AGREEMENT

│ READ THE TERMS OF THIS AGREEMENT ("AGREEMENT") CAREFULLY BEFORE
│ OPENING SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA
│ PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE
│ ACCESSING SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF
│ THESE TERMS BY SELECTING THE "ACCEPT"(OR EQUIVALENT) BUTTON AT
│ THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE
│ TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF
│ PURCHASE FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY,
│ SELECT THE "DECLINE" (OR EQUIVALENT) BUTTON AT THE END OF THIS
│ AGREEMENT. IF YOU HAVE SEPARATELY AGREED TO LICENSE TERMS
│ ("MASTER TERMS") FOR YOUR LICENSE TO THIS SOFTWARE, THEN SECTIONS
│ 1-6 OF THIS AGREEMENT ("SUPPLEMENTAL LICENSE TERMS") SHALL
│ SUPPLEMENT AND SUPERSEDE THE MASTER TERMS IN RELATION TO THIS
│ SOFTWARE.

│ 1. Definitions.
v

────────────────────────────────────────────────────────────────────────────────
F2_Accept License F5_Exit


Select the geographic regions for which support should be installed.

V [/] Australasia
[X] Australia (ISO8859-1)
[ ] New Zealand (ISO8859-1)
> [ ] Eastern Europe
> [ ] Western Europe
> [ ] North America
> [ ] Southern Europe
> [ ] South America
> [ ] Central America
> [ ] Central Europe
> [ ] Asia
> [ ] Northern Europe
> [ ] Middle East
> [ ] Northern Africa




Locale is selected. Press Return to deselect
────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit F6_Help



Select the initial locale to be used after the system has been installed.

[ ] POSIX C ( C )
Australasia
[X] Australia (ISO8859-1) ( en_AU.ISO8859-1 )
[ ] English, Australia (UTF-8) ( en_AU.UTF-8 )















────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit F6_Help


To scan for additional products, select the location you wish to scan.
Products found at the selected location that are in a Web Start Ready
install form will be added to the Products list.

Web Start Ready product scan location:


[X] None
[ ] CD/DVD
[ ] Network File System











────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit


Select the filesystem to use for your Solaris installation


[X] UFS
[ ] ZFS
















────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F5_Exit F6_Help


Select the Solaris software to install on the system.

NOTE: After selecting a software group, you can add or remove software by
customizing it. However, this requires understanding of software
dependencies and how Solaris software is packaged.

[ ] Entire Distribution plus OEM support ....... 8439.00 MB
[X] Entire Distribution ........................ 8439.00 MB
[ ] Developer System Support ................... 8190.00 MB
[ ] End User System Support .................... 5870.00 MB
[ ] Core System Support ........................ 1206.00 MB
[ ] Reduced Networking Core System Support ..... 1143.00 MB









────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F4_Customize F5_Exit F6_Help


On this screen you must select the disks for installing Solaris software.
Start by looking at the Suggested Minimum field; this value is the
approximate space needed to install the software you've selected. Keep
selecting disks until the Total Selected value exceeds the Suggested Minimum
value.
NOTE: ** denotes current boot disk

Disk Device Available Space
=============================================================================
[ ] c0t0d0 0 MB

Total Selected: 0 MB
Suggested Minimum: 6738 MB








────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F4_Edit F5_Exit F6_Help










There is no Solaris fdisk partition on this disk. You must
create a Solaris fdisk partition if you want to use it to
install Solaris software.










────────────────────────────────────────────────────────────────────────────────
F2_OK F5_Cancel


There is no Solaris fdisk partition on this disk. You must create a Solaris
fdisk partition if you want to use this disk to install Solaris software.

One or more of the following methods are available: have the software
install a boot partition and a Solaris partition that will fill the entire
fdisk, install just a Solaris partition that will fill the entire fdisk
(both of these options will overwrite any existing fdisk partitions),
install a Solaris partition on the remainder of the disk, install a boot
partition on the disk, or manually lay out the Solaris fdisk partition.

[X] Use entire disk for Solaris partition (8190 MB)
[ ] Manually create fdisk partitions









────────────────────────────────────────────────────────────────────────────────
F2_OK F5_Cancel F6_Help


On this screen you must select the disks for installing Solaris software.
Start by looking at the Suggested Minimum field; this value is the
approximate space needed to install the software you've selected. Keep
selecting disks until the Total Selected value exceeds the Suggested Minimum
value.
NOTE: ** denotes current boot disk

Disk Device Available Space
=============================================================================
[X] c0t0d0 8184 MB (F4 to edit)

Total Selected: 8184 MB
Suggested Minimum: 6738 MB








────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F4_Edit F5_Exit F6_Help


Do you want to use auto-layout to automatically layout file systems?
Manually laying out file systems requires advanced system administration
skills.


















────────────────────────────────────────────────────────────────────────────────
F2_Auto Layout F3_Go Back F4_Manual Layout F5_Exit F6_Help


Boot Disk: c0t0d0

Entry: swap Recommended: 0 MB Minimum: 0 MB
================================================================================
Slice Mount Point Size (MB)
0 / 7672
1 swap 512
2 overlap 8186
3 0
4 0
5 0
6 0
7 0
================================================================================
Solaris Partition Size: 8190 MB
OS Overhead: 6 MB

Usable Capacity: 8184 MB
Allocated: 8184 MB
Free: 0 MB


────────────────────────────────────────────────────────────────────────────────
F2_OK F4_Options F5_Cancel F6_Help


The summary below is your current file system and disk layout, based on the
information you've supplied.

NOTE: If you choose to customize, you should understand file systems, their
intended purpose on the disk, and how changing them may affect the operation
of the system.

File sys/Mnt point Disk/Slice Size
========================================================================
/ c0t0d0s0 7672 MB
swap c0t0d0s1 512 MB
overlap c0t0d0s2 8186 MB









────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F4_Customize F5_Exit F6_Help


Do you want to mount software from a remote file server? This may be
necessary if you had to remove software because of disk space problems.



















────────────────────────────────────────────────────────────────────────────────
F2_Continue F3_Go Back F4_Remote Mounts F5_Exit F6_Help


The information shown below is your profile for installing Solaris software.
It reflects the choices you've made on previous screens.

NOTE: You must change the BIOS because you have changed the default boot
device.

============================================================================

- Installation Option: Initial
│ Boot Device: c0t0d0
│ Root File System Type: UFS
│ Client Services: None

│ Locales: Australia (ISO8859-1)
│ System Locale: Australia (ISO8859-1) ( en_AU.ISO88

│ Software: Solaris 11, Entire Distribution

│ File System and Disk Layout: / c0t0d0s0 7672 MB
v swap c0t0d0s1 512 MB

────────────────────────────────────────────────────────────────────────────────
F2_Begin Installation F4_Change F5_Exit F6_Help

Preparing system for Solaris install

Configuring disk (c0t0d0)
- Creating Fdisk partition table
- Creating Solaris disk label (VTOC)

Creating and checking file systems
- Creating / (c0t0d0s0)

Beginning Solaris software installation

Solaris 11 software installation partially failed

Solaris 11 packages partially installed
SUNWxwfnt
SUNWxwcft
SUNW5xmft
SUNWgttf
SUNW5ttf
SUNWolrte
SUNWinttf
SUNWjxmft
SUNWkxmft
SUNWcxmft
SUNWtxfnt
SUNWxwoft
SUNWkxfnt
SUNWcttf

Customizing system files
- Mount points table (/etc/vfstab)
- Network host addresses (/etc/hosts)
- Environment variables (/etc/default/init)

Cleaning devices

Customizing system devices
- Physical devices (/devices)
- Logical devices (/dev)

Installing boot information
- Updating boot environment configuration file

Installation log location
- /a/var/sadm/system/logs/install_log (before reboot)
- /var/sadm/system/logs/install_log (after reboot)

Installation complete
sh: /usr/lib/install/data/wizards/bin/parsePackagesToBeAdded: not found
Executing SolStart postinstall phase...
Executing finish script "patch_finish"...


Finish script patch_finish execution completed.

Executing JumpStart postinstall phase...

The begin script log 'begin.log'
is located in /var/sadm/system/logs after reboot.

The finish script log 'finish.log'
is located in /var/sadm/system/logs after reboot.

/sbin/setup-launcher[82]: /usr/lib/install/data/wizards/apps: not found
cp: cannot access launcher.class
cp: cannot access postinstall.class
cp: com/sun/launcher and /a/var/sadm/launcher/com/sun/launcher are identical
cp: cannot access /tmp/find_device.out
cp: cannot access /usr/lib/install/data/wizards/bin/postinstaller
cp: cannot access /usr/lib/install/data/wizards/bin/getVold
cp: cannot access /usr/lib/install/data/wizards/bin/runinstall
cp: cannot access /usr/lib/install/data/wizards/bin/ttyFallback
cp: cannot access /usr/lib/install/data/wizards/bin/setupRoot
chmod: WARNING: can't access /a/var/sadm/launcher/bin/*
cp: cannot access /usr/lib/install/data/wizards/bin/install-launcher
/sbin/setup-launcher[186]: /usr/lib/install/data/wizards/apps: not found
Installing Additional Software

Installation of Additional Software Complete
Creating boot_archive for /a
updating /a/platform/i86pc/boot_archive
updating /a/platform/i86pc/amd64/boot_archive
syncing file systems... done
rebooting...



-bash-3.2# xm start solaris_para_vm
-bash-3.2# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 980 1 r----- 774.0
solaris_para_vm 1 1024 1 ------ 15.9


20090122 - Sun Download Mangler

Off to a frustrating start for the day.

I've already tried to download a Sun OpenSolaris nv105 iso image three times (in the process, blowing away about 3.3GB each time).

I thought I'd use Sun Download Manager (Sun Download Mangler), which is supposed to "Easily manage your downloads") :

  • Pause and resume downloads at any time.
  • If your Internet connection is lost, your browser or system crashes, or you need to stop downloading for any reason, you can resume right where you left off. No need to start over again, saving you valuable time and bandwidth.
  • SDM's built-in file verification system works with Sun Download Center (SDLC) to automatically recover from any file corruption during downloading -- you always receive an exact copy of the original file.
  • See the full list of SDM benefits.

Yeah - right


Information:Thu Jan 22 08:54:52 EST 2009:Started processing file sol-nv-b105-x86-dvd.iso from server cds.sun.com
Information:Thu Jan 22 08:54:52 EST 2009:Retrieving verification properties for file sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:54:56 EST 2009:Finished processing file sol-nv-b105-x86-dvd.iso from server cds.sun.com
Information:Thu Jan 22 08:54:57 EST 2009:Started processing file sol-nv-b105-x86-dvd.iso from server cds.sun.com
Information:Thu Jan 22 08:54:58 EST 2009:Starting to download file sol-nv-b105-x86-dvd.iso from server cds.sun.com
Information:Thu Jan 22 08:54:58 EST 2009:Allocating 1048576 bytes of memory for data segment buffer
Information:Thu Jan 22 08:54:58 EST 2009:Initializing destination file C:\temp\sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:54:58 EST 2009:Connecting via http with request method GET and range 0 to server cds.sun.com
Information:Thu Jan 22 08:55:00 EST 2009:Disconnecting via http from server cds-esd.sun.com
Information:Thu Jan 22 08:55:00 EST 2009:Redirecting download of file sol-nv-b105-x86-dvd.iso to server cds-esd.sun.com
Information:Thu Jan 22 08:55:01 EST 2009:Server cds-esd.sun.com reported response code 206 for file sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:55:01 EST 2009:Server cds-esd.sun.com reported response message (Partial Content) for file sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:55:01 EST 2009:Downloading data from server cds-esd.sun.com to file sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:55:01 EST 2009:Creating destination file C:\temp\sol-nv-b105-x86-dvd.iso
ERROR:Thu Jan 22 08:55:11 EST 2009:Invalid size of data (0; expected 3406561280) downloaded to the destination file sol-nv-b105-x86-dvd.iso
Information:Thu Jan 22 08:55:11 EST 2009:Disconnecting via http from server cds-esd.sun.com
ERROR:Thu Jan 22 08:55:11 EST 2009:Unable to complete downloading of data from server cds-esd.sun.com to file sol-nv-b105-x86-dvd.iso




Tuesday, January 20, 2009

20090120 - Or the non graphics way

# virt-install --paravirt --name=para01 --ram=2000 --vcpus=1 --bridge=xenbr2 --file /OVS/running_pool/para01/System.img --location=nfs:10.16.206.21:/mnt --nographics --keymap=en-us


Starting install...
libvir: Xen Daemon error : GET operation failed:
Bootdata ok (command line is method=nfs:10.16.206.21:/mnt )
Linux version 2.6.18-92.el5xen (mockbuild@builder10.centos.org) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jun 10 19:20:18 EDT 2008
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 000000007d800000 (usable)
No mptable found.
Built 1 zonelists. Total pages: 514048
Kernel command line: method=nfs:10.16.206.21:/mnt
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 2666.682 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Software IO TLB disabled
Memory: 1995264k/2056192k available (2414k kernel code, 52152k reserved, 1349k data, 176k init)
Calibrating delay using timer specific routine.. 6670.37 BogoMIPS (lpj=13340757)
Security Framework v1.0.0 initialized
SELinux: Initializing.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 6144K
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 3
(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 2B7A0 could not acquire Mutex [2] [20060707]
No dock devices found.
ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread 2B7A0 could not acquire Mutex [2] [20060707]
Brought up 1 CPUs
PCI: Fatal: No PCI config space access function found
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: 65536 (order: 7, 524288 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
audit: initializing netlink socket (disabled)
audit(1232374521.245:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 52394A11B61A91
- 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 method=nfs:10.16.206.21:/mnt )
Linux version 2.6.18-92.el5xen (mockbuild@builder10.centos.org) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jun 10 19:20:18 EDT 2008
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 000000007d800000 (usable)
No mptable found.
Built 1 zonelists. Total pages: 514048
Kernel command line: method=nfs:10.16.206.21:/mnt
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Xen reported: 2666.682 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Software IO TLB disabled
Memory: 1995264k/2056192k available (2414k kernel code, 52152k reserved, 1349k data, 176k init)
Calibrating delay using timer specific routine.. 6670.37 BogoMIPS (lpj=13340757)
Security Framework v1.0.0 initialized
SELinux: Initializing.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 6144K
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 3
(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 2B7A0 could not acquire Mutex [2] [20060707]
No dock devices found.
ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread 2B7A0 could not acquire Mutex [2] [20060707]
Brought up 1 CPUs
PCI: Fatal: No PCI config space access function found
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: 65536 (order: 7, 524288 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
audit: initializing netlink socket (disabled)
audit(1232374521.245:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 52394A11B61A91
- 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
XENBUS: Device with no driver: device/console/0
Write protecting the kernel read-only data: 461k

Greetings.
anaconda installer init version 11.1.2.113 starting
mounting /proc filesystem... done
creating /dev filesystem... done
mounting /dev/pts (unix98 pty) filesystem... done
mounting /sys filesystem... done
anaconda installer init version 11.1.2.113 using /dev/xvc0 as console
trying to remount root filesystem read write... done
mounting /tmp as ramfs... done
running install...
running /sbin/loader
Welcome to CentOS

+---------+ Choose a Language +---------+
| |
| What language would you like to use |
| during the installation process? |
| |
| Catalan ^ |
| Chinese(Simplified) : |
| Chinese(Traditional) # |
| Croatian : |
| Czech : |
| Danish : |
| Dutch : |
| English v |
| |
| +----+ |
| | OK | |
| +----+ |
| |
| |
+---------------------------------------+

/ between elements | selects | next screen

20090120 - Installing a Para VM

# dd if=/dev/zero bs=1024k of=/OVS/running_pool/para01/System.img count=2000
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB) copied, 17.0235 seconds, 123 MB/s

# export DISPLAY=mydesktop:0

# virt-install --paravirt --name=para01 --ram=2000 --vcpus=1 --bridge=xenbr2 --file /OVS/running_pool/para01/System.img --vnc --vnclisten=0.0.0.0 --location=nfs:10.16.206.21:/mnt --keymap=en-us


Starting install...
libvir: Xen Daemon error : GET operation failed:

VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2007 14:41:26
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Tue Jan 20 01:07:23 2009
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding

This will pop up a X11 VNC console :

20090120 - Poor Man's mkfile -s

In the absence of mkfile(1M) in Linux, the following can be used:

# 1GB file:
# dd /dev/zero bs=1024k of=myfile count=1024

So what?

Well, to make a sparse file (ala mkfile -s), you can still use dd - as long as you seek to the end of the file. count can be zero:

# 1GB file:
# dd if=/dev/zero bs=1024k of=/myfile count=0 seek=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.6e-05 seconds, 0 B/s
# ls -alsh /myfile
0 -rw-r--r-- 1 root root 1.0G Jan 20 00:09 /myfile

To my annoyance, Oracle VM filesystem (OCFS2) doesn't support sparse files:

# dd if=/dev/zero bs=1024k of=/OVS/running_pool/14_big_centos_vm/System.img count=0 seek=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4.9e-05 seconds, 0.0 kB/s
# ls -alsh /OVS/running_pool/14_big_centos_vm/System.img
1.0G -rw-r--r-- 1 root root 1.0G Jan 20 00:11 /OVS/running_pool/14_big_centos_vm/System.img

Crap!

20090120 - A problem with Linux - device naming

One of the issues that really annoys me is the fact that some RH-based distributions (RHEL, CentOS, Oracle EL, Oracle VM), name SCSI devices in the order that they find them, in the controller order.

So, if you're doing an installation on /dev/cciss/c0d0p0, but you're also connected to a SAN, it's possible that the SAN LUNs will be found before the internal disk.

The normal recommendation? To disconnect the SAN HBA fibre connections, but there's a better way:

In the initrd.img file of the installation medium, the driver files are encapsulated. The easiest way to stop the SAN LUNs being found is to remove the SAN drivers.

eg:

ESX 3.x (probably the simplest to understand) :

unalias cp 2> /dev/null
unalias rm 2> /dev/null
unalias mv 2> /dev/null
mount -o ro,loop /export/isos/esx-3.5.0_Update_1-82663.iso /mnt
cd /mnt
mkdir /tmp/esxnab
cp images/boot.iso /tmp
cd /
umount /mnt
mount -o ro,loop /tmp/boot.iso /mnt
cp /mnt/isolinux/vmlinuz /tmp/esxnab
cp /mnt/isolinux/initrd.img /tmp/esxnab
umount /mnt
cp /tmp/esxnab/initrd.img /tmp/esxnab/initrd.img.orig
gunzip < /tmp/esxnab/initrd.img > /tmp/initrd
mount -o rw,loop /tmp/initrd /mnt
mkdir /tmp/newmods
cd /tmp/newmods
gunzip < /mnt/modules/modules.cgz | cpio -id
rm rm 2.4.21-47.0.1.ELBOOT/i386/qla2*
find . | cpio -ocv | gzip -9 > /mnt/modules/modules.cgz
cd /
rm -rf /tmp/newmods
umount /mnt
gzip -9 < /tmp/initrd > /tmp/esxnab/initrd.img


RedHat RHEL 3 :

mkdir /tmp/mnt1
mkdir /tmp/mnt2
mkdir /tmp/mnt3
cat /export/AS3/images/bootdisk.img > /tmp/linuxdisk1
cat /export/AS3/images/drvnet.img > /tmp/linuxdisk2
mount -o loop,rw /tmp/linuxdisk1 /tmp/mnt1

zcat < /tmp/mnt1/initrd.img > /tmp/initrd.img
mount -o loop,rw /tmp/initrd.img /tmp/mnt2
cp -Rp /tmp/mnt2 /tmp/initrd.new
cd /tmp/initrd.new/modules
zcat < modules.cgz | cpio -ivd

mount -o loop,ro /tmp/linuxdisk2 /tmp/mnt3
mkdir /tmp/newmods
cd /tmp/newmods
zcat < /tmp/mnt3/modules.cgz | cpio -ivd

cp 2*BOOT/i386/*.o /tmp/initrd.new/modules/2*BOOT/i386/
cd /tmp/initrd.new/modules/2*BOOT/i386
############# REMOVE UNNECESSARY MODULES HERE #############
rm -f usb-storage.o
rm -f nfs.o sunrpc.o lockd.o
rm -f olympic.o tulip.o dl2k.o natsemi.o
rm -f acenic.o dmfe.o epic100.o ewrk3.o
rm -f ns83820.o sis900.o tlan.o via-rhine.o
rm -f fealnx.o b44.o amd8111e.o pcnet_cs.o
rm -f fbcon-vga-planes.o vga16fb.o
rm -f typhoon.o xircom_cb.o pcmcia_core.o
rm -f sr_mod.o e100.o 8139cp.o 8139too.o ds.o r8169.o

cat /tmp/mnt3/pcitable >> /tmp/mnt2/modules/pcitable
sort -u -o /tmp/mnt2/modules/pcitable /tmp/mnt2/modules/pcitable
cat /tmp/mnt3/modules.dep >> /tmp/mnt2/modules/modules.dep
sort -u -o /tmp/mnt2/modules/modules.dep /tmp/mnt2/modules/modules.dep
cat /tmp/mnt3/modinfo >> /tmp/mnt2/modules/module-info
############# EDIT MODULE INFORMATION HERE #############
vi /tmp/mnt2/modules/module-info

cd ../..
find 2*BOOT/ -print | cpio -ov -H crc | gzip -c9 > /tmp/mnt2/modules/modules.cgz
cd /tmp
umount /tmp/mnt[123]
gzip -9 /tmp/initrd.img

dd if=/dev/zero of=/tmp/AS3.img bs=18k count=80
mkfs.vfat /tmp/AS3.img
syslinux /tmp/AS3.img
mount -o rw,loop /tmp/AS3.img /tmp/mnt1
cp /tmp/initrd.img.gz /tmp/mnt1/initrd.img
cp /export/configs/files/AS3/* /tmp/mnt1
cd /tmp
umount /tmp/mnt1

rm -rf /tmp/newmods
rm -f /tmp/initrd.img.gz /tmp/initrd.img
rmdir /tmp/mnt[123]
rm -rf /tmp/initrd.new
rm -f /tmp/linuxdisk?

cp AS3.img /export/NAB/kickstart_images/


RedHat RHEL 4 :

cp /export/AS4/images/pxeboot/initrd.img /export/AS4/images/pxeboot/initrd.img.orig
cp /export/AS4/RedHat/base/netstg2.img /export/AS4/RedHat/base/netstg2.img.orig
cp /export/AS4/images/boot.iso /export/AS4/images/boot.iso.orig

# initrd
gunzip < /export/AS4/images/pxeboot/initrd.img > /tmp/initrd
mount -o loop /tmp/initrd /mnt
sed 's/"e1000"/"ignore"/;s/"qla.*"/"ignore"/' < /mnt/modules/pcitable > /tmp/x
cat /tmp/x > /mnt/modules/pcitable
umount /mnt
gzip -9 < /tmp/initrd > /export/AS4/images/pxeboot/initrd.img
rm -f /tmp/initrd /tmp/x

# netstg2
mount -o ro,loop /export/AS4/RedHat/base/netstg2.img /mnt
mkdir /tmp/test
(cd /mnt ; find . -print | cpio -dump /tmp/test)
umount /mnt
sed 's/"e1000"/"ignore"/;s/"qla.*"/"ignore"/' < /tmp/test/modules/pcitable \
> /tmp/x
cat /tmp/x > /tmp/test/modules/pcitable
mkcramfs /tmp/test /tmp/netstg2.img
\cp /tmp/netstg2.img /export/AS4/RedHat/base/
rm -rf /tmp/netstg2.img /tmp/test /tmp/x

# make bootable cdimage:
mount -o ro,loop /export/AS4/images/boot.iso /mnt
mkdir /tmp/test
(cd /mnt ; find . -print | cpio -dump /tmp/test)
umount /mnt
\cp /export/AS4/images/pxeboot/initrd.img /tmp/test/isolinux/
printf "label kickstart\n kernel vmlinuz\n append initrd=initrd.img \
ramdisk_size=8192 text nofb ks=http://genesis.global.thenational.com/\
configs/ks4.cfg\n" >> /tmp/test/isolinux/isolinux.cfg
sed 's/^default .*/default kickstart/' < /tmp/test/isolinux/isolinux.cfg \
> /tmp/x
cat /tmp/x > /tmp/test/isolinux/isolinux.cfg
printf "\x0C\n\n - To install Linux, wait 60 seconds, or press \x00F0f\
\x00F07.\n\n\x00F02[F1-Main] [F2-Options] [F3-General] [F4-Kernel] \
[F5-Rescue]\x00F07\n" > /tmp/test/isolinux/boot.msg
(cd /tmp/test ; mkisofs -o /tmp/boot.iso -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . )
\cp /tmp/boot.iso /export/AS4/images/
rm -rf /tmp/test /tmp/boot.iso /tmp/x


ESX 2.1 :

unalias rm
unalias cp
unalias mv
mkdir /tmp/mnt{1,2,3}
mount -o loop,ro /export/ESX210/images/bootnet.img /tmp/mnt1
mount -o loop,ro /export/ESX210/images/drvnet.img /tmp/mnt2
zcat < /tmp/mnt1/initrd.img > /tmp/initrd.img
mount -o loop,rw /tmp/initrd.img /tmp/mnt3
cp -Rp /tmp/mnt3 /tmp/initrd.new
cd /tmp/initrd.new/modules
zcat < modules.cgz | cpio -ivd

mkdir /tmp/newmods
cd /tmp/newmods
zcat < /tmp/mnt2/modules.cgz | cpio -ivd

#### drvnet is wrong here. Contains 2.4.9-13BOOT directory
### cp 2*BOOT/*.o /tmp/initrd.new/modules/2*BOOT
cp *.o /tmp/initrd.new/modules/2*BOOT
cd /tmp/initrd.new/modules/2*BOOT
############# REMOVE UNNECESSARY MODULES HERE #############
rm -f 3c501.o 3c503.o 3c505.o 3c507.o 3c515.o
rm -f usb*.o hid.o
rm -f abyss.o ibmtr.o lanstreamer.o olympic.o plip.o tmspci.o
rm -f nfs.o sunrpc.o lockd.o
rm -f tulip*.o depca.o de4x5.o
rm -f de600.o de620.o dgrs.o dl2k.o natsemi.o
rm -f 82596.o ac3200.o acenic.o arlan.o at1700.o dmfe.o e2100.o epic100.o
rm -f es3210.o eth16i.o ewrk3.o hamachi.o hp.o hp-plus.o hp100.o lance.o
rm -f lne390.o ne3210.o ni5010.o ni52.o ni65.o ns83820.o sis900.o sk98lin.o
rm -f sundance.o sunhme.o tlan.o via-rhine.o wavelan.o wd.o winbond-840.o
rm -f yellowfin.o
rm -f parport*.o
rm -f cs89x0.o tms380tr.o

cat /tmp/mnt2/pcitable > /tmp/pcitable
cat /tmp/mnt3/modules/pcitable >> /tmp/pcitable
egrep -v '"3c90x"|"8139too"|"aic7xxx"|"bcm5700"|"e100"|"e1000"|"megaraid"|"ne2k-pci"|"pcnet32"' /tmp/pcitable | awk -F'\t' '{if (NF==4) {print $1 "\t" $2 "\t" "\"ignore\"" "\t" $4} else if (NF==6) {print $1 "\t" $2 "\t" $3 "\t" $4 "\t" "\"ignore\"" "\t" $6}}' > /tmp/pcitable.ignore
sort -u -o /tmp/pcitable.ignore /tmp/pcitable.ignore
egrep '"3c90x"|"8139too"|"aic7xxx"|"bcm5700"|"e100"|"e1000"|"megaraid"|"ne2k-pci"|"pcnet32"' /tmp/pcitable > /tmp/pcitable.keep
cat /tmp/pcitable.keep /tmp/pcitable.ignore > /tmp/mnt3/modules/pcitable
cat /tmp/mnt2/modules.dep >> /tmp/mnt3/modules/modules.dep
sort -u -o /tmp/mnt3/modules/modules.dep /tmp/mnt3/modules/modules.dep
cat /tmp/mnt2/modinfo >> /tmp/mnt3/modules/module-info
############# EDIT MODULE INFORMATION HERE #############
vi /tmp/mnt3/modules/module-info

cd /tmp/initrd.new/modules
find 2*BOOT/ -print | cpio -ov -H crc | gzip -c9 > /tmp/mnt3/modules/modules.cgz
cp /export/configs/ksesx210.cfg /tmp/mnt3/ks.cfg
sed 's/50000/10000/' < /export/configs/ksesx210.cfg > /tmp/mnt3/kssmall.cfg
cd /tmp
umount /tmp/mnt{1,2,3}
gzip -9 /tmp/initrd.img

dd if=/dev/zero of=/tmp/ESX210.img bs=18k count=80
mkfs.vfat /tmp/ESX210.img
syslinux /tmp/ESX210.img
mount -o rw,loop /tmp/ESX210.img /tmp/mnt1
cp /tmp/initrd.img.gz /tmp/mnt1/initrd.img
cp /export/configs/files/ESX210/* /tmp/mnt1
cd /tmp
umount /tmp/mnt1

rm -rf /tmp/newmods
rm -f /tmp/initrd.img.gz /tmp/initrd.img
rm -f /tmp/pcitable*
rmdir /tmp/mnt[123]
rm -rf /tmp/initrd.new

mv /tmp/ESX210.img /export/NAB/kickstart_images/
cd /tftpboot
make

Monday, January 19, 2009

20090119 - Oracle VM more thoughts

Not yet convinced about Xen. (Oracle VM).

No AD Integration for Usernames
No "BIOS" screen to configure boot orders
No Guest "Tools"
No Memory Page Sharing
No thinly provisioned disks
No performance stats
No Hot Migration tools
Realtek rather than Intel NIC driver
Doesn't "grab" the mouse pointer. Hence have two mouse pointers (not synchronous).
Only 1 person can connect to VNC at a time

What I do like about it is:

32-way VMs (even on a 8 way server!)

Also, PVMs have a few oddities:
No GRUB (even though there is a grub config file)
sttys rows doesn't work
dmidecode doesn't work
/dev/xvda device rather than /dev/hda


My First Para VM.

20090119 - Oracle VM initial view


Oracle VM seems like an OK Web based interface for creating and viewing VMs.
Shame the viewing mechanism is VNC.

Sunday, January 18, 2009

20090118 Fav Music

Maybe I'm just patriotic, but Edward Elgar is a fav:

Elgar - Nimrod (from "Enigma Variations")
Elgar - Pomp and Circumstance March no.1
Elgar - Pomp and Circumstance March no.4

and other English Hymns:

Jerusalem - (C. Hubert H. Parry)
I Vow to Thee, My Country (Cecil Spring-Rice) set to music by Gustav Holst (Jupiter)
Dear Lord and Father of Mankind (Hubert Parry)

Wednesday, January 14, 2009

20090114 Pete's Beer

Tasting Notes:

Stout:

Nicely Alcoholic (I'd say 5.5%?), slightly to medium carbonated. Slight chocolatey-coffee taste. Quite sharp and bitter with a clean palate feel. No sediment.

20090114 - Xen Vs. ESX



Graphically, and functionally ESX wins hands down:

20090114 - More patch / flar thoughts

What about existing flars that aleady contain the "entitled" patches? Do we have to stop using those flars?

What about creating a flar of one system to deploy to another system (say a prod to dev copy) - If the first system is under support, but the dev system isn't are we banned from using a flar which does/could contain "encumbered" patches.

20090114 - Sunsolve still broken

Sunsolve still broken.....


Dear Customer,

Username:XXXXXX
Sun Support Contract #:XXNNNNNXX

Based on the information provided, a valid Sun support contract was not found
in our records. Unfortunately, we are unable to provide you contract access
to
the SunSolve Online resources available to our Sun Support customers. You may
still access free SunSolve online resources. Any account privileges you have
with other Sun websites have remained unchanged.

If you feel this is in error, please contact your Sun Service Account
representative, Sun Sales Representative or Sun iForce partner. You may also
call the Sun Support Center. For a listing of the Sun Support Center in your
region, please go to http://www.sun.com/service/contacting/solution.html.

Regards,
Sunsolve Support Team

20090113 Sun Patch Policy

http://sunsolve.sun.com/search/document.do?assetkey=1-9-203648-1

What I believe it says is that only security patches are freely available now.
Recommended patches, Patch Clusters and plain maintenance patches are no longer available without a Sunsolve login that's tied to a support contract.

Does this mean that if you have:

Patch A (S) requires
Patch B (R+S) requires
Patch C (S) requires
Patch D (R)

That patch D is also retrievable without a contract?

eg for instance, the kernel jumbo patch (120011-14) (R+S) requires patch 120900-04 (notR/S). Currently 120900-04 is downloadable, but how do we know this from patchdiag.xref - there's no reference to it being a R or S patch at all.

I've seen dependencies that are 6-deep, and I hope that Sun has considered all the different combinations that could occur on a system. For instance, some patches are conditional, depending on which packages are also installed (Zones springs to mind). Otherwise this is going to be a complete mess.

If I, as a Sun spectrum customer, download non-S patches, and "slipstream" these into a flash archive (ie an existing flar which I unpack into a temp directory, and then use patchadd -R), is that flar then "encumbered" and not allowed to be deployed to build new systems that are not yet under support?

(This would be in the case where not all of our systems are covered under a Solaris Everywhere suport contract).

Does this mean that I would have to maintain two different flars - one which includes patches, and one which doesn't.

Similarly, What about automatic patching tools that you dump patches into, and those tools then search and apply patches to all the systems? Unless a patch is somehow signified as a non-distributable patch, I can't see how this could be differentiated.

20090113 xVM

xVM Products from Sun.

-> xVM Server -> Not yet available :-(
-> xVM Ops Center 2 -> Still not available. Been waiting for 5 months.

I'd like to evaluate either of these technologies, but apparently they're not ready yet.

Of course, that hasn't stopped the marketing department at Sun getting the webcasts, etc.

Vapourware perhaps - We'll see.

20090113 Lab Manager

I just love the way that you can create a VM template in Lab Manager with ESX hardware.

By sys-unconfig a Solaris x64 box, we should be able to have a template up and running in no time.
And because the linked deployments are Copy-on-Write (COW), Delta disk space is only required.

Unless of course you want the option of using de-duped back end storage.

I love the way that the whole provisioning process can take literally seconds.

20090113 Solaris Flash Archives

Yay!
It's possible to unpack a Sun flash archive (flar) on an Intel Box, and put Sun patches (sun4u) into it.

# flar split flarfile
# mkdir temp
# cd temp
# cpio -icudv < ../archive
# cd ..
# patchadd -R temp [patchnum]

Next stage - work out how to recombine the cpio archive and flar.