2013年4月4日星期四

HP G7 do kvm job

Today my leader asks me to do a virtualization to our server "ProLiant DL380 G7", it is a big machine with 2 cpus every cpu have 12 processors and so many memories, although the memory card slot has not been fix full, it also has about 70GB memories, so he decide to use virtualization on it , so that the developers can have a lot of machines, not so many guys use only one machine to do their job, that so many tomcat application located on the same server and they must change their tcp port to not 8080 and 8089, and so on.

At the time I heard the order from him, I asked why shall we use the VirtualBox, it also is a good choice, and I have made a test it on another server for test. He said that "I mean virtualization, but not a virtual host."

So I must obtain that order to do the Virtualization.

I searched the google with a good reference about kvm on the centos "http://kritonsblog.blogspot.com/2012/12/centos-63kvmvncserver.html", I like blogspot, so I searched with the key word "centos kvm site:blogspot.com". Although the result is kvm based on the centos 6.3, and ours are centos 5.5, but I think maybe just take a try is the best option. So  referenced with the article, first use the command "yum install kvm virt-viewer virt-manager libvirt libvirt-python python-virtinst", but after I installed the software, it absolutely installed influence, no errors , but there some other things to think. First, I can have the application in the system software item on the floor item. But, some choices on the software window do let me to mark, such as the first "partial virtualization" and "full virtualization", I can't choose full one, I do not why at this time, I also take a command "/etc/init.d/libvirt restart", but it was not work. At this time, I think I should lost softwares, so I do another job "yum groupinstall kvm", so perfect a command , the centos have absolutely make a focus on kvm, but also the full virtualization do not let me chooise. After I have lauch, I do a reboot job to the machine, and everything takes ok now. I have all the choices to let me choose.

Another Question: what is the network device should kvm use? At first, I think the bridge should be the best choise, because if you have done that, you should be very easy on the left days, make a sense that the guest network card are the same as the host network card. So I made a try to bridge it, but the result is so happy, I can't have the right function. Then, I drop the choise, I think I should first install kvm and install a os and work ok on the host machine. Based on this mind, I took the route network device model for the guest machine( here, we should have a sense that if we chooise the route model, it was difference with the nat model, we should make some routes on the core switches, also maybe change the net.ipv4.ip_forward on the host machine). I made the route network model to the name "network1", also the kvm manager have its default model, I do not have a try.

So, create the first new guest machine, with the installation from the http on our inside server, here, you should pay attention, at the time you entered the install url and the kickstart cfg file path http, first, the install url should be with a ".treeinfo" on the root dir directory(I saw the http error log file, so I know this). So, the installation were going on. But it was stopped with the blue window, I waited about 5minutes, it do not have a little action, so I used the key "ctrl+alt+F1 .. F4" to see the installtion log, I found that it could not fetch the file kickstart. No, it should not be this, It can get the installation files, if it couldn't get the installation file, what did the blue window comes from? But , after a little time to think about this, I knew that it should be two network model, first, while the kvm to start the guest machine, it uses the nat model , and after it took the process of install, it changed the network model to the one I had give it. So I added the missing network route, the staic route on the core switch. And it could work ok.

After the guest machine had the files to install the os, it was stopped at the time of partition the disk, and gave me a error notice with the backgroup color of red, "the disk sda do not fould,, such things", it let me know that the kickstart file was built for the dell R710 with two harddisk raid1 to install the os, so I made a change on the kickstart file, and comment the disk part configuration. So I crossed the problem.

The installating was going on. But this time, It was stopped with the software install window, and the software was libgnomeui with the summary "GNOME BASE GUI library", it let me think that may be it should disable the gui installation. Once again, I changed the kcikstart file and comment the "@gnome" and other gnome options. So the installation ware going on.

In fact, I put the installation with the gnome on the desktop with the test name "test5" and use the changed kickstart file with the test name "test6", also I had made another guest machine with the test name "test7" that did not use the kickstart file, so I could chose the options on the installation process.But , at last , the test6 was successfully installed the centos 5.5, also the test7 was not work(after a reboot, it was halt with Grub.... You know that.)

This article is written at the time of test6 successfully login in to the os.

没有评论:

发表评论