Managing Multiple KVM Hosts With Enomalism2 [Ubuntu 8.10]
|
Submitted by falko (Contact Author) (Forums) on Tue, 2009-04-21 16:38. :: KVM | Ubuntu | Virtualization
Managing Multiple KVM Hosts With Enomalism2 [Ubuntu 8.10]Version 1.0 In my previous guide about how to set up Enomalism2 on Ubuntu 8.10 I concentrated on just one KVM host. This tutorial is an extension to that article in that it shows how to add further Ubuntu 8.10 KVM hosts to the setup that can then be managed from one single control panel. I have tested this with two Ubuntu 8.10 hosts (both x86_64). I can't say anything whether this also works on i386 systems because I haven't tested it. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm using two Ubuntu 8.10 servers here as my KVM hosts:
The servers are located in a private network with a DHCP server (on the router, IP 192.168.0.1). Enomalism usage might be different if you use it in a public network. I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root: sudo su Please check if your CPU supports hardware virtualization - if this is the case, the command egrep '(vmx|svm)' --color=always /proc/cpuinfo should display something, e.g. like this: root@server1:~# egrep '(vmx|svm)' --color=always /proc/cpuinfo If nothing is displayed, then your processor doesn't support hardware virtualization, and you must stop here. server1 will be the "master" in this setup and server2 the "slave", i.e., server2 will use the MySQL database on server1 and the directory /opt/enomalism2/repo (via NFS). (Of course, it's also possible to create a dedicated NFS server and export /opt/enomalism2/repo to both nodes.)
2 Setup On server1server1: server1 must be set up according to page 1 of this tutorial: KVM Virtualization With Enomalism 2 On An Ubuntu 8.10 Server After you've set up Enomalism2, we must edit /etc/mysql/my.cnf so that MySQL listens on all interfaces (so that server2 can connect to this MySQL server later on) - comment out the line bind-address = 127.0.0.1: vi /etc/mysql/my.cnf
Then we restart MySQL: /etc/init.d/mysql restart Now check that networking is enabled. Run netstat -tap | grep mysql The output should look like this: root@server1:~# netstat -tap | grep mysql Then we connect to MySQL... mysql -u root -p ... and create a database user that is allowed to connect to the enomalism2 database remotely (use the same database user and password that you used in the scripts/init-db.sh step when you set up Enomalism2): grant all on enomalism2.* to enomalism@'%' identified by 'enomalismpassword'; To install an NFS server, we run: aptitude install nfs-kernel-server nfs-common portmap We must export the /opt/enomalism2/repo directory. We must modify /etc/exports where we "export" our NFS shares. We specify /opt/enomalism2/repo as NFS share and tell NFS to make accesses to /opt/enomalism2/repo as root (to learn more about /etc/exports, its format and available options, take a look at man 5 exports ) vi /etc/exports
(The no_root_squash option makes that /opt/enomalism2/repo will be accessed as root.) Whenever we modify /etc/exports, we must run exportfs -a afterwards to make the changes effective.
|



Recent comments
10 hours 19 min ago
21 hours 32 min ago
1 day 3 hours ago
1 day 21 hours ago
1 day 23 hours ago
1 day 23 hours ago
2 days 3 hours ago
2 days 3 hours ago
2 days 19 hours ago
2 days 20 hours ago