Monday, March 8, 2010

Change location HDD from original VM to another VM

If you have 1 server seperate 2 HDD example 1 for OS & another for data. Let talk about when the OS have a problem than how gonna you take out the HDD data to another VM machine. So this tutorial i made for me and for you as a knowledge tp know.

server A - original server have 2 HDD
server B - server

scenario

- when OS in server A crash or corrupted, don't panic! here the step. your data is save because you have a separated HDD on your VM.
- firstly create your new VM, install OS (for me i using Freebsd) after finish please add another HDD when the installation is completed. so now you have 2 HDD (the size on additional HDD depend on your server & need (in my case i create same capacity with the original server capacity for data))
- log in into server B and format the HDD using sysinstall (fdisk & label) the HDD. (remember to add at /etc/fstab for your new HDD)
- after finish format, open VM client browse the datastore your server A located.
- copy the second HDD.vmdk ( by default your HDD will namely nameserver_1.vmdk) copy this file and browse the folder server B & paste inside the folder server B.
- after finish copy you need to rename your the vmdk file that you copy from server B. To this try to ssh inside the vmware machine, by default your vm not allow the ssh protocol you need to open it.
- ssh your VM, go to /vmfs/volumes/datastore1 , go to path your server directory
- backup the nameserverB_1.vmdk to nameserverB_1ORI.vmdk
- rename the vmdk that you copy before nameserverA_1.vmdk to nameserverB_1.vmdk
- turn on your VM.

DONE

Tuesday, March 2, 2010

htpasswd tips

to add another user on htpasswd file

htpasswd -s alimdevpass username

Monday, March 1, 2010

FreeBSD (add extra HDD on VMWare Environment)

FreeBSD add another HDD on VMWARE and format it

- shutdown your server.
- open your vmware & choose the server you want to add
- edit & add HDD
- Turn on your server.
- become as root type sysinstall
- choose configure & FDISK
- choose a additional HDD that you add before. (BEWARE!!! Do not edit the existing HDD on your server,this may cause your server corrupted!)
- choose entire disk if you want to use all disk & W button (write)
- please choose NONE "do not tpuch master boot record"
- after finish push q button
- go back to main menu & choose Label (this is use to label your HDD)
- select C to create the FS (depend on your need) exp : /test01
- and select W to write the changes
- Select Q and edit at FSTAB (ee /etc/fstab)
- add this line to you fstab line
exp : /dev/da1s1 /test01 ufs rw 2 2
- save and reboot your server.

Sunday, February 21, 2010

Update / Upgrade Ubuntu Server

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade


If the kernel or kernel modules have been updated, you should reboot your computer/server.

Thursday, February 11, 2010

No netwrok after clone/copy using VMWare ESX

After making a copy/clone of an ubuntu server 8.10, i face a network problem.

1. "ifconfig" shows no eth0 device, just the 127.0.0.1 loopback
2. "/etc/init.d/networking restart" reports:

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

Solution
When you create a complete clone/copy of your vmware machine, a new ethernet MAC address is assigned.

follow this step :
as a root
run this CLI
# rm -fr /etc/udev/rules.d/70-*
# reboot

after wakeup, try ifconfig.
now you get your network back.

Salud!