Messages in cipher reflected in the looking glass

http://blogs.sun.com/thaniwa/date/20080111 2008年 1月 11日 金曜日

(EN) Running CentOS 5.1 on Soalris xvm

I tried and success to install and run CentOS 5.1 on Solaris xvm/xen.
So, I wrote logs.
I also try to install Fedora 8 onto Solaris xvm, but I got errors when installing Fedora 8 with virt-install command. virt-install seems not to support Fedora 8.

Making A Image File of CentOS

Before installing CentOS, you have to prepare servers, nfs server or http server or ftp server. And copy all files in CentOS DVD image into [nfs, http, ftp] server's directory. In this content, I used nfs server(nfs_server:/export2/soft/CentOS).
The reason of prepairing server, virt-install command, which command is used when making guest OS images, can boot from DVD iso image of linux, but installer(up by virt-install) cannot load rpm files of DVD images. Therefore, server is needed to make guest OS images.

Use virt-install command to make guest OS images.
The parameters of this test is as follows.

  • Virtual Machine Name = centos5
  • Memory for VM = 512MB
  • Image File of guest OS = /export/centos5
  • Disk size of Image File = 4GB
  • Graphics Support = no
    *** If you want to install linux, you have to set this parameter no .
    Reference : http://in.opensolaris.org/jive/thread.jspa?threadID=45427&tstart=45
  • Installer Image = nfs:nfs_server:/export2/soft/CentOS

The execution sample is as follows.

bash-3.2# virt-install
What is the name of your virtual machine? centos5
 How much RAM should be allocated (in megabytes)? 512
 What would you like to use as the disk (path)? /export/centos5
 How large would you like the disk (/export/centos5) to be (in gigabytes)? 4
 Would you like to enable graphics support? (yes or no) no
 What is the install location? nfs:nfs_server:/export2/soft/CentOS


Starting install...
Creating storage file...  100% |=========================| 4.0 GB    00:00
Creating domain...                                                 0 B 00:16
Linux version 2.6.18-53.el5xen (mockbuild@builder6.centos.org) (gcc version 4.1.
2 20070626 (Red Hat 4.1.2-14)) #1 SMP Mon Nov 12 03:26:12 EST 2007
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000020800000 (usable)
0MB HIGHMEM available.

After setting parameters, virt-install load text installer as follows.

Welcome to CentOS

                   +---------+ Choose a Language +---------+
                   |                                       |
                   | What language would you like to use   |
                   | during the installation process?      |
                   |                                       |
                   |       Catalan                ^        |
                   |       Chinese(Simplified)    :        |
                   |       Chinese(Traditional)   #        |
                   |       Croatian               :        |
                   |       Czech                  :        |
                   |       Danish                 :        |
                   |       Dutch                  :        |
                   |       English                v        |
                   |                                       |
                   |                +----+                 |
                   |                | OK |                 |
                   |                +----+                 |
                   |                                       |
                   |                                       |
                   +---------------------------------------+

  <Tab>/<Alt-Tab> between elements  | <Space> selects | <F12> next screen

Select options and Install CentOS. After installation, a virtual machine reboot and appear menus.
In this menu you can set security options, SELinux and Firewall. If you want to test easily, please set disable these options. CentOS offers "system-config-securitylevel" to change security level parameters, so you can change settings later when you set enable these parameters.

xm command

xm is a command to operate virtual machines on xvm/xen.
At least, you sould know list, start, shutdown and console options to use virtual machine.

# xm start centos5

# xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0   484     1     r-----    527.1
centos5                                    6   512     1     -b----     47.6

# xm console centos5
.....
CentOS release 5 (Final)
Kernel 2.6.18-53.el5xen on an i686

localhost.localdomain login:

Use X of CentOS

In default, Solaris express is not permit remote connections of X application. To change it, use svccfg command as follows.

bash-3.2# svccfg -s x11-server listprop
options                                  application
options/default_depth                    integer  24
options/server                           astring  /usr/X11/bin/Xorg
options/server_args                      astring
options/stability                        astring  Evolving
options/value_authorization              astring  solaris.smf.manage.x11
options/tcp_listen                       boolean  false
.....

bash-3.2# svccfg -s x11-server setprop options/tcp_listen = true
svc:/application/x11/x11-server

After changed, please re-start X server.
To use X application of CentOS, set DISPLAY enviromnent variable on CentOS side and run xhost command on Solaris.

# xhost + centos (on Solaris side)


# export DISPLAY=solaris:0 (on CentOS side)

Run gdm of CentOS via Xnest

The following logs are set up to use gdm of CentOS via Xnest.

At first, set parameter in /etc/gdm/custom.conf file to be able to connect gdm via network.
Red charactors in the following are added settings.
AllowRemoteRoot=true is not needed, if you do not want to log into CentOS by root user.

[daemon]
RemoteGreeter=/usr/libexec/gdmgreeter

[security]
AllowRemoteRoot=true

[xdmcp]
Enable=true

If you are using firewall, you have to change to be able to connect XDMCP(177/UDP) from other machine.

In default, CentOS run on console mode. If you want to run graphical user interface mode on default, change /etc/inittab .

[root@localhost sbin]# runlevel
N 3

[root@localhost sbin]# cat /etc/inittab
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, 
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

Of course, you can change to graphical user mode using init command.

[root@localhost sbin]# ps -ef | grep gdm

[root@localhost sbin]# init 5
[root@localhost sbin]# Intel CPU マイクロコードアップデートを適用中: [失敗]
Starting monitoring for VG VolGroup00:   2 logical volume(s) in volume group "Vo
lGroup00" monitored
[  OK  ]
readahead をバックグランドで起動中: [  OK  ]
irqbalance を起動中: [  OK  ]
anacron を起動中: [  OK  ]
readahead をバックグランドで起動中: [  OK  ]

[root@localhost sbin]# ps -ef | grep gdm
root      2231     1  0 20:29 ?        00:00:00 /usr/sbin/gdm-binary -nodaemon
root      2260     1  0 20:29 ?        00:00:00 /usr/sbin/gdm-binary -nodaemon
root      2338  1968  0 20:30 xvc0     00:00:00 grep gdm

After up gdm, you can use with Xnest as follows.

# Xnest :1 -query centos

These are screenshots of running CentOS 5.1 on Solaris Express xvm/xen, and connecting CentOS 5.1 via Xnest.




投稿されたコメント:

Yes, Fedora 8 doesn't work with the current version of virt-install, just like RHEL5.1. The newest versions understand the layout of the install directories, but we've not upgraded to that version yet.

Posted by John Levon on 1月月 13日, 2008年 at 12:31 午後 JST #

I think that there is a possibility that RHEL can be installed, because CentOS 5.1 is clone of RHEL 5.1.
Though the installer might sometimes freeze.
(I got this trouble few times in installation of CentOS 5.1).

Thanks,

Posted by Yasuhiro Fujitsuki(thaniwa) on 1月月 14日, 2008年 at 10:11 午前 JST #

コメント
コメントは無効になっています。