Monday, April 30, 2012

KVM commands

To install with prompt
virt-install --prompt

List virtual machine
virsh list

Stop virtual machine
virsh destroy 

Configure VM autostart
virsh autostart 

Unconfigure VM autostart
virsh autostart --disable 

To install using kickstart
virt-install --name=rhel03.localdomain -r 768 --disk path=/var/lib/libvirt/images/rhel03.localdomain.img,size=8 -l -x "ks="

To create VM snapshot
virsh save centos01 centos01.snap.$(date +%y%m%d)

To restore VM snapshot
virsh shutdown centos01
virsh restore centos01.snap

Clone vm
virt-clone --original centos01 --name centos02 --file /home/penoycentral/images/centos02.img

Troubleshooting KVM

Error when starting the VM snapshot
error restoring domain unable to read from monitor

To fix
virsh managedsave-remove domain-name

Monday, April 23, 2012

mysql commands

Set mysql root password
mysqladmin -u root password 'new-password'

Show databases
mysql> show databases;
mysql> use databasename;

Show tables
mysql> show tables;

Show columns
mysql> select column from tables;

Backup database
$mysqldump -u  -p  > backupdatabase.sql

Restore database
mysql -u  -p  < databasebackup.sql

RHCSA/RHCE Red Hat Linux Certification Practice Exams with Virtual Machines (Exams EX200 & EX300)

Im a big fan of Michael Jang. Having seen this upcoming book will greatly help all RHCSA/RHCE aspirants. Hopefully Michael can give me a free copy :)

RHCSA RHCE Practice exams

Saturday, April 21, 2012

vmnetcfg in VMware Player running in Fedora 16

where is vmnetcfg in VMware Player running in Fedora 16?

It is found under:


Thursday, April 12, 2012

Accelerated NCDA Boot Camp Data ONTAP 8.0 7-Mode - (ANCDA-D87M)

I will be sitting for Netapp Accelerated NCDA bootcamp Ontap 8.0.7-Mode next week. It will be delivered by Fastlane Singapore, one of the authorized Netapp learning Centers. Hopefully this vendor training will help me to fastrack since my company deploys Netapp storage solutions to our clients.

Will post some reviews next week (if again i have the time :) )

Monday, April 9, 2012

Netapp Snapmirroring

From the destination:(most of the commands done on the destination filer)


snapmirror initialize -S <source-qtree> <destination-qtree>
filer2> snapmirror initialize -S filer1:/vol/vol2/qtree-name filer2:/vol/vol0/qtree-name

Snapmirror status

> snapmirror status

Pause Snapmirror

>snapmirror quiesce <qtree>
filer2> snapmirror quiesce /vol/vol0/qtree-name

Resume Snapmirror

>snapmirror resume <destination-path>
filer2> snapmirror resume /vol/vol0/qtree-name

To break Snapmirror (for destination to be rw)

filer2> snapmirror quiesce /vol/vol0/qtree-name
filer2> snapmirror break /vol/vol0/qtree-name

Check qtree status

>qtree status


filer2> snapmirror resync -S filer1:/vol/vol2/qtree-name filer2:/vol/vol0/qtree-name