::-webkit-scrollbar {
width: 42px;
}
::-webkit-scrollbar-track-piece {
background: #CCCCCC;
border: 2px solid #6666CC;
-webkit-border-radius: 10px;
width:20px;
}
::-webkit-scrollbar-thumb:vertical {
height: 40px;
border: 2px solid #6666CC;
background-color: #6666CC;
-webkit-border-radius: 10px;
}
::-webkit-scrollbar-button:end:increment {
height:42px;
width:42px;
background-image: url(arrow-down.png);
background-repeat:no-repeat;
background-color:white;
}
::-webkit-scrollbar-button:start:decrement
{
height:42px;
width:42px;
background-image: url(arrow-up.png);
background-repeat:no-repeat;
background-color:white;
}
::-webkit-scrollbar-button:end:increment:hover {
background-color:green;
}
::-webkit-scrollbar-button:start:decrement:hover
{
background-color:green;
}
:not(.none):not(.double-start)::-webkit-scrollbar-track-piece:vertical:end:single-button,
:not(.none):not(.double-start)::-webkit-scrollbar-track-piece:vertical:end:double-button,
.single::-webkit-scrollbar-track-piece:vertical:end,
.double-end::-webkit-scrollbar-track-piece:vertical:end,
.double-both::-webkit-scrollbar-track-piece:vertical:end
{
margin-bottom: 40px;
}
:not(.none):not(.double-end)::-webkit-scrollbar-track-piece:vertical:start:single-button,
:not(.none):not(.double-end)::-webkit-scrollbar-track-piece:vertical:start:double-button,
.single::-webkit-scrollbar-track-piece:vertical:start,
.double-start::-webkit-scrollbar-track-piece:vertical:start,
.double-both::-webkit-scrollbar-track-piece:vertical:start
{
margin-top: 40px;
}
Friday, March 26, 2010
Styling QWebKit scrollbars
Saturday, February 27, 2010
Three scripts for running VirtualBox in headless mode (Ubuntu)
Script 1 to start a virtualbox (vbox_start_vm)
Starts and sleeps x number of seconds, but doesn't start it if it's already running!
#!/bin/bash
if [ -z $1 ] ; then
echo "SERVER Name is Missing... the number is 42."
echo "usage vbox_single_start "
exit 1
fi
if /usr/bin/VBoxManage -q showvminfo $1 | grep -i running ; then
echo VM Guest $1 is already powered on!
exit 1
else
echo Starting $1
/usr/bin/VBoxManage startvm $1 --type vrdp
if [ $2 ] ; then
sleep $2
fi
fi
exit 0
#!/bin/bash
MAX_WAIT_TIME=300 # max seconds to wait before doing poweroff (force)
function wait_until_machine_shutdown_else_terminate {
if /usr/bin/VBoxManage -q list runningvms | grep -i $1 ; then
#echo "sleeping 10 seconds"
sleep 10
let MAX_WAIT_TIME=MAX_WAIT_TIME-10
if [ $MAX_WAIT_TIME -lt 0 ] ; then
echo "Had to force the power on the server... Sorry about that!"
/usr/bin/VBoxManage controlvm $1 poweroff
sleep 10
else
if [ $MAX_WAIT_TIME -lt 200 ] ; then
#try to do another acpipowerbutton
/usr/bin/VBoxManage controlvm $1 acpipowerbutton
fi
wait_until_machine_shutdown_else_terminate $1
fi
fi
}
#ensure that the server name is entered
if [ -z $1 ] ; then
echo "SERVER Name is Missing... the number is 42."
echo "usage vbox_stop_vm "
exit 1
fi
if /usr/bin/VBoxManage -q showvminfo $1 | grep -i running ; then
echo VM Guest $1 is powered on! Will send ACPI shutdown.
/usr/bin/VBoxManage controlvm $1 acpipowerbutton
# if parameter for sleep is provided, do here
if [ $2 ] ; then
sleep $2
fi
# wait until it's been shutdown!
wait_until_machine_shutdown_else_terminate $1
else
echo Server $1 is not running!
exit 1
fi
exit 0
#! /bin/sh
# some errors with networking, so need to restart at end of init sequence
#NOT NEEDED BRIDGE WORKS?!?!?!?!
case "$1" in
start)
echo -n "Starting all the VirtualBox VMS"
/etc/init.d/vbox_start_vm "Windows2008_DC" 60
/etc/init.d/vbox_start_vm "Windows2008_Test" 60
/etc/init.d/vbox_start_vm "Ubuntu_Web_Server" 15
/etc/init.d/vbox_start_vm "Ubuntu_DB_Server" 15
/etc/init.d/vbox_start_vm "Ubuntu_Testing_Server" 15
echo "Done";
;;
stop)
echo -n "Stopping all the VirtualBox VMS"
/etc/init.d/vbox_stop_vm "Windows2008_DC"
/etc/init.d/vbox_stop_vm "Windows2008_Test"
/etc/init.d/vbox_stop_vm "Ubuntu_Web_Server"
/etc/init.d/vbox_stop_vm "Ubuntu_DB_Server"
/etc/init.d/vbox_stop_vm "Ubuntu_Testing_Server"
echo "Done";
;;
*)
echo "Usage: /etc/init.d/vbox_vm_startup {start|stop}"
exit 1
;;
esac
exit 0
Testing software
I read a great presentation over at slideshare.net: Georgia Tech hacking Accessibility
Highly recommended reading. To summarize: Software developers and companies should think that people with different disabilities are extreme testers. If your application can be accessed and work for them, it will be easier for everyone else. Instead of thinking of it as an obstacle...
An example is how visualization with symbols, text-to-speech and speech recognition now are getting more and more common. In the beginning this was for people that couldn't access computers without help.
For information about symbols: (In Norwegian) www.symboler.no. For english: www.widgit-online.com
Monday, February 8, 2010
Move an iscsi target from one windows 2008 server to another
I'm the administrator, and I did not set a policy. Well. This one was actually easier than I first thought...
Go into Computer Management -> Storage Right click on the disk and click online. (This does not show up when clicking on the partition, you have to click the grey square on the left)
I went back and forth trying to have the target on both computers, reading about cluster services and stuff, and after googling the error message, although sometimes the solution is easier...
Moving a Windows 2008 R2 Server from Vmware to Virtualbox
One advice: Don't try to run vmware and virtualbox at the same time on the same computer, it might crash everything.
Try to remove vmware tools before you move the vmdk to virtualbox.
Steps:
Make a copy of your vmdk in case anything fails.
Write down all the hardware settings for the vmware instance you are to move.
I had the following settings on vmware to consider and move:
- SCSI controller LSI Logic
- 1 Network adapter getting IP based on the mac address
- 1 Host-Only network adapter
Steps for VBoxManage. (i'm not going into details, as it's better to read the manual for each option, if you wonder)
VBoxManage createvm -name "Windows2008_R2_x64_vbox" -register VBoxManage modifyvm "Windows2008_R2_x64_vbox" --memory "1200" --acpi on --cpus 1 --pae on --ioapic on VBoxManage modifyvm "Windows2008_R2_x64_vbox" --hwvirtex on --vtxvpid on VBoxManage modifyvm "Windows2008_R2_x64_vbox" --nic1 bridged --bridgeadapter1 br0 --macaddress1 000c123456789 VBoxManage modifyvm "Windows2008_R2_x64_vbox" --nictype1 82540EM VBoxManage modifyvm "Windows2008_R2_x64_vbox" --nic2 hostonly --hostonlyadapter2 vboxnet0 --macaddress2 000c12345678a VBoxManage modifyvm "Windows2008_R2_x64_vbox" --nictype2 82540EM VBoxManage modifyvm "Windows2008_R2_x64_vbox" --ostype Windows2008_64 VBoxManage storagectl "Windows2008_R2_x64_vbox" --name "IDE Controller" --add ide VBoxManage storageattach "Windows2008_R2_x64_vbox" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "/mnt/vboxes/win2008r2x64_vmware.vmdk"
Important not to forget the Virtual RDP:
VBoxManage modifyvm "Windows2008_R2_x64_vbox" --vrdp on --vrdpport 12345 --vrdpmulticon on --vrdpauthtype external
Try booting, and most likely it should all be fine.
Now why did I add a IDE Controller instead of a SCSI Controller?
I tried using SCSI controllers, but I got a blue screen with stop error 7b. This tells me that Windows cannot use the boot device, because of some access problems through the controller. I tried the IDE Controller, as that usually works for clients (Win 7, Vista, XP), and it worked perfect for Win 2008 Server as well.
You will need to check if any old vmware-drivers are still "hanging around" and install the Guest additions.
I don't know if there is a performance increase in using a VDI compared to a VMDK. The good thing about keeping it as a VMDK is that you can always "go back" to evil vmware.
For moving Ubuntu clients. Do similar steps as above, but you can keep the SCSI controller, move to a SATA Controller, or do what you like. Everything just works with Ubuntu!
Update (03.feb-2012): If you have the time, it's better to reinstall. At least I experienced better performance for the servers that were reinstalled instead of converted.
Why choose VirtualBox over vmware on ubuntu 9.10/9.04 Server x64
Reasons:
- iostat ! vmware writes all RAM access to /tmp as well. This is no problem if you just double your ram and put /tmp in RAM. vmware says this is due to how the Linux Kernel is made. well... Real reason: Buy some licenses on the other vmware products, and this won't happen.
- Web Management Console. Ever experienced it to not crash when you do more than 3-4 settings per session?
- Memory usage. All VMs are using about 25-35% more than set.
- vmware tools. Ever tried uninstalling them on a Windows Server 2008 R2 64 bit? Or tried updating them on any client? It's just horrible. Even their "cleanup" utility doesn't clean anything except the installation entry. No support for Ubuntu 9.04 or 9.10.
- Boot times for vms is more than double of virtualbox.
- No USB support for vms on ubuntu 9.10 as host os, or 9.04.
After changing to VirtualBox running in headless mode, I thought I would go back to vmware after a week. VirtualBox seems more client-virualization. But I was wrong!
Reasons:
- iostat. No writing of memory to /tmp = performance increase or more free memory depending on the setup
- VBoxManage. Anything you need to do can be done through a command line.
- Memory Usage. 5-10% more than assigned to the VMs. that's a lot less than vmware.
- VirtualBox Guest Additions. They just work. install, uninstall, update. Ubuntu 9.04, 9.10
- Boot times is about half of vmware
- USB just works out of the box.
The main factor is of course the io usage. Even when you have /tmp in RAM, vmware will always write/read every single ram entry twice. Maybe it's better when you have power failure, but a UPS isn't that big investment, and if this is for production, you need a UPS anyhow.
The only thing I find better in vmware is host-only networking. But seeing the slow development of vmware-server and the fast pace of virtualbox, I see only one winner. vmware is still the dinosaur, because they are known in the market, but for everyone that doesn't think a cmd line is complicated: Do yourself a favore and choose virtualbox on Ubuntu 9.04 or 9.10.
I have tried every tip for changing swap behaviour, having swaps on different drives, tmp in ram etc, and I still find VirtualBox performing way better on 1 drive with all swap/tmp and virtual harddrives on the same drive, than vmware with multiple drives, keeping swap/tmp and virtual hdds apart.