LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > Linux - Certification
User Name
Password
Linux - Certification This forum is for the discussion of all topics relating to Linux certification.

Notices

Reply
 
Search this Thread
Old 09-05-2012, 01:43 AM   #61
mike_rhce
Member
 
Registered: Jun 2011
Posts: 161

Original Poster
Rep: Reputation: Disabled

thanks, onebuck.

Manoj, you're welcome to post your tech question publicly. If it relates to an error in my book, that's OK. I've made mistakes before.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-05-2012, 09:01 PM   #62
mrhillsman
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Rep: Reputation: Disabled
virt-install --prompt

Maybe it is just me but I believe to have found an error in the book. On page 81, there are instructions for symlinking the /var/lib/libvirt/images directory to a folder /home/user/KVM, which I have done. Then following the order of the book, I'm seeing a screen shot showing root user using virt-install, however, when I replicate this, I get an error message:

[root@srv ~]# virt-install --prompt
What is the name of your virtual machine?
server1.example.com
How much RAM should be allocated (in megabytes)?
1024
What would you like to use as the disk (file path)?
/home/mhillsman/KVM/server1.example.com.img
How large would you like the disk (/home/mhillsman/KVM/server1.example.com.img) to be (in gigabytes)?
16
What is the install CD-ROM/ISO or URL?
ftp://75.148.181.193/pub/inst/one

Starting install...
Retrieving file .treeinfo... | 674 B 00:00 ...
Retrieving file vmlinuz... | 7.6 MB 00:00 ...
Retrieving file initrd.img... | 60 MB 00:00 ...
Creating storage file server1.example.com.img | 16 GB 00:00
ERROR internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu-kvm: -drive file=/home/mhillsman/KVM/server1.example.com.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /home/mhillsman/KVM/server1.example.com.img: Permission denied

Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start server1.example.com
otherwise, please restart your installation.
[root@srv ~]# su - mhillsman
[mhillsman@srv ~]$ virt-install --prompt
What is the name of your virtual machine?
server2.example.com
How much RAM should be allocated (in megabytes)?
1024
What would you like to use as the disk (file path)?
/home/mhillsman/KVM/server2.example.com.img
How large would you like the disk (/home/mhillsman/KVM/server2.example.com.img) to be (in gigabytes)?
16
What is the install CD-ROM/ISO or URL?
ftp://75.148.181.193/pub/inst/one

Starting install...
Retrieving file .treeinfo... | 674 B 00:00 ...
Retrieving file vmlinuz... | 7.6 MB 00:00 ...
Retrieving file initrd.img... | 60 MB 00:00 ...
Creating storage file server2.example.com.img | 16 GB 00:00
Creating domain... | 0 B 00:00
Connected to domain server2.example.com
Escape character is ^]


gPXE (http://etherboot.org) - 00:03.0 C100 PCI2.10 PnP BBS PMM3FE0@10 C100


Probing EDD (edd=off to disable)... ok

However as you can see, running virt-install --prompt as normal user, throws no errors.
Here are the permissions and SELinux contexts for the /var/lib/libvirt/images symlink and /home/user/KVM:

Before requested changes,
[root@srv ~]# ls -lZh /var/lib/libvirt/ /home/mhillsman
/home/user:
...

/var/lib/libvirt/:
...
drwx--x--x. root root system_ubject_r:virt_image_t:s0 images
...

[root@srv ~]# su - mhillsman
[mhillsman@srv ~]$ mkdir /home/mhillsman/KVM
[mhillsman@srv ~]$ logout
[root@srv ~]# chcon -R --reference=/var/lib/libvirt/images /home/mhillsman/KVM
[root@srv ~]# su - mhillsman
[mhillsman@srv ~]$ rmdir /var/lib/libvirt/images
rmdir: failed to remove `/var/lib/libvirt/images': Permission denied
[mhillsman@srv ~]$ logout
[root@srv ~]# rmdir /var/lib/libvirt/images
[root@srv ~]# su - mhillsman
[mhillsman@srv ~]$ ln -s /home/mhillsman/KVM /var/lib/libvirt/images
ln: creating symbolic link `/var/lib/libvirt/images': Permission denied
[mhillsman@srv ~]$ ls -lZh /var/lib/libvirt/ /home/mhillsman/
/home/mhillsman/:
...
drwxrwxr-x. mhillsman mhillsman system_ubject_r:virt_image_t:s0 KVM
...

/var/lib/libvirt/:
...
[mhillsman@srv ~]$ logout
[root@srv ~]# ln -s /home/mhillsman/KVM /var/lib/libvirt/images
[root@srv ~]# ls -lZh /var/lib/libvirt/ /home/mhillsman
/home/mhillsman:
...
drwxrwxr-x. mhillsman mhillsman system_ubject_r:virt_image_t:s0 KVM
...

/var/lib/libvirt/:
...
lrwxrwxrwx. root root unconfined_ubject_r:virt_var_lib_t:s0 images -> /home/mhillsman/KVM
...
 
Old 09-06-2012, 09:13 AM   #63
mtalwar
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Hi Mike,

I appreciate that you are open to feedback.

The thing about iscsi is that your book tells the user to mount the remote partition using UUID in /etc/fstab. But doing that will leave the system unable to boot. Also, nowhere is it mentioned how to tackle if a system is rendered unbootable because of such a mistake in /etc/fstab

The easy solution being -

mount -n -o remount,ro /
and then fixing the /etc/fstab entry.

Would you mind correcting it in the book for the benefit of your readers?

Thanks in advance.

Manoj

Last edited by mtalwar; 09-06-2012 at 09:15 AM.
 
1 members found this post helpful.
Old 09-07-2012, 01:24 AM   #64
BooDaddy
Member
 
Registered: Sep 2010
Location: Chattanooga, TN.
Distribution: Redhat, AIX, CentOS
Posts: 30

Rep: Reputation: 1
Quote:
Originally Posted by mtalwar View Post
Hi Mike,

I appreciate that you are open to feedback.

The thing about iscsi is that your book tells the user to mount the remote partition using UUID in /etc/fstab. But doing that will leave the system unable to boot. Also, nowhere is it mentioned how to tackle if a system is rendered unbootable because of such a mistake in /etc/fstab

The easy solution being -

mount -n -o remount,ro /
and then fixing the /etc/fstab entry.

Would you mind correcting it in the book for the benefit of your readers?

Thanks in advance.

Manoj
Actually, mounting by uuid is the proper way to do it. This is what they teach in the RedHat Sys Admin III course for iscsi mounts. I was in the course, and actually made notes when the instructor told us. He even stressed it. You must remember to add _netdev to the mount options in /etc/fstab. Without /netdev in your mount options, the system will fail at boot using uuid or the old /dev/sd* convention if the mount cant be found.

I can also confirm from my own test lab that mounting by uuid with proper mount options does indeed work perfectly through reboots, even if the iscsi target is offline, or the initiator has lost network connectivity.

As much as old school linux people hate to admit it, uuids are a blessing especially for ahci, network, san, and multipath mounts. You should always use uuids when possible.
 
Old 09-07-2012, 02:51 PM   #65
mtalwar
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
I agree with you BooDaddy. UUID is the proper way to mount a partition. And thanks for mentioning about the -O _netdev option. I wasn't aware of it. That was the missing piece of the puzzle.

What I used to do was to put the mount command in /etc/rc.local file. Wasn't ideal but served the purpose for me.
 
Old 09-13-2012, 11:33 AM   #66
mrhillsman
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by mrhillsman View Post
Maybe it is just me but I believe to have found an error in the book. On page 81, there are instructions for symlinking the /var/lib/libvirt/images directory to a folder /home/user/KVM, which I have done. Then following the order of the book, I'm seeing a screen shot showing root user using virt-install, however, when I replicate this, I get an error message:

[root@srv ~]# virt-install --prompt
What is the name of your virtual machine?
server1.example.com
How much RAM should be allocated (in megabytes)?
1024
What would you like to use as the disk (file path)?
/home/mhillsman/KVM/server1.example.com.img
How large would you like the disk (/home/mhillsman/KVM/server1.example.com.img) to be (in gigabytes)?
16
What is the install CD-ROM/ISO or URL?
ftp://75.148.181.193/pub/inst/one

Starting install...
Retrieving file .treeinfo... | 674 B 00:00 ...
Retrieving file vmlinuz... | 7.6 MB 00:00 ...
Retrieving file initrd.img... | 60 MB 00:00 ...
Creating storage file server1.example.com.img | 16 GB 00:00
ERROR internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu-kvm: -drive file=/home/mhillsman/KVM/server1.example.com.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /home/mhillsman/KVM/server1.example.com.img: Permission denied

...
Alright, so unfortunately I haven't heard from anyone here but I did manage to get this resolved. The study guide doesn't mention this as far as I know so here is what resolved this for me.

Solution:

Provide "Other" with execute permissions to the /home/username and /var/etc/libvirt/ directories.

Source: http://libvirt.org/drvqemu.html
 
Old 09-20-2012, 11:44 PM   #67
rkski
Member
 
Registered: Jan 2009
Location: Canada
Distribution: CentOS 6.3, Fedora 17
Posts: 247

Rep: Reputation: 51
Hi Mike

I set up the tester1.example.com and outsider1.example.com VMs but they don't have access to the internet.
I'm using the laptop's wireless NIC for internet access in the host. Do I have to make a FORWARD rule in iptables? I set up the VMs with NAT forwarding.
 
Old 09-21-2012, 02:16 AM   #68
stef80
Member
 
Registered: Nov 2009
Posts: 51

Rep: Reputation: 14
Libvirtd daemon will setup iptables rules on KVM host, you don't have to bother with that.
All you have to do is properly setup networking on virtual machines(DNS server in /etc/resolv.conf, it should be same as for the host/your laptop)
 
Old 09-25-2012, 09:53 AM   #69
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
Mike,...

Got your book about 3 months ago,... I gotta say... Thanks. It's a great resource & I think it is terrific you make yourself accessible on these forums... This thread is definitely "Required Extra Reading" ...
 
Old 10-11-2012, 07:11 AM   #70
red.hive
LQ Newbie
 
Registered: Oct 2012
Posts: 19

Rep: Reputation: Disabled
@Mike - a few questions

Hello Mike,

I couple of days ago I received the 6th edition of your book - and I have to say it looks great.

I am thinking about the best setup option for my studies, so I have a few questions for you, I would really appreciate if you could help:

1) Even though people say that CentOS and Scientific Linux are good enough to learn for the RHCSA/RHCE, I was told that it is not ideal - not only because of the look and feel that are different, but also because they are not as similar to RHEL as people might think - and that on exam time it might be confusing. Do you agree with that?

2) Assuming that the best option for the exam is really RHEL, then comes the question of price: I received in my course the 30 day trial disk, with the RPMs - and I built the local repo from the CD...but...there are so many packages missing from there (for instance, no tigervnc available and so on)...that doesn't seem like a good option either....so...I am coming to the conclusion that I will have to order a RHEL license...what do you think? Any way to get a decent repo for the trial version?

3) Now, assuming that I will use RHEL (be it trial version or license), comes the question of hardware. I only have one computer that I can use, and I have vmware workstation installed. I imagine there is no problem installing RHEL on vmware workstation and doing all the studies from there - my only question would be regarding the KVM part - would I be able to use KVM inside a redhat VMware? Or would I need to install redhat on the host (more problematic for me) in order to be able to use KVM?

Thanks in advance for your help and for the great book!

red.hive
 
Old 10-12-2012, 06:07 AM   #71
stef80
Member
 
Registered: Nov 2009
Posts: 51

Rep: Reputation: 14
SL and CentOS are OK, nothing wrong with them.
As for the RHEL, register for a trial license and download a DVD iso from RH site. It contains all needed packages.
I personaly would not try to use KVM inside VMware.
 
1 members found this post helpful.
Old 10-13-2012, 12:24 AM   #72
BooDaddy
Member
 
Registered: Sep 2010
Location: Chattanooga, TN.
Distribution: Redhat, AIX, CentOS
Posts: 30

Rep: Reputation: 1
CentOS is bit for bit Red Hat. Scientific Linux can be a bit different since its maintained under different pretenses for their project.

But, CentOS is essentially identical to RHEL. CentOS merely re-compiles the source code that Red Hat releases, and the only changes they make is the artwork to not include any Red Hat logos.

I used CentOS exclusively when I was prepping for my RHCSA and my RHCE. I also use CentOS at work in our test environment to avoid costs for trivial test machines, but we use RHEL in production.

You don't need to spend money on a RHEL entitlement just to learn from, unless you want to learn some of the RHN stuff. If you have access to a .edu email address you can buy RHEL under their academic programs and get a self-supported edition for pretty cheap. I think its less than $80 per year for RHEL server, and something like $60 for RHEL workstation. Please double check the pricing, as these are quotes from memory.

Do not try to run KVM from a guest that is running in a VMWare workstation VM. If you want to use VMWare then by all means go for it. It won't affect the knowledge you get from the book. just make sure you are able to setup the virtual networks in VMWare to mimic what Mr. Jang suggests for KVM.
 
1 members found this post helpful.
Old 10-13-2012, 01:55 PM   #73
red.hive
LQ Newbie
 
Registered: Oct 2012
Posts: 19

Rep: Reputation: Disabled
Thanks stef80 and BooDaddy for your kind answers. It is really a big help.

I have been using linux for a few years, but only as a user, not as a sys admin - I hope a "newbie" like me can manage to learn enough to pass the test.

Unfortunately I don't have a .edu email, so I will either really go for the Centos option or buy a one year license (self support), which from what I read is about 350 US dollars.

Thanks again for the advice and I am sure as I progress in my studies, I will probably be coming here for more help - and hopefully one day, will become more experienced to be able to be the one giving help to others :-)

red.hive
 
Old 10-14-2012, 07:17 AM   #74
stef80
Member
 
Registered: Nov 2009
Posts: 51

Rep: Reputation: 14
Quote:
Originally Posted by red.hive View Post
Unfortunately I don't have a .edu email, so I will either really go for the Centos option or buy a one year license (self support), which from what I read is about 350 US dollars.
Again ... you don't need to buy. Register for trial license and download a DVD from Red Hat.
You don't really need RHN access to prepare for exams so trial license will suffice.
If you need to practice a package update (say kernel packages), download versions 6.2 and 6.3, install v6.2 and make update repo from v6.3 ... works perfectly.

Last edited by stef80; 10-14-2012 at 07:23 AM.
 
1 members found this post helpful.
Old 10-20-2012, 04:21 PM   #75
red.hive
LQ Newbie
 
Registered: Oct 2012
Posts: 19

Rep: Reputation: Disabled
Thanks stef80, I decided to go for CentOS instead, I hope it will be ok with it!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rhce/rhcsa certification can i apply to both for a less price? please help bobba.surendra Linux - Certification 1 03-15-2011 10:52 AM
RHCT Red Hat Certified Technician Linux Study Guide (Exam RH202) avila6 Linux - Newbie 2 03-10-2010 01:26 PM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration