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 http://192.168.122.1/pub/inst -x "ks=http://192.168.122.1/pub/ks/rhel03.cfg"


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

By penoi on Monday, April 30, 2012 | | A comment?

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

By penoi on Monday, April 23, 2012 | | A comment?

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 :)

http://www.amazon.com/RHCSA-Certification-Practice-Virtual-Machines/dp/007180160X/ref=sr_1_4?s=books&ie=UTF8&qid=1335154380&sr=1-4


RHCSA RHCE Practice exams

By penoi | | A comment?

vmnetcfg in VMware Player running in Fedora 16

where is vmnetcfg in VMware Player running in Fedora 16?

It is found under:

/usr/lib/vmware/bin/vmware-netcfg

By penoi on Saturday, April 21, 2012 | | A comment?

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 :) )

By penoi on Thursday, April 12, 2012 | | A comment?

Netapp Snapmirroring

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

Initialize:


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

Remirror

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


http://www.sysadmintutorials.com/tutorials/netapp/netapp-snapmirror-setup/

By penoi on Monday, April 9, 2012 | | A comment?