Tuesday, March 24, 2009

SLES 11 released

Good news for SLES fans. The next major release of the product was released today. Together with SLES 11 was released enterprise-ready desktop SLED 11. Other two new products were announced as well:
  • SUSE Linux Enterprise High Availability Extension - the products integrates clustering filesystem OCFS2, cluster-aware volume manger cLVM2, distributed replicated block device DRBD and Pacemaker Cluster Stack with OpenAIS messaging and member layer. Included DRBD version 8 supports active-active replication.
  • SUSE Linux Enterprise Mono Extension - the product provides open-source cross-platform .NET framework.
What other benefits does SLES 11 bring? As you could see above, it is more modular. Some features were bundled into separate products. The next follow:
  • it is based on GNU/Linux kernel 2.6.27
  • in addition to AppArmor, it is SELinux ready
  • it provides OFED 1.4 (more about it here)
  • package management is based on fast update stack ZYpp
  • SLES 11 is greener - it supports tickless idle which is able to leave CPU in saving stake longer or it provides more granular power profiles
  • it supports swapping over NFS for diskless clients
  • it supports partitioning multiprocessor machine by CPUset System
  • virtualization layer is based on Xen 3.3
  • it is optimised for hypervisors VMware ESX, MS Hyper-V and Xen
  • default filesystem is EXT3
  • it supports kexec, kdump or SystemTap
  • it contains many other enhancements of asynchronous I/O, MPIO, NFS or iSCSI
The official product documentation isn't available yet. The release notes are here.

Quickly - SLES 10 reactivation

If you need to assign an already registered SLES 10 system to a new or different subscription the quickest way how to do it is to use suse_register command from console:
suse_register -i -f
The -f switch forces registration and -i runs registration interactively. The registration form will be available via lynx text web browser. Prepare your activation code and finish the registration.

Thursday, March 12, 2009

Running Linux kexec

The generic form of kexec command looks like
kexec -l kernel_image --initrd=kernel_initrd --append=command_line_options
The command has available many other options but the presented ones are the most important. To start kernel reset, run
kexec -e
How does it work? Linux kernel is placed in memory at defined address offset. On x86 architecture, it begins at 0x100000. Kexec is capable to call and run another kernel in the context of current kernel. It copies the new kernel somewhere into memory, moves it into kernel dynamic memory and finally copies it to the final destination which is the offset and runs it - kernel is exchanged and the reset is performed. An example how to reset running SLES 10.x kernel follows
kversion=`uname -r`
kexec -l /boot/vmlinuz-$kversion --initrd=/boot/initrd-$kversion --append="`cat /proc/cmdline`"
kexec -e
The example for RHEL 5.x is slightly different:
kexec -l /boot/vmlinuz-$kversion --initrd=/boot/initrd-${kversion}.img --append="`cat /proc/cmdline`"

Does it have any drawbacks? As I said, there may be some buggy devices which won't work after kernel reset. Typically, there are troubles with VGAs and their video memory initialization which results in garbled console after reset. The recommendation is to use normal video mode for console. You can change it with vga parameter set to zero and passed as kernel options (e.g. SLES 10 uses video framebuffer by default)
vga=0
Next, the earlier version of kexec had stability issues on any other platform than x86. Today, kexec is uspported on x86, x86_64, ppc64 or ia64.

Tuesday, March 10, 2009

Fast linux reboot with kexec

Kexec is a GNU/Linux kernel feature which allows to perform kernel reboots faster. The time savings around a few minutes are the result of not performing BIOS procedures and hardware reinitialization (each hardware part - like SCSI/FC HBAs - may have own BIOS and POST which takes some amount of time to finish). As we have cold or warm reset we can newly say we have kernel reset.

The GNU/Linux boot process consists of several stages. The hardware stage, firmware stage and bootloader stage are kernel independent and are run in defined order. The hardware stage performs basic hardware tasks such device initialization and testing it. The firmware stage known on PCs as BIOS is in charge of hardware detection. The bootloader can be split into two parts. The first-level bootloader is like master boot record on PCs which calls second-level bootloader which is able to boot Linux kernel. The final stage is kernel stage.

Kexec is smart thing. It can bypass all listed stages up to kernel stage. That means it is able to bypass all the things connected with hardware and jump to the kernel stage directly. The risk is a likely unreliability of untouched devices, typically VGAs or some buggy cards.

What about requirements to try it? The kernel has to be kexec-capable plus you have to have installed kexec tools. It is not problem in today's Linux distributions. Both RHEL 5.x and SLES 10.x contains kexec-tools package which you have to install. Their production kernels are capable of doing kernel resets. On SLES 10, you can check the running kernel configuration for CONFIG_KEXEC variable.
zgrep CONFIG_KEXEC /proc/config.gz


Kexec is controlled with command line program kexec. The command takes defined values for kernel to be booted, its initrd and kernel parameters and starts the kernel reset.

Friday, March 6, 2009

VMware ESX 4.0 aka vSphere 4.0 platform

The next major release of VMware ESX platform is being prepared. The platform newly called as vSphere 4.0 is going to be based on six stones which provide:
  1. vCompute - virtualization layer, hypervisor, live migration
  2. vStorage - storage management, replication
  3. vNetwork - network management, distributed switch, Cisco Nexus switch
  4. Availability - clustering, data protection
  5. Security - VMsafe APIs, vShield Zones
  6. Scalability - dynamic resource management, distributed power management
Furthermore, the new platform will support virtual machines with 8 virtual CPUs and 256 GB of virtual memory.

The second most important part of virtual environment is centralized management. Today, we know it as VMware VirtualCenter Server. In the future, it should be called vCenter Suite. The good news, it will be available for Linux servers as well so no more Windows licenses are required.

Thursday, March 5, 2009

XenServer 5 license key

As you know, XenServer Enterprise Edition was realased for free. The license key for enterprise features and installation media are available from the download page. The new free XenServer will be released at March 25. The provided license provides high availability and StorageLink features from incoming Citrix Essentials for XenServer as well. The update to new version will be possible.

Wednesday, March 4, 2009

VCB, vcbMounter, vcbRestore ... updated

I have added another article dedicated to VMware VCB and backups over Samba or Windows shares. Here is updated list of them:
  1. VM identification - how to identify a virtual machine you intend to backup? The command vcbvmname is the answer.
  2. VM full backup - how to perform a full backup of the chosen virtual machine? The vcbmounter command can do it.
  3. VM full backup data access - how to retrieve data from the virtual machine's full backup? It is possible to mount the backup image with the mountvm command.
  4. VM file level backup - the vcbmounter command is able to perform file-level backup as well.
  5. VM backup over NFS - this article describes a simple scenario of virtual machine backup over NFS protocol.
  6. VM backup restore - it is important to know the process of restoring a virtual machine from the backup. You can use vcbrestore.
  7. VM backup with Samba or Windows share - the other approach how to perform backups of virtual machines is to use Samba or Windows shares instead of NFS server.

Friday, February 27, 2009

VCB basic usage - VM full backup with Samba

In the previous article about VMware VCB, I wrote about full backups to NFS shares. For completeness, I decided to write another one dedicated to backups to Samba or Windows shares.

The idea of backup is the same. Let's have a Samba server available at IP address 192.168.1.1. The exported directory for backups is backup-smb and the user which has write access to this share is backup.

Before we will be able to continue we need to allow smbclient to access Samba server. You can perform it from VI client or directly from ESX service console via esxcfg-firewall command. First, let's check if smbclient is allowed:
esxcfg-firewall -q smbClient
The output of command should be by default:
Service smbClient is blocked.
To reconfigure ESX firewall to allow smbclient access use the next command:
esxcfg-firewall -e smbClient
Now, you should be able to browse the server (the command asks for user's password first):
 smbclient  -L 192.168.1.1 -U backup
The example command output follows (Samba server on SLES10):
Domain=[NAS] OS=[Unix] Server=[Samba 3.0.28-0.2-1625-SUSE-CODE10]
Sharename       Type      Comment
--------- ---- -------
profiles Disk Network Profiles Service
backup-smb Disk
IPC$ IPC IPC Service (Samba 3.0.28-0.2-1625-SUSE-CODE10)
Domain=[NAS] OS=[Unix] Server=[Samba 3.0.28-0.2-1625-SUSE-CODE10]
Now, we are ready to create a simple backup script:
#!/bin/sh

BACKUP_SERVER="192.168.1.1"
BACKUP_USER="backup"
BACKUP_PASS="backup"
SMB_SHARE="backup-smb"
MOUNT_DIR="/backup"

[ -d $MOUNT_DIR ] || mkdir -p "$MOUNT_DIR" || exit 1

VM_BACKUP="`vcbVmName -s any: | grep name: | cut -d':' -f2`"

if [ ! -z "$VM_BACKUP" ]; then
smbmount //${BACKUP_SERVER}/$SMB_SHARE $MOUNT_DIR \
-o username=${BACKUP_USER},password=$BACKUP_PASS || exit 1

for VM in $VM_BACKUP; do
vcbMounter -a name:$VM -r $MOUNT_DIR/$VM
done

umount $MOUNT_DIR
fi

exit 0
It is simple, isn't it? The code is almost the same as for backups over NFS. We added variables defining our Samba user and his password. The mount command was exchanged with smbmount which is CLI Samba client. If you insist on using the mount command replace the line mounting the backup-smb share with line:
mount -t smbfs //${BACKUP_SERVER}/$SMB_SHARE $MOUNT_DIR \
-o username=${BACKUP_USER},password=$BACKUP_PASS || exit 1
That's all. In such simple backup scenarios I prefer NFS usage because it is simple to set and provides higher throughput than SMB protocol. On the other hand, SMB protocol provides basic authentication mechanism (if you don't disable it).

Monday, February 23, 2009

XenServer is free

It's unbelievable! Citrix decided to release their XEN based hypervisor and complete virtualization solution named XenServer for free a few hours ago (official announcement is here). The product was available in three editions until recently - Express, Standard, Enterprise and Platinum. The differences are outlined in the following table:

The Express edition was free of charge so far but it was missing some fundamental enterprise features like resource pools, live migration or central management console XenCenter. These features are paid. Or better, they were paid.

From now, we have only one edition of XenServer including features of enterprise edition. Everything is free and you can download it. Cool! You don't have to spend any money on virtual machines live migration, resource pools or central management stuff. What happens if we compare it with VMware ESXi? In my opinion, it seems the king might be dead. And the new king might be coming.

What do you think of it? What will be the answer from VMware? I think it is smart way how to show us that XEN based hypervisors are enterprise ready and how to spread it more. In connection with current economical situation they have the real chance to success.

Let me have final question. Who will need Microsoft Hyper-V now? If XenServer is free and because it is more mature and robust than Hyper-V what will be its new position? Today, the winner is Citrix. Tomorrow, the oponents might surprise us. But don't miss the opportunity today. Download XenServer and spread it!

Wednesday, February 18, 2009

VMware vCenter Converter 4.0 was released

The previous version of Converter was at 3.0.3 for a long time. The new standalone version is much similar to the one included in Virtual Infrastructure 3.5 (VI 3.5).

Before it, there were available two editions - Starter and Enterprise where the second one is part of VI 3.5. Here are the additional features of Enterprise edition compared to Starter:
  • it supports multiple migration jobs
  • it supports cold migration
  • it is part of VI3.5 only (particularly VirtualCenter server)
What new brings us latest revision? It is free of charge, it has larger set of supported operating systems as source or it allows you to select the target virtual disks. Newly, it can migrate sources with RedHat, SUSE or UBUNTU Linux. Furthermore, it is able to power off the source after migration finishes. The more comprehensive comparison of the version 4.0 and the version included in VI3.5 is presented by this picture.