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?

Unable to set size of tmpfs in /etc/fstab RHEL6.2

Resized tmpfs space in /etc/fstab to 4g

tmpfs /dev/shm tmpfs size=4096m 0 0

After reboot, size still on 2G
[root@OEL1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oel1-lv_root
16G 3.8G 11G 27% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 485M 51M 409M 12% /boot


Looks like a bug on RHEL6
https://www.redhat.com/archives/rhelv6-list/2011-February/msg00081.html


[root@OEL1 ~]# mount -o remount /dev/shm
[root@OEL1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oel1-lv_root
16G 3.8G 11G 27% /
tmpfs 4.0G 0 4.0G 0% /dev/shm
/dev/sda1 485M 51M 409M 12% /boot
[root@OEL1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)

By penoi on Thursday, March 22, 2012 | | A comment?

Sydney here i come

Will be in Sydney next week for my company induction and training for two weeks. There's a lot of things to learn. One thing that i like with my current employer is that they use Open Source technologies. Not unlike in the Financial industry that almost is proprietary.
Hopefully everything will fall into places.

By penoi on Tuesday, February 28, 2012 | | A comment?

Corrupted Virtual Machine snapshot in KVM

Got this error when booting up my Virtual Machine in KVM

error restoring domain unable to read from monitor

To fix and remove the corrupted suspended session:
virsh managedsave-remove domain-name

then restart your VM

 

ref: http://johnpoelstra.com/2011/10/19/resuming-corrupted-suspended-guests/

By penoi on Sunday, February 5, 2012 | , | A comment?

Current home workstation



Fedora 16 Gnome3 gnome-extensions with cairo-dock OpenGL enabled

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

kung hei fat choi



CNY at the office. kung hei fat choi!!!

By penoi on Thursday, January 19, 2012 | | A comment?

OpenWRT Backfire (10.03.1-RC6, r28680) Linksys WRT54GL



My Linksys WRT54GL wireless router running on OpenWRT

By penoi on Saturday, December 17, 2011 | , | A comment?

Laptop overheat in Fedora 16

After installing Fedora 16 on my laptop(or any RH flavors) i noticed a huge temperature difference when running Windows 7 vs Fedora/RH. Definitely, my laptop temperature is high even in idle.

Followed a workaround as discussed in Bugzilla 702953 by setting the GPU power to mid instead of using the max power

[root@fedora ~]# acpi -t
Thermal 0: ok, 78.0 degrees C

Now set the GPU power to mid
[root@fedora ~]# echo mid > /sys/class/drm/card0/device/power_profile

Temperature goes down instantly
[root@fedora ~]# echo `date` && acpi -t
Sun Dec 4 06:18:35 SGT 2011
Thermal 0: ok, 71.0 degrees C
[root@fedora ~]# echo `date` && acpi -t
Sun Dec 4 06:30:05 SGT 2011
Thermal 0: ok, 68.0 degrees C

One alternative way of monitoring temperature is by the use of lm_sensors
[root@fedora ~]# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +83.0°C (crit = +103.0°C)

radeon-pci-0100
Adapter: PCI adapter
temp1: +84.0°C


Im running ATI Radeon HD5730 video card

By penoi on Sunday, December 4, 2011 | | A comment?

The Youth Album na Walang Pamagat

The Youth's Album na walang pamagat is the best Pinoy album that was produced in the 90's when it comes to technicality of the recording. After 17 years, it still sounds good and will not be needing a remaster version for the next 10 yrs :)

By penoi on Tuesday, November 29, 2011 | | A comment?

Razer Mamba SystemTray loads up my cpu

I noticed that my CPU load is in havoc even in idle. Interestingly, the culprit was the Razer Mamba systemtray process.

http://www.overclock.net/t/1155194/cpu-mem-usage/10

 

To disable Razer Mamba System Tray at bootup

Click Run and type System Configuration

Click on Startup tab and uncheck "Razer Mamba Systray" then Apply

By penoi on Wednesday, November 23, 2011 | | A comment?

penoy's new cave!!!

My family's new place here in Singapore rocks!!! and i got my own small office too. Will post some pix once i've done arranging my things... time to upgrade my 2.1 speaker which i got as free on my Canon printer?? will see once my budget officer approved.

 

By penoi on Sunday, November 6, 2011 | | A comment?

Phone Scam claiming from Microsoft

beware of this scam, i just received a call claiming they are from microsoft and said that my computer was sending malicious info in the net. Curiously, i removed my network connection(for safety reason) and followed their instruction..they asked me to go to the Event Viewer and asked if theres any error.. obviously there wil be erros in windows.they requested me to delete the error logs.. obviously i wasnt able to delete the logs.. after that he told me that a microsoft certified technician will scan my computer online by opening something which irritates me.. if theres any issues with my pc.. i will deal with it.. i can reformat anytime or use Linux.. and i dont want microsoft support to mess around with my pc.. the caller even says that if there will be any problem with my computer, it will not be Microsoft's fault.. to hell Microsoft cares???i hung up the phone.

Did some research on this scam and found the following sites.. please be warned and this kind of modus operandi is still on the loose

http://www.computerrepairtips.net/phone-call-from-microsoft-about-virus-is-a-scam/

http://answers.microsoft.com/en-us/windows/forum/windows_vista-security/i-received-a-phone-call-from-someone-claiming-i/4489f388-d6de-416d-9158-0079764bb001

 

By penoi on Saturday, October 15, 2011 | , | A comment?

KC's birthday bash

2 days to go before i join my family for KC's birthday party. Pretty darn excited. Been stressed lately and i need a break. Maybe, goodbye CLI for 1 week. After Redhat, next target Veritas filesystem and clustering.

By penoi on Wednesday, September 7, 2011 | | A comment?

Red Hat Certified Engineer

It has been a long day for me.. RHCSA exam in the morning and RHCE exam in the afternoon. Finally after months of self study and 4 days on the rapid track course, i nailed both exam.
Pretty much to say that i'm so proud  on the cert. This is not the type of exam that you will just choose among the multiple choice or configure in a simulated environment. It will test your knowledge on how well you understood Redhat.
On future takers, i advised you to know the exam objectives inside and out. SELinux looks like intimidating at first, but as soon as you understand how it works,it will be a piece of cake for you :)

Materials/books used


RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)  -- Michael Jang
Highly recommend!!! Comes with a CD with pdfs and labs exams at the end of every chapter. My fav source of info for the exam.

Hands-on Guide to the Red Hat® Exams: RHCSA™ and RHCE® Cert Guide and Lab Manual (Certification Guide) -- Damian Tommasino
Lots of errors, but hey, as soon as you pointed the errors in the book, it just shows that you know your stuffs. Used to counter check configs and setup.

RH300 RHCE Rapid Track course
Final review for the exam. It cost much but highly recommended also. It guides me and helps to fill in the gaps on what i have learned already on my home lab. Before taking the course, i advised that you first do your home work. Learn the exam objectives, build your own home lab, simulate the configs as advised on Michael and Damian's book. In this way when you attend the course, you can ask all the questions that you have on your instructor. This is fast-paced course so make full use of it.

texastwister/OpenRHCE - GitHub - This is a beast study guide. I used this as a last minute review before taking the exam. Reading the whole week while in the train :) Highly recommended also

As  always, we signed the Non-disclosure Agreement so i will not divulge anything specific about the exam. I might update this blog,but will not be on the RHCE exam specific anymore.
Study!!! study!!!! study!!!!! lab!!!! lab!!!! lab!!!! simulate!!!! simulate!!!! and always follow the KISS principle..

 

reposted from RHCSA/RHCE Exam notes August 26 2011

By penoi on Tuesday, September 6, 2011 | | A comment?

Happy father's day

It's wAs a long day. Yesterday my wife surprise me of the thing that I wanted since it came out... An Ipad2.. It is the 64G white version. This morning another gift she put on my home office table.. A Tommy Hillfiger watch... I'm deeply touched and appreciate the effort she and KC did this Father's day. Love you both...

By penoi on Sunday, June 19, 2011 | , | A comment?