On this tutorial, we will go through brief instruction from Karesansui installation (using packages), to boot guest.
Use CentOS 5.5 or later to create host environment.
Just do usual installation, but be careful of the points below.
(Required) On software setup, check "Virtualization", "KVM".
(Not required but encouraged) Use LVM. It's easy to add storage in future. (It will be LVM-ready if you use the default partition offered by the installer)
Karesansui requires the following packages. Please make sure that these packages are installed.
# rpm -e --nodeps kvm-qemu-img
Download the newest release from the Download Page.
Installing Karesansui is very easy.
The installation steps will be as follow:
# tar xzvf karesansui-2.0.1-install-pack.tar.gz # cd Karesansui # ./karesansui-install
Here is the detailed instructions.
Press 'OK' button to display the next page.
Setting up Karesansui administrator account.
| Hostname | Specify FQDN of this Host OS |
| Mail address | Specify administrator's e-mail address. Requires this password at login. |
| Password | Specify administrator's password. Requires this password at login. |
| Password (again) | Specify the same password as 'Password' for confirmation |
| Language | Select the display languages of Karesansui. |
Setting up TLS certificates for libvirt remote SSL connection.
| Country | Specify country ISO 2 letter code |
| State or Province Name | Specify your state or province name |
| Locality Name | Specify your location (e.g. town) |
| Origanization Name | Specify your organization (e.g. company name) |
| Common Name | Specify FQDN of this Host OS |
| Initialize SSL certificates settings? | If you want to initialize SSL keys and certificates, check the checkbox. |
Setting up Karesansui database.
In case of using MySQL or PostgreSQL as database, you need to create a database for Karesansui in advance and make sure to connect the database.
| Database path | Specify the path of database for Karesansui |
| Database pysilhouette path | Specify the path database for pysilhouette job management daemon |
| Initialize database | If you want to initialize database, check the checkbox. |
| MySQL | mysql://username:password@hostname/database?charset=utf8 |
| PostgreSQL | pgsql://username:password@hostname/database |
| SQLite | sqlite:////var/opt/karesansui/karesansui.db |
Setting up a proxy connection to the Internet.
| Use Proxy | If you want to use proxy at all, check the checkbox. |
| Hostname | Specify the hostname of proxy server |
| Port Number | Specify the port number of proxy server |
| Username | Specify the username for authentication on a proxy server |
| Password | Specify the password for authentication on a proxy server |
| Password (again) | Input the same password as 'Password' for confirmation |
Setting up SMTP connection to send e-mail.
| Hostname | Specify the hostname of SMTP server |
| Port Number | Specify the port number of SMTP server |
Press 'OK' button to proceed installation, then the software installation will start.
Press 'Back' or 'Cancel' to abort installation.
When the installation process has finished successfully, messages will be displayed as follow.
If an error occurred and installation failed, error messages will be displayed.
See log file for further details to resolve errors. Then please install again.
Done. You can now login through following url. Your login credential is 'taizo@karesansui-project.info'. https://karesansui.example.com/karesansui/v2/ http://karesansui.example.com/karesansui/v2/ See '/root/karesansui-install.log' for detail.In the case that the KVM hypervisor is running on your machine, network device configuration files will be modified by installer. So you need to reload network.
# /etc/init.d/network restart
Try the URL displayed on the "Finish" screen (like "https://{hostname}/karesansui/v2/").
Please input e-mail address and password in user authentication dialog, then login to the Management Console.
If you see the screen like this, then the installation had all succeeded.
Here is an example of installing CentOS 5.5(i386) to guest.
We describe two ways to do that.
http://<Web site name>/centos/5/os/i386/ ftp://<FTP site name>/Linux/centos/5/os/i386/
# rpm -q vsftpd 2>/dev/null || yum -y install vsftpd # /etc/init.d/vsftpd restart # mount /dev/cdrom /var/ftp/pubCheck to be sure that you can login to localhost as AnonymousFTP user.
# ftp localhost Connected to localhost (127.0.0.1). 220 (vsFTPd 2.0.5) Name (localhost:root): ftp 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> quitIf you fail to login, SELinux may work.
# echo 0 >/selinux/enforce
In the case that the KVM hypervisor is running on your machine, you can install from CD-ROM ISO image.
If you doesn't have CD-ROM ISO image but DVD-ROM, 'dd' command can create CD-ROM ISO image.# dd if=/dev/cdrom of=/iso/centos55-i386.iso dd: reading `/dev/cdrom': Input/output error 269860+0 records in 269860+0 records out
First, please click the host icon image on top window.
And click the 'Create' in 'Guests' tab, then 'Create guest' window as follow will be displayed.
Here we describe the ways to specify values for each item.
| Kernel image | the URL of CentOS 5.5's kernel image path (ex: case of Xen=>'ftp://ftp.example.com/Linux/centos/5/os/i386/images/xen/vmlinuz', case of KVM=>'ftp://ftp.example.com/Linux/centos/5/os/i386/isolinux/vmlinuz') |
| initrd image | the URL of CentOS 5.5's initrd image path (ex: case of Xen=>'ftp://ftp.example.com/Linux/centos/5/os/i386/images/xen/initrd.img', case of KVM=>'ftp://ftp.example.com/Linux/centos/5/os/i386/isolinux/initrd.img') |
As for other items, you can see the details clicking "?" displayed at the right of each item.
| Kernel image | case of Xen=>'/var/ftp/pub/images/xen/vmlinuz', case of KVM=>'/var/ftp/pub/isolinux/vmlinuz' |
| initrd image | case of Xen=>'/var/ftp/pub/images/xen/initrd.img', case of KVM=>'/var/ftp/pub/isolinux/initrd.img' |
As for other items, you can see the details clicking "?" displayed at the right of each item.
Fill up all items, please click the "Create" button at the bottom of "Create guest" window.
Then, the message that the creation job is accepted will be displayed.
So the icon image that stands for new guest will appear in "Guests" window.
Please click the new guest icon, and then click the "Console" tab.
The console window of guest will be displayed. In this window, you can install CentOS 5.5 into guest as into real machine.
In the guest installation,
| Web site name | Web site name that provides OS image |
| CentOS directory | image path on this site(ex: /Linux/centos/5/os/i386) |
| FTP site name | FTP site name that provides OS image |
| CentOS directory | image path on this site(ex: /Linux/centos/5/os/i386) |
In the guest installation,
| FTP site name | IP address of host (NOT loopback address) |
| CentOS directory | /pub/ |
This is the end of the tutorial. You can now do basic operation about virtualization.
# rpm -q acpid 2>/dev/null || yum -y install acpid # /sbin/service haldaemon stop # /sbin/service apcid restart # /sbin/chkconfig apcid on # /sbin/service haldaemon start