Monday, September 6, 2010

CentOS 5.5 KVM

Installing a virtual machine

virt-install \
-n [instance_name] \
-r 1024 \
--vcpus=2 \
--os-variant=rhel5 \
-v \
--accelerate \
-c /var/lib/libvirt/images/CentOS-5.4-x86_64-bin-DVD.iso \
-w bridge:br0 \
-vnc : \
--disk path=/vm/[instance_name].img,size=50



Edit /etc/sysconfig/network-scripts/ifcfg-eth0
comment out BOOTPROTO
Add BRIDGE=br0

Create /etc/sysconfig/network-scripts/ifcfg-br0
The content should be:
DEVICE=br0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Bridge

Wednesday, March 17, 2010

Renaming an SQL Server 2008 Instance

From:

– Get the current name of the SQL Server instance for later comparison.
SELECT @@servername

– Remove server from the list of known remote and linked servers on the local instance of SQL Server.
EXEC master.dbo.sp_dropserver '[SERVER NAME]'

– Define the name of the local instance of SQL Server.
EXEC master.dbo.sp_addserver '[NEW SERVER NAME]', 'local'

– Get the new name of the SQL Server instance for comparison.
SELECT @@servername

Note: be careful of the quotes, they should be single quotes instead of the fancy ones mentioned on the blog.