Friday, November 25, 2011

XenServer Virtual Lab (Part 1) : Introduction

This is a first part of a series of posts here where I will create a Virtual Lab for a XenServer 5.6.
The only purpose of this exercise is to summarize, consolidate and practice the knowledge and skills. Nothing else. It is just a scratch book, a diary. Do not attempt to use it as a guide to build a production solution. It will not work ;)

What we will need:
- Linux box (I use Fedora 16) with KVM installed
- Linux (I will use RHEL6) VM for NFS, iSCSI target, NTP server
   [RAM 512MB, DISKS: 4GB(OS) + 20GB(XEN-LUN) + 20GB(XEN-NFS)]
- Windows 2008 R2 for XenCenter, License Server, AD, DNS, DHCP
   [RAM 512MB, DISKS: 20GB(OS)]
- 2x XenServer VMs
   [RAM 1024GB, DISKS: 16GB(OS)+10GB(VM)]

You can give your virtual machines more resources of course if you have. I have a limited RAM for instance in my system, so unfortunately I cannot use more and the performance plays no role here as this lab will be deleted in few days anyway, so that is why I used so low resources for my VMs.

So, what is the plan:
- Configure required virtual networks on KVM
- Install RHEL6 VM
- Configure NTP
- Install Windows 2008 VM
- Configure AD, DNS, DHCP
- Install XenCenter and License Server
- Install XenServer VMs
- Add XenServer VMs to XenCenter
- ...

I will try to use mostly screenshots as I believe picture tells much more that hundreds of words. This will be a work in progress, so expect that there will be changes in those post as I move further with my exercise.
ISO images can be downloaded from Citrix.com. For Linux VMs you can use a distribution of your choice as long as it contains packages for iSCSI target. For a Windows VM you can use a trial version which can be downloaded from http://www.microsoft.com/en-us/server-cloud/windows-server/2008-r2-trial.aspx

:: XenServer Virtual Lab (Part 1) : Introduction
:: XenServer Virtual Lab (Part 2) : KVM Virtual Networks

Friday, November 18, 2011

Fedora 16 : LCD screen backlight brightness on Acer Aspire 5742 issue

Tonight I found a temporary solution on my Acer Aspire 5742 (thanks to GusCarracedo for
the clue) how to change a backlight brightness of my screen.
# ls -R /sys/class/backlight/
/sys/class/backlight/:
acpi_video0 intel_backlight

so...
# cat /sys/class/backlight/intel_backlight/brightness
976
<- This was an original value I found

# cat /sys/class/backlight/intel_backlight/max_brightness
976

# echo "400" > /sys/class/backlight/intel_backlight/brightness
...works perfectly fine, as a temporary solution of course.

Changing acpi_video0/brightness had no effect.

Please check this out as well:
https://launchpad.net/~kamalmostafa/+archive/linux-kamal-mjgbacklight
It is for i915 chip (found also in Aspire 5742).
I have intel_backlight interface, but it looks gnome-power-manager is not updated, so I am investigating this now.

I hope this will help Fedora developers to fix this issue permanently once and
for all.



---------------------------------------------------
Dmitriy Kalmykov suggested how to fix the issue (bug 753012and it seems to work also on my Acer Aspire 5742, so I would say it is worth to try and big thanks to Dmitriy :)

Open '/boot/grub2/grub.cfg' for editing.
Ignore the line '# DO NOT EDIT THIS FILE'.
Find the proper bootline which boots your kernel and add
'acpi_backlight=vendor' parameter in kernel options.

The part of my '/boot/grub2/grub.cfg' edited looks like that:

menuentry 'Fedora (3.1.1-2.fc16.x86_64)' --class fedora --class gnu-linux
--class gnu --class os {
 load_video
 set gfxpayload=keep
 insmod gzio
 insmod part_msdos
 insmod ext2
 set root='(hd0,msdos1)'
 search --no-floppy --fs-uuid --set=root 8cb738a0-95f4-4fe7-9c42-7d95aa3cc8da
 echo 'Loading Fedora (3.1.1-2.fc16.x86_64)'
 linux /vmlinuz-3.1.1-2.fc16.x86_64
root=UUID=76b94cf5-3dad-4b63-899e-2c99849fdde3 ro LANG=ru_RU.UTF-8 rd.md=0
rd.lvm=0 rd.dm=0 quiet rhgb rd.luks=0  KEYTABLE=us acpi_backlight=vendor
 echo 'Loading initial ramdisk ...'
 initrd /initramfs-3.1.1-2.fc16.x86_64.img
}

Wednesday, November 16, 2011

Fedora 16 : Wireless not working after update to 3.1.1-1.fc16.x86_64 kernel on Acer Aspire 5742 Wireless Broadcom BCM43225 802.11b/g/n

After updating my laptop using yum (as usual) from 3.1.0-7.fc16.x86_64 to 3.1.1-1.fc16.x86_64, I noticed that my wireless network card works fine and is connected, but my wi-fi antenna LED is off. When I pressed Fn+F3, which is a shortcut on my Aspire 5742 to turn the antenna off and on, which normally would turn the LED on and off as well, I lost my wireless connection. First I thought, that maybe wl.ko did not updated properly or failed to load, but I found that the module is loaded and can be found in an expected location: /lib/modules/3.1.1-1.fc16.x86_64/extra/wl/wl.ko.

I checked all the loaded modules and found that now I have loaded "Broadcom Brothers" along with wl ;)

[root@aspire ~]# lsmod | grep brc
brcmsmac              497715  0 
mac80211              251806  1 brcmsmac
brcmutil                4513  1 brcmsmac
cfg80211              151125  2 brcmsmac,mac80211
crc8                    1356  1 brcmsmac
cordic                  1150  1 brcmsmac

[gescape@aspire ~]$ modinfo brcmsmac
filename:       /lib/modules/3.1.1-1.fc16.x86_64/kernel/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
license:        Dual BSD/GPL
description:    Broadcom 802.11n wireless LAN driver.
author:         Broadcom Corporation

[gescape@aspire ~]$ rpm -qf /lib/modules/3.1.1-1.fc16.x86_64/kernel/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
kernel-3.1.1-1.fc16.x86_64
[gescape@aspire ~]$ rpm -qf /lib/modules/3.1.1-1.fc16.x86_64/extra/wl/wl.ko
kmod-wl-3.1.1-1.fc16.x86_64-5.100.82.112-1.fc16.1.x86_64
[gescape@aspire ~]$ yum info kmod-wl-3.1.1-1.fc16.x86_64-5.100.82.112-1.fc16.1.x86_64
Installed Packages
Name        : kmod-wl-3.1.1-1.fc16.x86_64
Arch        : x86_64
Version     : 5.100.82.112
Release     : 1.fc16.1
Size        : 3.0 M
Repo        : installed
From repo   : rpmfusion-nonfree-updates
Summary     : wl kernel module(s) for 3.1.1-1.fc16.x86_64
URL         : http://www.broadcom.com/support/802.11/linux_sta.php
License     : Redistributable, no modification permitted
Description : This package provides the wl kernel modules built for the Linux
            : kernel 3.1.1-1.fc16.x86_64 for the x86_64 family of processors.


I removed the Broadcom modules from kernel package and reloaded wl from RPM Fusion...

[root@aspire ~]# rmmod brcmsmac
[root@aspire ~]# rmmod wl
[root@aspire ~]# modprobe wl
[root@aspire ~]# lsmod | grep brc
brcmutil                4513  0 

...and then blacklisted Broadcom module:

[root@aspire modprobe.d]# cat broadcom-wl-blacklist.conf 
# modules blacklisted for broadcom-wl
blacklist ssb
blacklist bcma
blacklist b43
blacklist brcmsmac

Again my wireless is back to normal, working as expected,  Fn+F3 works fine and most importantly that lovely bright amber antenna LED indicator is on ;))) haha...

Dear Fedora Team!
It is historically known that with almost every update/upgrade something must be broken. If not wireless, then LCD brightness, if not brightness.... It is extremely annoying. It is understandable that there are bugs and the system is under constant development, but I believe that basic functions, modules and common hardware should work out of the box regardless of the phase of development and for sure in the final release of the system. These days end users expect working systems with wireless available at a finger tip and not spend evenings fixing the module issues after subsequent update. If you want us to provide you a feedback and log bugs, we need working networking. Unfortunately it looks to me like brcmsmac does not work as expected. However kmod-wl from RPMFusion works fine. Interesting...