Install Fedora 9 x64-86 from DVD and do disk Benchmarks
This entry is part of HW for Virtualization
This entry is part of HW for Virtualization
I will use a Fedora 9 LiveCD as HW diagnostic CD, because most of you will me more familiar with Linux then with OpenSolaris.
This entry is part of HW for Virtualization
After upgrade of my home PC to AMD quad-core Phenom I got left some relatively powerful hardware:
Asus M2NPV-VM mATX motherboard with 2GB orf667Mhz DDRII and Dual Core Athlon X2 5400+ 65W
Normally I am selling old parts, but now I was wonder if I can build cheap OpenSolaris ZFS based file server from it.
This entry is part of HW for Virtualization
Main page of my experience with HW for Virtualization
Main Motivations
Todays Virtualization Technologies Sprawl
Project HW Requirements
Budget Constrains = Virtualization Workstation for $1000 each
Intel Second Generation Quad Core Workstation – Core i7
Real Intel Core i7 + Nvidia HW Configuration
Real Intel Core i7 + Nvidia HW Photos
Getting Intel Core i7 Devices PCI IDs (Linux and OpenSolaris)
AMD Second Generation Quad Core Workstation – Phenom II
Real AMD Phenom II + ATI HW Configuration
Real AMD Phenom II + ATI HW Photos
Getting AMD Phenom II Devices PCI IDs (Linux and OpenSolaris)
Common OS Quad-Boot setup (4 Installed OSes)
4 Recommended OSes
OS Quad-Boot Layout
Important:BIOS setup reparation before OSes install
Use proprietary graphic drivers
Set up 2 users ROOT and VIRTU
Additional Storage drivers
Static network setup
HW Performance Tuning and HW Virtualization Stability
Final HW Virtualization Support and Stability
VMware Workstation 6.5.2
Sun xVM VirtualBox 3.0.12
Intel Core i7 Tuning
AMD Phenom II Tuning
Backup and Restore OS Setup
Format Backup Storage
Initial OS backups with DD
Select OS Backup / Restore Solution
Backuping OSes with FS archiver
“Do it faster, Do it cheaper, Do it better!”
Project Manager
Upcoming into X86 world full HW supported virtualization will significantly change development process for Client/Server based solutions because will allow developers to fully emulate this environment on their workstations.
For OpenSolaris Virtual Image and Virtual Appliances creation process most important is , if we can load VMDK file created on VirtualBox into VMware Workstation in ESX server family products.
For example for Devel, QA and LAB services can be important to make direct VMDK disk migration without to go throw painful OVF virtual disk compression/decompression.
This entry is part of Mastering Sun VirtualBox Workshop
One time my child was sick I need to work from home for longer time, unfortunately I was in this time assigned to project required a IPS repository access.
My network a home is not enough stable to use IPS remote mirror, so I as workaround use this script to create:
I think you can find this approach and script helpful in home Virtual Appliances prototyping.
This entry is part of Virtual Appliances & OVF Workshop
Main page for our expertize about Virtual Appliances & OVF
Here I try to present some practical information from Virtual Appliances creation processes used during this related projects:
Virtual Appliances
My colleague, Gabor create a series of blog entries about high level 7 steps Virtual Templates creation process:

I start working on small real sample of Virtual Appliance / VM template creation using 7 steps process:
Preparation: Create basic Glassfish V3 VM Template outline
1. Learn more about VM Templates creation process
2. Plan carefully VM Template content and audience
3. Check if all panned to use products are FOSS based
Step 1: Create OS Instance
General Information – JeOS Prototype OpenSolaris project
Step 1a: Create an OpenSolaris 20906 JeOS Prototype instance
Step 1b: Start JeOS VM instance and check readiness as user root
Step 1c: Create a non-root but fully privileged user
Step 2: Add layered software
Step 2a: Bundled vs UnBundled SW installation
Step 2b: Using UnBundled SW Installation for our DEMO
Step 2c: OpenSolaris is dual arch (32bit and 64bit) environment
Step 2d: Creating a dedicated ZFS fs for UnBundled installation
Step 2e: Install and Configure Glassfish V3 (Community Edition)
Step 2f: Install and configure MySQL (WebStack)
Step 2g: Install Java EE 6 Pet Catalog sample from NetBeans 6.8 IDE (Video)
Step 3: Add internals
Step 3a: Add auto starting of layered components
Step 3b: Adding welcome WEB page
Step 3c: Licenses audit
Final check for usage size after ALL SW installation
Step 4: Clean-up the template
Step 4a: Motivations for Clean-up
Step 4b: Clear layered app SW
Step 4c: Clean OS and default user OSOL data
Step 4d: Important: Time to make a backup now
Step 4e: Shrink installed system disk with ZFS Streaming
First I will optimize disk with local ZFS SEND/RECEIVE streaming
Second I will optimize disk with NFS based ZFS SEND/RECEIVE streaming
Step 5: Finalize the template
Step 5a: Finalize template outline
Step 6: Clean and Convert VM
Step 6a: Clean VMware – our primary development platform
Step 6b: Generate VirtualBOX 3.x OVF format
Step 6: Clean and Convert VM
Step 6c: Generate VirtualBOX 3.x VDI IDE format
Convert VMDK SCSI to VDI IDE format with VirtualBox
Configure VirtualBox for VDI IDE
Reconfigure HW with VA Live-CD in VirtualBox?for VDI IDE
Step 6d: Generate Parallels format
Open in Parallels JeOS image and recreate OS disk
Restore from ZFS stream from VA Live-CD
Add Freeware NI network driver
Step 6e: Generate xVM/XEN compatible PARA and HVM RAW disk formats
Step 7: Pack and Publish Images
Step 7a: Pack each Image with compression tool
Step 7b: Generate a checksum for each archive
Step 7d: Create a Download page with helper instructions
Download: Glassfish V3 Pet Catalog sample DEMO in VM Template
Some interesting related to Virtual Alliances / VM Tempaltes links
This entry is based on customer escalation, I hope it will help or at least inspire you in some extend too.
This entry is part of ‘OpenSolaris on Amazon EC2′ workshop
This entry is part of ‘OpenSolaris on Amazon EC2′ workshop
We will create a MySQL 5.1 and Glassfish 2.1 developer profile bundle, we will run both applications as non-root user for higher security.
This time I will like to use as much as possible (re)configuration from Glassfish CLI management instead of direct editing Glassfish XML configuration files.
This entry is part of ‘OpenSolaris on Amazon EC2′ workshop
Amazon AWS is designed for OS configurations, where instance admin login into instance as ROOT with SSH key, ROOT user don’t have password (is locked), so we can’t ‘sudo’ to it. This is imposing some limitations in non-root SW install when some tasks need to be done directly as root user due to known limitations of pfexec command.
From past Glassfish on Solaris Amazon EC2 user feedback, most users are skilled developers who want to use AMI instances to porting their JAVA apps to Glassfish and/or EC2 Solaris platform. So in this Glassfish 2.1 AMI image we will focus on reasonable secure developer oriented installation in Cloud environment.
Use pre-created AMI with MySQL 5.1 AMI-752CCB1C
zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT rpool/ROOT/opensolaris@install 140M - 2.65G -
zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 4.07G 5.53G 72K /rpool rpool/ROOT 3.21G 5.53G 18K legacy rpool/ROOT/opensolaris 3.21G 5.53G 3.07G / rpool/dump 293M 5.53G 293M - rpool/export 56K 5.53G 19K /export rpool/export/home 37K 5.53G 37K /export/home rpool/swap 586M 6.10G 16K - root@jsc-xen-14:~# zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT rpool/ROOT/opensolaris@install 140M - 2.65G -
zfs destroy rpool/ROOT/opensolaris@install
zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 3.93G 5.66G 72K /rpool rpool/ROOT 3.07G 5.66G 18K legacy rpool/ROOT/opensolaris 3.07G 5.66G 3.07G / rpool/dump 293M 5.66G 293M - rpool/export 56K 5.66G 19K /export rpool/export/home 37K 5.66G 37K /export/home rpool/swap 586M 6.24G 16K -
1. Check if image is cleaned
du -s -h /var/pkg/download/ 34M /var/pkg/download/ du -s -h /var/pkg/index/ 36M /var/pkg/index/
2. Check if PKG IPS is set up to auto clean cache
No, set it
pkg property -H flush-content-cache-on-success flush-content-cache-on-success False pkg set-property flush-content-cache-on-success True
pkg install SUNWj6dev
pkg install SUNWant
1. We will use AMI with MySQL 5.1, until this version will be in official OpenSolaris REPO
Use pre-created AMI with MySQL 5.1 AMI-752ccb1c
2. Install Mysql Connector/J 5.1
Note: We will use version 5.1 from official OpenSolaris REPO
pkg install SUNWmysql5jdbc
GlassFish Project – v2.1 FinalBuild
The Open Sourcing Clustering features are included in this promotion.
Create non-root runtime user (account locked by default)
groupadd gf21 useradd -d /export/home/gf21 -m -s /usr/bin/bash -g gf21 gf21
Note: User will don’t have enough privileges to start/stop GF service, I consider to add to it profile , see separate section for it
1. Install glassfish 2.1
mkdir /opt/gf21; chown gf21:gf21 /opt/gf21 su - gf21 cd /opt/gf21 wget http://java.net/download/javaee5/v2.1_branch/promoted/SunOS_X86/glassfish-installer-v2.1-b60e-sunos_x86.jar java -Xmx256m -jar glassfish-installer-v2.1-b60e-sunos_x86.jar Accept license with "A" Installation will by unpacked in ./glassfish
2. Configure glassfish 2.1 (Create domain1)
cd /opt/gf21/glassfish chmod -R +x lib/ant/bin lib/ant/bin/ant -f setup.xml create.domain: [exec] Using port 4848 for Admin. [exec] Using port 8080 for HTTP Instance. [exec] Using port 7676 for JMS. [exec] Using port 3700 for IIOP. [exec] Using port 8181 for HTTP_SSL. [exec] Using default port 3820 for IIOP_SSL. [exec] Using default port 3920 for IIOP_MUTUALAUTH. [exec] Using default port 8686 for JMX_ADMIN. [exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file. [exec] ------ Using Profile [developer] to create the domain ------ .... [exec] Security Store uses: JKS [exec] Domain domain1 created. [exec] Login information relevant to admin user name [admin] for this domain [domain1] stored at [/export/home/gf21/.asadminpass] successfully.
3. Backup original domain1 configuration
cp /opt/gf21/glassfish/domains/domain1/config/domain.xml /opt/gf21/glassfish/domains/domain1/config/domain.xml.org
4. Put glassfish tools into path
echo export PATH=$PATH:/opt/gf21/glassfish/bin >>~/.profile exit su - gf21
5) Create minimal Glassfish SMF script for automatic start / stop
How to Create a Service Management Facility (SMF) Manifest
cat >/opt/gf21/smf-glassfish.xml <<EOF <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type='manifest' name='glassfish:domain1'> <service name='application/glassfish/domain1' type='service' version='1'> <create_default_instance enabled='true' /> <single_instance /> <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/filesystem/local' /> </dependency> <dependency name='network-service' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/network/service' /> </dependency> <method_context> <method_credential user='gf21' group='gf21' /> </method_context> <exec_method type='method' name='start' exec='/opt/gf21/glassfish/bin/asadmin start-domain domain1' timeout_seconds='600' /> <exec_method type='method' name='stop' exec='/opt/gf21/glassfish/bin/asadmin stop-domain domain1' timeout_seconds='600' /> <property_group name='startd' type='framework'> <propval name='duration' type='astring' value='transient' /> </property_group> <stability value='Unstable' /> <template> <common_name> <loctext xml:lang='C'>Glassfish V2.1 Simple non-root user SMF</loctext> </common_name> </template> </service> </service_bundle> EOF
6. Load SMF this XML definition and start service
Execute as root, pfexec as gf21 fail on these ? exit whoami root /usr/sbin/svccfg validate /opt/gf21/smf-glassfish.xml /usr/sbin/svccfg import /opt/gf21/smf-glassfish.xml /usr/sbin/svcadm enable svc:/application/glassfish/domain1:default svcs /application/glassfish/domain1 STATE STIME FMRI online* 12:50:01 svc:/application/glassfish/domain1:default Wait after is service is online svcs /application/glassfish/domain1 online 12:05:29 svc:/application/glassfish/domain1:default
7. Add line to create authorization into auth_attr
Good Article: Less known Solaris features: RBAC and Privileges
Part 1: Introduction
Part 2: Role based access control
Part 3: Privileges
as root echo "solaris.smf.manage.glassfish/domain1:::Glassfish Domain1 Server management::" >> /etc/security/auth_attr
8. Add service authorization to user gf21
usermod -A solaris.smf.manage.glassfish/domain1 gf21
9. Add authorization to restart and manage service
svccfg -s glassfish/domain1 setprop general/action_authorization=astring: 'solaris.smf.manage.glassfish/domain1' svccfg -s glassfish/domain1 setprop general/value_authorization=astring: 'solaris.smf.manage.glassfish/domain1' svcadm refresf glassfish/domain1
10. Secure default instance domain1 admin interface by using SSL and localhost
su - gf21 asadmin get server.http-service.http-listener.admin-listener.address server.http-service.http-listener.admin-listener.address = 0.0.0.0 asadmin set server.http-service.http-listener.admin-listener.address=127.0.0.1 asadmin get server.http-service.http-listener.admin-listener.security-enabled server.http-service.http-listener.admin-listener.security-enabled = false asadmin set server.http-service.http-listener.admin-listener.security-enabled=true
11. Optional: Tuning Glassfish configuration for Amazon EC2 c1.small
Tune JVM HEAP memory in /opt/glassfish/domains/domain1/config/domain.xml,
Amazon AWS m1.small which have 1700MB RAM, so for Solaris for JeOS we can put there 1024MB
(But we need to keep in mind also memory needs of MySQL and ZFS ARCH chache ?)
Chane Java Heap memory from 512M to 1024M
asadmin create-jvm-options -- "-Xmx1024m" cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx <jvm-options>-Xmx512m</jvm-options> <jvm-options>-Xmx1024m</jvm-options> asadmin delete-jvm-options -- -Xmx512m cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx <jvm-options>-Xmx1024m</jvm-options>
Note: c1.small have only one CPU, do we need optimize threads , need to be investigated together with MySQL setup needs
12. Restart glassfish SMF service
Execute as root, pfexec as gf21 fail on these ? Most work NOW ! exit whoami root /usr/sbin/svcadm disable -t svc:/application/glassfish/domain1:default /usr/sbin/svcadm enable svc:/application/glassfish/domain1:default svcs /application/glassfish/domain1 STATE STIME FMRI online* 12:50:01 svc:/application/glassfish/domain1:default svcs /application/glassfish/domain1 online 12:05:29 svc:/application/glassfish/domain1:default
13. Check running GF2.2 running instance under gf21:gf21 (Still under root)
ps -ef |grep gf21 gf21 16270 1 0 08:20:29 ? 0:42 /usr/jdk/instances/jdk1.6.0/jre/../bin/java -Dcom.sun.aas.instanceRoot=/opt/gf2 svcs glassfish/domain1 STATE STIME FMRI online 8:21:12 svc:/application/glassfish/domain1:default svcs -l glassfish/domain1 | grep logfile lofile /var/svc/log/application-glassfish-domain1:default.log tail /var/svc/log/application-glassfish-domain1:default.log Domain listens on at least following ports for connections: [8080 8181 4848 3700 3820 3920 8686 ]. Domain does not support application server clusters and other standalone instances. netstat -an | egrep "8080|8181|4848|3700|3820|3920|8686" *.3700 *.* 0 0 49152 0 LISTEN *.3820 *.* 0 0 49152 0 LISTEN *.3920 *.* 0 0 49152 0 LISTEN *.8686 *.* 0 0 49152 0 LISTEN *.8080 *.* 0 0 49152 0 LISTEN *.8181 *.* 0 0 49152 0 LISTEN 127.0.0.1.4848 *.* 0 0 49152 0 LISTEN *.3700 *.* 0 0 49152 0 LISTEN *.3820 *.* 0 0 49152 0 LISTEN *.3920 *.* 0 0 49152 0 LISTEN *.8686 *.* 0 0 49152 0 LISTEN *.8080 *.* 0 0 49152 0 LISTEN *.8181 *.* 0 0 49152 0 LISTEN
As part of OVF support in new VirtualBox I participate on interesting behind the scene HW compatibility improvement, one of such thinks is improved HW compatibility with VMware ESX and VMware Workstation 5.x+ESX HW profiles.
This entry is part of Mastering Sun VirtualBox Workshop
Once I don’t have space on my notebook, so I try iSCSI support in non commercial version of VirtualBox. I connect my workstation and notebook with 1gbit Ethernet Crosovr cable and I use OpenSolaris on my workstation as iSCSI server and VirtualBox in Windows consume it as iSCSI client. It works quite well , it was stable and speedy.
This entry is part of Mastering Sun VirtualBox Workshop
This entry is part of Mastering Sun VirtualBox Workshop
h3 id=”a2.CreateVirtualBoxVMdefinitionbasedonVMwareVMdefinition”>2. Create VirtualBox VM definition based on VMware VM definition
This entry is part of Mastering Sun xVM VirtualBox Workshop
Theme: Shocking Blue Green. Blog at WordPress.com.