LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2013, 12:29 PM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Rep: Reputation: Disabled
How to do virtualization on CentOS?


I have a CentOS 6.4 computer and I want to run a multiplayer server on it however it does not work with Wine. I want to do virtualization on the Centos PC so it can run windows 7 or another type of windows and then so I can run the server in there.

What programs do I need? I do want a Client/UI.
 
Old 08-09-2013, 12:57 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
You have all the virtualization tools you need already there for you, as long as you're running on a 64bit platform using KVM. plenty of hits out there... https://www.google.co.uk/search?q=centos+virtualization this is a good start - http://www.linuxtopia.org/online_boo...irtualization/

essentially you can probably just fire up virt-manager and pretty much just start straight away.

Last edited by acid_kewpie; 08-09-2013 at 01:02 PM.
 
Old 08-09-2013, 01:01 PM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Get this guide and try:
http://www.centos.org/docs/5/pdf/Virtualization.pdf
 
Old 08-09-2013, 01:05 PM   #4
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
Whoa thanks for all of this guys. I will try! Wait a minute, does Windows XP support virtualization, no right?

Last edited by Altiris; 08-09-2013 at 05:09 PM.
 
Old 08-09-2013, 05:18 PM   #5
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
I am confused, do I follow the guides from CentOS or the one from RHEL? Also, what is better KVM or Xen. I read that Xen requires something in the kernel and also a hypervisor. I just want a simple virtual machine running Windows XP to run a server for a game (it's a small server). I'm not doing anything too important.
 
Old 08-09-2013, 08:17 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Centos is a free rebuild of RHEL, so they are essentially the same.
KVM is the 'newer' VM mgr than Xen, and RHEL (& Centos) dropped Xen at v5 ie you can get xen or KVM on (later versions) RHEL 5, KVM only on RHEL/Centos 6.x (recommended and 64 bit if possible).
Do read the links provided and possibly ask the Mods (via the Report button) to move this to the Virt & Cloud forum.
 
Old 08-09-2013, 10:23 PM   #7
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
I know CentOS aims to be 100% binary compatible and stuff but sometimes there are some features such as the Apache GUI or something that's RHEL only that's why I was asking. There are so many different guides I've read all of them but which should I follow?
 
Old 08-10-2013, 01:55 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
The sooner you stop caring about gui's the better. If any service is rated principally by being pretty and clicky, you're going to have a bad time.
 
Old 08-11-2013, 11:42 AM   #9
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
All GUIs you may need are available in CentOS as well as in RHEL. The only main difference between RHEL and CentOS is that CentOS doesn't come with the copyrighted RH things like names, pics, icons...
Start using http://wiki.centos.org/HowTos/KVM (it's for v5.x but works exactly same way in v6.x). If you absolutely need a GUI you may try webmin (I've tried it but am back to console only...).
Virt-manager is a nice GUI for the virtualization things and is you have seen e.g. Vmware workstation/player you might love it.
 
Old 08-12-2013, 04:15 PM   #10
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
Alright guys I need some help, I followed this guide one of you suggested http://www.howtoforge.com/virtualiza...tos-6.4-server everything went successfully until I am at the part where it says that I have to make a bridge. (Use ctrl F to search and type "configure a bridge".

I installed bridge-utils like it said (actually centos said it was already installed and is latest version). I also followed the setps of making a br0 text file in "/etc/sysconfig/network-scripts/". When I restart the network daemon the console gives me this FAILING error

Code:
Shutting down interface eth0:  Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting failed: This device is not active
                                                           [FAILED]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/13
state: activated
Connection activated
                                                           [  OK  ]
Bringing up interface br0:  Error: Connection activation failed: Failed to determine connection's virtual interface name
                                                           [FAILED]
This is my eth0 config
Code:
DEVICE="eth0"
BOOTPROTO=none
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="fa8c06c7-bd10-4ba1-b89c-a7699deae740"
HWADDR= I PUT THIS BLANK ONLY TO POST FOR SECURITY
IPADDR=192.168.12.137
PREFIX=24
GATEWAY=192.168.12.12
DNS1=127.0.0.1
DNS2=75.75.75.75
DOMAIN="dataglobe.com"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="System eth0"
LAST_CONNECT=1373901339
BRIDGE="br0"
This is my br0 config
Code:
DEVICE="br0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=192.168.12.137
PREFIX=24
GATEWAY=192.168.0.1
DNS1=75.75.75.75
DNS2=75.75.76.76
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System br0"

Last edited by Altiris; 08-12-2013 at 04:22 PM.
 
Old 08-13-2013, 03:50 AM   #11
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
try it simpler:

for /etc/sysconfig/network-scripts/ifcfg-br0:
Code:
DEVICE=br0
BOOTPROTO=none
ONBOOT=yes
DELAY=0
TYPE=Bridge
IP_ADDR=192.168.12.137
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=75.75.75.75
DNS2=75.75.76.76
for /etc/sysconfig/network-scripts/ifcfg-eth0:
Code:
NM_CONTROLLED="no"
ONBOOT=yes
HWADDR=B2:B5:3F:f5:D3:23
BRIDGE=br0
The key thing here is that eth0 does not get a IP addresses assigned to itself.
You may make it even more complex if you add e.g. a bond including eth0 and eth1 and assign this to the bridge.
 
Old 08-13-2013, 06:04 AM   #12
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 260

Rep: Reputation: 59
A very good and quick guide for virtualization with KVM on CentOS/RedHat is at

http://linux.dell.com/files/whitepap..._made_easy.pdf

KVM is great when used for servers without a GUI. I've not had great experience using it to run GUIs, whether Windows or even a light Linux distribution. For that, VirtualBox or VMware-player do a better job for me. Both are also free.

KVM though (just an impression, I have no benchmarks) seems to use fewer resources than the other two.
 
Old 08-13-2013, 11:48 AM   #13
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dt64 View Post
try it simpler:

for /etc/sysconfig/network-scripts/ifcfg-br0:
Code:
DEVICE=br0
BOOTPROTO=none
ONBOOT=yes
DELAY=0
TYPE=Bridge
IP_ADDR=192.168.12.137
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=75.75.75.75
DNS2=75.75.76.76
for /etc/sysconfig/network-scripts/ifcfg-eth0:
Code:
NM_CONTROLLED="no"
ONBOOT=yes
HWADDR=B2:B5:3F:f5:D3:23
BRIDGE=br0
The key thing here is that eth0 does not get a IP addresses assigned to itself.
You may make it even more complex if you add e.g. a bond including eth0 and eth1 and assign this to the bridge.
Hold on, I need eth0 to have a local static IP otherwise my FTP server, game servers, DNS etc. wont work. Or do I not assign eth0 a static because br0 will have it and then it will be bridged? In the guide both br0 and eth0 have an IP address assigned in their files. (I am confused).

I had a question about this, whether or not the br0 gets the same or different IP address as eth0 but you stated not to put any IP address for eth0, so that resolves the question I assume?

Last edited by Altiris; 08-13-2013 at 11:51 AM.
 
Old 08-13-2013, 06:33 PM   #14
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
Quote:
Originally Posted by Altiris View Post
Hold on, I need eth0 to have a local static IP otherwise my FTP server, game servers, DNS etc. wont work. Or do I not assign eth0 a static because br0 will have it and then it will be bridged? In the guide both br0 and eth0 have an IP address assigned in their files. (I am confused).

I had a question about this, whether or not the br0 gets the same or different IP address as eth0 but you stated not to put any IP address for eth0, so that resolves the question I assume?
That's correct. Eth0 doesn't get a IP, in this config all traffic goes via br0, even your FTP server etc.
 
Old 08-14-2013, 06:08 PM   #15
Altiris
Member
 
Registered: Mar 2013
Posts: 555

Original Poster
Rep: Reputation: Disabled
Ive discovered a problem, whenever I add BRIDGE=eth0 to the eth0 config file thats when everything or eth0 stops working. I tried it your way and my way (my way meaning I kept my default eth0 config but used your br0 config) and everything works, this is with leaving everything in the eth0 commented in the eth0 file. If I start commenting things out of the eth0 such as IP address etc then eth0 stps working which is normal because I havent bridged eth0 and br0. So basically, the problem is the BRIDGE=br0 command, whenever I do that everything gets messed up. I tried reinstalling the bridge-utils package and restarting my PC but I get the same problem. Any help?

Thanks for your help so far, the br0 config made it br0 work at least and show up in ifconfig.

Last edited by Altiris; 08-14-2013 at 06:17 PM.
 
  


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
CentOS 6.3 kvm Virtualization Equinoxx Linux - Virtualization and Cloud 13 12-12-2012 05:30 PM
LXer: Virtualization With Xen On CentOS 6.3 (x86_64) (Paravirtualization & Hardware Virtualization) LXer Syndicated Linux News 0 08-29-2012 05:40 AM
CentOS Virtualization louisb Linux - Virtualization and Cloud 1 07-17-2012 09:45 PM
CentOS 5 KVM virtualization danicg Linux - Newbie 1 08-19-2010 02:04 PM
CentOS distributions for Virtualization mjchin Linux - Server 3 04-16-2009 03:59 PM


All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration