9 月 062013
 

源码编译版本squid 3.3.8启动时message中的错误信息

[root@localhost etc]# ../sbin/squid
 Enter PEM pass phrase:
 [root@localhost etc]#
[root@localhost ~]# less /var/log/messages
 Sep  6 10:09:13 localhost (squid-1): No valid signing SSL certificate configured for https_port [::]:443

使用YUM安装的squid版本信息

[root@localhost ~]# rpm -q squid
 squid-3.1.10-18.el6_4.i686
 [root@localhost ~]#

在使用相同配置文件时squid的启动错误信息

[root@localhost ~]# less /var/log/squid/cache.log
 2013/09/06 10:41:40| Ignoring https_port [::]:443 due to SSL initialization failure.
[root@localhost ~]# less /var/log/messages
 Sep  5 13:35:55 localhost (squid): Cannot open HTTP Port
[root@localhost ~]# less /var/log/squid/cache.log
 2013/09/05 13:36:51| Failed to acquire SSL private key '/usr/local/squid/server.key': error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt

取消server.key的密码保护

[root@localhost ~]# openssl rsa -in server.key -out nserver.key
 Enter pass phrase for server.key:
 writing RSA key
 [root@localhost ~]#

修改squid.conf配置文件

https_port 443 accel cert=/usr/local/squid/server.pem key=/usr/local/squid/server.key defaultsite=hk.linuxcache.com vhost
 cache_peer 175.10.20.30 parent 80 0 no-query originserver name=my443
 acl hk_ssl dstdomain hk.linuxcache.com
 cache_peer_access my443 allow hk_ssl
 http_access allow hk_ssl
 http_access deny all

启动squid并查看监听端口80和443已启用

[root@localhost ~]# /usr/local/squid/sbin/squid
 [root@localhost ~]# netstat -ant
 Active Internet connections (servers and established)
 Proto Recv-Q Send-Q Local Address               Foreign Address             State
 tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
 tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN
 tcp        0      0 0.0.0.0:53852               0.0.0.0:*                   LISTEN
 tcp        0     52 192.168.111.134:22          192.168.111.1:55917         ESTABLISHED
 tcp        0      0 :::111                      :::*                        LISTEN
 tcp        0      0 :::80                       :::*                        LISTEN
 tcp        0      0 :::22                       :::*                        LISTEN
 tcp        0      0 :::443                      :::*                        LISTEN
 tcp        0      0 :::32863                    :::*                        LISTEN
 [root@localhost ~]#
9 月 052013
 

……

[root@localhost ~]# virt-install –name=RHEL –description=”RHEL 6″ \
> –os-type=linux –os-variant=rhel6 \
> –hvm –ram=1024  –vcpus=1 \
> –cdrom=/usr/local/src/CentOS-6.3-i386-minimal.iso \
> –disk=/var/lib/libvirt/images/rhel.img,size=8 \
> –network bridge=br0 \
> –graphics vnc,password=12345,listen=0.0.0.0,port=5901,keymap=us

Starting install…
Creating domain…                                       |    0 B     00:00
Cannot open display:
Run ‘virt-viewer –help’ to see a full list of available command line options
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[root@localhost ~]#

查看虚拟机图形接口已经监听5901端口
[root@localhost ~]# netstat -lunt |grep 5901
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN
[root@localhost ~]#

使用RealVNC Viewer 连接虚拟机输入密码后出现闪退的问题

kvm-vnc-install-01 kvm-vnc-install-02 kvm-vnc-install-03 kvm-vnc-install-04 kvm-vnc-install-05 kvm-vnc-install-06 kvm-vnc-install-07

9 月 052013
 

……

启动一个virt-install安装任务并使用参数确定配置

[root@localhost ~]# virt-install --name=CentOS --description="CenOS 6" \
 > --os-type=linux --os-variant=rhel6 \
 > --hvm --ram=1024  --vcpus=1 \
 > --cdrom=/var/lib/libvirt/images/CentOS-6.3-i386-minimal.iso \
 > --disk=/var/lib/libvirt/images/centos.img,size=8 \
 > --network bridge=virbr0 \
 > --graphics vnc,password=12345,port=5920,keymap=us

Starting install...
 Creating domain...                                       |    0 B     00:00
 Cannot open display:
 Run 'virt-viewer --help' to see a full list of available command line options
 Domain installation still in progress. You can reconnect to
 the console to complete the installation process.
 [root@localhost ~]#

查看图形接口的端口监听

[root@localhost ~]# netstat -lutn |grep 5920
 tcp        0      0 127.0.0.1:5920              0.0.0.0:*                   LISTEN
 [root@localhost ~]#

查看新建虚拟机实例的运行状态

[root@localhost ~]# virsh list
 Id    Name                           State
 ----------------------------------------------------
 1     CentOS                        running

[root@localhost ~]#

关于VNC的端口使用范围

VNC port must be a number between 5900 and 65535, or -1 for auto allocation

9 月 042013
 

libvirt的default虚拟网络不使用任何物理接口,仅使用NAT和IP包转发实现与外部网络通信

查看可用的虚拟网络

[root@localhost ~]# virsh net-list
 Name State Autostart Persistent
 --------------------------------------------------
 default active yes yes

停止一个虚拟网络

[root@localhost ~]# virsh net-destroy default
 Network default destroyed

[root@localhost ~]# virsh net-list
Name State Autostart Persistent
--------------------------------------------------

取消default网络定义

[root@localhost ~]# virsh net-undefine default
 Network default has been undefined

[root@localhost ~]#

查看default虚拟网络的定义文件

[root@localhost ~]# cat /usr/share/libvirt/networks/default.xml
<network>
<name>default</name>
<bridge name="virbr0" />
<forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254" />
    </dhcp>
  </ip>
</network>
[root@localhost ~]#

重新定义default(NAT模式)网络

[root@localhost ~]# virsh net-define /usr/share/libvirt/networks/default.xml
Network default defined from /usr/share/libvirt/networks/default.xml

[root@localhost ~]#

设置default网络为自动启动

[root@localhost ~]# virsh net-autostart default
 Network default marked as autostarted

[root@localhost ~]#

启用default网络

[root@localhost ~]# virsh net-start default
 Network default started

[root@localhost ~]# virsh net-list
 Name State Autostart Persistent
 --------------------------------------------------
 default active yes yes

[root@localhost ~]#

查看桥接设备列表信息

[root@localhost ~]# brctl show
 bridge name bridge id STP enabled interfaces
 virbr0 8000.525400102ed2 yes virbr0-nic
 [root@localhost ~]#

启用桥接接口br0并安装一个虚拟机后查看桥接设备列表信息

[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000b2f82148e no eth0
                         vnet0
virbr0 8000.525400102ed2 yes virbr0-nic
[root@localhost ~]#
9 月 032013
 

安装完毕虚拟化环境后新增了virbr0接口(NAT模式)

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:2F:82:14:8E
inet addr:192.168.1.151 Bcast:192.168.3.255 Mask:255.255.252.0
inet6 addr: fe80::20b:2fff:fe82:148e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:265 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24298 (23.7 KiB) TX bytes:6918 (6.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 52:54:00:C5:A5:7C
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@localhost ~]#

桥接功能的实现依赖于已安装的bridge-utils包

[root@localhost ~]# less install.log |grep bridge
Installing bridge-utils-1.2-9.el6.x86_64
[root@localhost ~]#

查看bridge-utils包描述信息

[root@localhost ~]# rpm -qi bridge-utils
Name : bridge-utils Relocations: (not relocatable)
Version : 1.2 Vendor: CentOS
Release : 10.el6 Build Date: Fri 22 Feb 2013 05:43:02 AM CST
Install Date: Mon 26 Aug 2013 03:29:18 AM CST Build Host: c6b9.bsys.dev.centos.org
Group : System Environment/Base Source RPM: bridge-utils-1.2-10.el6.src.rpm
Size : 58535 License: GPLv2+
Signature : RSA/SHA1, Sun 24 Feb 2013 01:38:20 AM CST, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : http://bridge.sourceforge.net/
Summary : Utilities for configuring the linux ethernet bridge
Description :
This package contains utilities for configuring the linux ethernet
bridge. The linux ethernet bridge can be used for connecting multiple
ethernet devices together. The connecting is fully transparent: hosts
connected to one ethernet device see hosts connected to the other
ethernet devices directly.

Install bridge-utils if you want to use the linux ethernet bridge.

[root@localhost ~]#

修改现有的eth0接口配置文件

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
 [root@localhost network-scripts]# vi ifcfg-eth0
 DEVICE="eth0"
 BOOTPROTO="static"
 HWADDR="00:0B:2F:82:14:8E"
 NM_CONTROLLED="yes"
 ONBOOT="yes"
 TYPE="Ethernet"
 UUID="a1dedea5-3dc4-483a-a53b-8e20071ca774"
 #IPADDR=192.168.1.151
 #PREFIX=22
 #GATEWAY=192.168.1.254
 #DNS1=8.8.8.8
 BRIDGE="br0"

新建桥接接口配置文件

[root@localhost network-scripts]# vi ifcfg-br0
 DEVICE="br0"
 BOOTPROTO="static"
 ONBOOT="yes"
 TYPE="Bridge"
 IPADDR=192.168.1.151
 PREFIX=22
 GATEWAY=192.168.1.254
 DNS1=202.96.128.86
 DNS2=202.96.134.33

重启网络服务(支持SSH远程操作)

[root@localhost network-scripts]# service network restart
 Shutting down interface eth0: bridge br0 does not exist!
 [ OK ]
 Shutting down loopback interface: [ OK ]
 Bringing up loopback interface: [ OK ]
 Bringing up interface eth0: [ OK ]
 Bringing up interface br0: [ OK ]
 [root@localhost network-scripts]#

查看已启用的网络接口
[root@localhost network-scripts]# ifconfig
br0 Link encap:Ethernet HWaddr 00:0B:2F:82:14:8E
inet addr:192.168.1.151 Bcast:192.168.3.255 Mask:255.255.252.0
inet6 addr: fe80::20b:2fff:fe82:148e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1658 errors:0 dropped:0 overruns:0 frame:0
TX packets:105 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:102856 (100.4 KiB) TX bytes:6466 (6.3 KiB)

eth0 Link encap:Ethernet HWaddr 00:0B:2F:82:14:8E
inet6 addr: fe80::20b:2fff:fe82:148e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5844 errors:0 dropped:0 overruns:0 frame:0
TX packets:628 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:481672 (470.3 KiB) TX bytes:70448 (68.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 52:54:00:C5:A5:7C
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@localhost network-scripts]#

9 月 022013
 

Usage: virt-install –name NAME –ram RAM STORAGE INSTALL [options]

Options:
–version             show program’s version number and exit
-h, –help            show this help message and exit
–connect=URI         Connect to hypervisor with libvirt URI

General Options:
-n NAME, –name=NAME
Name of the guest instance
-r MEMORY, –ram=MEMORY
Memory to allocate for guest instance in megabytes
–vcpus=VCPUS       Number of vcpus to configure for your guest. Ex:
–vcpus 5
–vcpus 5,maxcpus=10
–vcpus sockets=2,cores=4,threads=2
–cpuset=CPUSET     Set which physical CPUs domain can use.
–cpu=CPU           CPU model and features. Ex: –cpu coreduo,+x2apic
–description=DESCRIPTION
Human readable description of the VM to store in the
generated XML.
–security=SECURITY
Set domain security driver configuration.
–numatune=NUMATUNE
Tune NUMA policy for the domain process.

Installation Method Options:
-c CDROM, –cdrom=CDROM
CD-ROM installation media
-l LOCATION, –location=LOCATION
Installation source (eg, nfs:host:/path,
http://host/path, ftp://host/path)
–pxe               Boot from the network using the PXE protocol
–import            Build guest around an existing disk image
–init=INIT         Path to init binary for container guest. Ex:
–init /path/to/app (to contain an application)
–init /sbin/init (for a full OS container)
–livecd            Treat the CD-ROM media as a Live CD
-x EXTRA, –extra-args=EXTRA
Additional arguments to pass to the install kernel
booted from –location
–initrd-inject=INITRD_INJECTIONS
Add given file to root of initrd from –location
–os-type=DISTRO_TYPE
The OS type being installed, e.g. ‘linux’, ‘unix’,
‘windows’
–os-variant=DISTRO_VARIANT
The OS variant being installed guests, e.g. ‘fedora6’,
‘rhel5’, ‘solaris10’, ‘win2k’
–boot=BOOTOPTS     Optionally configure post-install boot order, menu,
permanent kernel boot, etc.

Storage Configuration:
–disk=DISKOPTS     Specify storage with various options. Ex.
–disk path=/my/existing/disk
–disk path=/my/new/disk,size=5 (in gigabytes)
–disk vol=poolname:volname,device=cdrom,bus=scsi,…
–nodisks           Don’t set up any disks for the guest.
–filesystem=FILESYSTEMS
Pass host directory to the guest. Ex:
–filesystem /my/source/dir,/dir/in/guest
–filesystem template_name,/,type=template

Networking Configuration:
-w NETWORK, –network=NETWORK
Configure a guest network interface. Ex:
–network bridge=mybr0
–network network=my_libvirt_virtual_net
–network network=mynet,model=virtio,mac=00:11…
–nonetworks        Don’t create network interfaces for the guest.

Graphics Configuration:
–graphics=GRAPHICS
Configure guest display settings. Ex:
–graphics vnc
–graphics spice,port=5901,tlsport=5902
–graphics none
–graphics vnc,password=foobar,port=5910,keymap=ja
–noautoconsole     Don’t automatically try to connect to the guest
console

Device Options:
–serial=SERIALS    Configure a guest serial device
–parallel=PARALLELS
Configure a guest parallel device
–channel=CHANNELS  Configure a guest communication channel
–console=CONSOLES  Configure a text console connection between the guest
and host
–host-device=HOSTDEVS
Configure physical host devices attached to the guest
–soundhw=SOUNDHW   Configure guest sound device emulation
–watchdog=WATCHDOG
Configure a guest watchdog device
–video=VIDEO       Configure guest video hardware.
–smartcard=SMARTCARD
Configure a guest smartcard device. Ex:
–smartcard mode=passthrough

Virtualization Platform Options:
-v, –hvm           This guest should be a fully virtualized guest
-p, –paravirt      This guest should be a paravirtualized guest
–container         This guest should be a container guest
–virt-type=HV_TYPE
Hypervisor name to use (kvm, qemu, xen, …)
–arch=ARCH         The CPU architecture to simulate
–machine=MACHINE   The machine type to emulate
–noapic            Disables APIC for fully virtualized guest (overrides
value in os-type/os-variant db)
–noacpi            Disables ACPI for fully virtualized guest (overrides
value in os-type/os-variant db)
-u UUID, –uuid=UUID
UUID for the guest.

选项

Miscellaneous Options:
 --autostart         Have domain autostart on host boot up.
 --print-xml         Print the generated domain XML rather than define the
 guest.
 --print-step=XMLSTEP
 Print XML of a specific install step (1, 2, 3, all)
 rather than define the guest.
 --noreboot          Don't boot guest after completing install.
 --wait=WAIT         Time to wait (in minutes)
 --dry-run           Run through install process, but do not create devices
 or define the guest.
 --force             Forces 'yes' for any applicable prompts, terminates
 for all others
 -q, --quiet         Suppress non-error output
 --prompt            Request user input for ambiguous situations or
 required options.
 -d, --debug         Print debugging information
9 月 022013
 

……

使用YUM安装虚拟化组和虚拟化客户端组软件包及其依赖软件包

[root@localhost ~]# yum groupinstall Virtualization "Virtualization Client"
Installing:
 hypervkvpd              x86_64 0-0.9.el6                         base     17 k
 python-virtinst         noarch 0.600.0-15.el6                    base    490 k
 qemu-kvm                x86_64 2:0.12.1.2-2.355.0.1.el6.centos.7 updates 1.3 M
 virt-manager            x86_64 0.9.0-18.el6                      base    1.0 M
 virt-top                x86_64 1.0.4-3.15.el6                    base    369 k
 virt-viewer             x86_64 0.5.2-18.el6_4.2                  updates 200 k

已安装的python-virtinst软件包包含以下路径的可执行命令
/usr/bin/virt-clone
/usr/bin/virt-convert
/usr/bin/virt-image
/usr/bin/virt-install
已安装的python-virtinst软件包包含以下路径的可执行命令
/usr/bin/virt-manager
已安装的virt-top软件包包含以下路径的可执行命令
/usr/bin/virt-top
已安装的virt-viewer软件包包含以下路径的可执行命令
/usr/bin/remote-viewer
/usr/bin/virt-viewer
已安装的libvirt-client(同时也是libvirt依赖)软件包包含以下路径的可执行命令
/usr/bin/virsh

Virtualization Client中的包依赖于Virtualization Platform中的libvirt

[root@localhost ~]# yum info libvirt
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Available Packages
Name        : libvirt
Arch        : x86_64
Version     : 0.10.2
Release     : 18.el6_4.9
Size        : 2.3 M
Repo        : updates
Summary     : Library providing a simple virtualization API
URL         : http://libvirt.org/
License     : LGPLv2+
Description : Libvirt is a C toolkit to interact with the virtualization
: capabilities of recent versions of Linux (and other OSes). The
: main package includes the libvirtd server exporting the
: virtualization support.

安装libvirtr及其相关依赖软件包

[root@localhost ~]# yum install libvirt

Installing:
libvirt               x86_64 0.10.2-18.el6_4.9                   updates 2.3 M
Installing for dependencies:
ConsoleKit            x86_64 0.4.1-3.el6                         base     82 k
ConsoleKit-libs       x86_64 0.4.1-3.el6                         base     17 k
augeas-libs           x86_64 0.9.0-4.el6                         base    317 k
avahi-libs            x86_64 0.6.25-12.el6                       base     54 k
cvs                   x86_64 1.11.23-15.el6                      base    711 k
cyrus-sasl-md5        x86_64 2.1.23-13.el6_3.1                   base     47 k
dbus                  x86_64 1:1.2.24-7.el6_3                    base    207 k
dmidecode             x86_64 1:2.11-2.el6                        base     71 k
dnsmasq               x86_64 2.48-13.el6                         base    149 k
ebtables              x86_64 2.0.9-6.el6                         base     95 k
eggdbus               x86_64 0.6-3.el6                           base     91 k
gettext               x86_64 0.17-16.el6                         base    1.8 M
gnutls                x86_64 2.8.5-10.el6_4.2                    updates 346 k
gnutls-utils          x86_64 2.8.5-10.el6_4.2                    updates 100 k
hal                   x86_64 0.5.14-11.el6                       base    375 k
hal-info              noarch 20090716-3.1.el6                    base     56 k
hal-libs              x86_64 0.5.14-11.el6                       base     69 k
hdparm                x86_64 9.16-3.4.el6                        base     72 k
keyutils              x86_64 1.4-4.el6                           base     39 k
libcgroup             x86_64 0.37-7.2.el6_4                      updates 111 k
libevent              x86_64 1.4.13-4.el6                        base     66 k
libgomp               x86_64 4.4.7-3.el6                         base    118 k
libgssglue            x86_64 0.1-11.el6                          base     23 k
libnl                 x86_64 1.1.4-1.el6_4                       updates 121 k
libpcap               x86_64 14:1.0.0-6.20091201git117cb5.el6    base    126 k
libtasn1              x86_64 2.3-3.el6_2.1                       base    238 k
libtirpc              x86_64 0.2.1-6.el6_4                       updates  78 k
libusb1               x86_64 1.0.9-0.6.rc1.el6                   base     80 k
libvirt-client        x86_64 0.10.2-18.el6_4.9                   updates 4.0 M
libxslt               x86_64 1.1.26-2.el6_3.1                    base    452 k
lzo                   x86_64 2.03-3.1.el6                        base     55 k
lzop                  x86_64 1.02-0.9.rc1.el6                    base     50 k
nc                    x86_64 1.84-22.el6                         base     57 k
netcf-libs            x86_64 0.1.9-3.el6                         base     51 k
nfs-utils             x86_64 1:1.2.3-36.el6                      base    319 k
nfs-utils-lib         x86_64 1.1.5-6.el6                         base     67 k
numactl               x86_64 2.0.7-6.el6                         base     69 k
numad                 x86_64 0.5-8.20121015git.el6               base     27 k
parted                x86_64 2.1-19.el6                          base    606 k
perl                  x86_64 4:5.10.1-131.el6_4                  updates  10 M
perl-Module-Pluggable x86_64 1:3.90-131.el6_4                    updates  39 k
perl-Pod-Escapes      x86_64 1:1.04-131.el6_4                    updates  31 k
perl-Pod-Simple       x86_64 1:3.13-131.el6_4                    updates 211 k
perl-libs             x86_64 4:5.10.1-131.el6_4                  updates 577 k
perl-version          x86_64 3:0.77-131.el6_4                    updates  50 k
pm-utils              x86_64 1.2.5-10.el6                        base    108 k
polkit                x86_64 0.96-2.el6_0.1                      base    158 k
qemu-img              x86_64 2:0.12.1.2-2.355.0.1.el6.centos.7   updates 472 k
radvd                 x86_64 1.6-1.el6                           base     75 k
rpcbind               x86_64 0.2.0-11.el6                        base     51 k
usbredir              x86_64 0.5.1-1.el6                         base     40 k
xz                    x86_64 4.999.9-0.3.beta.20091007git.el6    base    137 k
yajl                  x86_64 1.0.7-3.el6                         base     27 k

安装后,libvirt相关服务默认未启动,重启系统后自动运行

[root@localhost ~]# service libvirtd status
libvirtd (pid  1553) is running…
[root@localhost ~]# service libvirt-guests status
started
[root@localhost ~]# service hypervkvpd status
hv_kvp_daemon (pid 1506) is running…
[root@localhost ~]#

9 月 022013
 

查看可用的软件包分组列表
[root@localhost ~]# yum grouplist
Loaded plugins: fastestmirror, presto
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Installed Groups:
FCoE Storage Client
Network file system client
Scalable Filesystems
Storage Availability Tools
iSCSI Storage Client
Available Groups:
Additional Development
Backup Client
Backup Server
Base
CIFS file server
Client management tools
Compatibility libraries
Console internet tools
Debugging Tools
Desktop
Desktop Debugging and Performance Tools
Desktop Platform
Desktop Platform Development
Development tools
Dial-up Networking Support
Directory Client
Directory Server
E-mail server
Eclipse
Emacs
FTP server
Fonts
General Purpose Desktop
Graphical Administration Tools
Graphics Creation Tools
Hardware monitoring utilities
High Availability
High Availability Management
Identity Management Server
Infiniband Support
Input Methods
Internet Applications
Internet Browser
Java Platform
KDE Desktop
Large Systems Performance
Legacy UNIX compatibility
Legacy X Window System compatibility
Load Balancer
Mainframe Access
Messaging Client Support
MySQL Database client
MySQL Database server
NFS file server
Network Infrastructure Server
Network Storage Server
Networking Tools
Office Suite and Productivity
PHP Support
Performance Tools
Perl Support
PostgreSQL Database client
PostgreSQL Database server
Print Server
Printing client
Remote Desktop Clients
Resilient Storage
Ruby Support
SNMP Support
Scientific support
Security Tools
Server Platform
Server Platform Development
Smart card support
System Management
System administration tools
Systems Management Messaging Server support
TeX support
Technical Writing
TurboGears application framework
Virtualization
Virtualization Client
Virtualization Platform
Virtualization Tools
Web Server
Web Servlet Engine
Web-Based Enterprise Management
X Window System
Available Language Groups:
Afrikaans Support [af]
Albanian Support [sq]
Amazigh Support [ber]
Arabic Support [ar]
Armenian Support [hy]
Assamese Support [as]
Azerbaijani Support [az]
Basque Support [eu]
Belarusian Support [be]
Bengali Support [bn]
Bhutanese Support [dz]
Brazilian Portuguese Support [pt_BR]
Breton Support [br]
Bulgarian Support [bg]
Catalan Support [ca]
Chhattisgarhi Support [hne]
Chichewa Support [ny]
Chinese Support [zh]
Coptic Support [cop]
Croatian Support [hr]
Czech Support [cs]
Danish Support [da]
Dutch Support [nl]
English (UK) Support [en_GB]
Esperanto Support [eo]
Estonian Support [et]
Ethiopic Support [am]
Faroese Support [fo]
Fijian Support [fj]
Filipino Support [fil]
Finnish Support [fi]
French Support [fr]
Frisian Support [fy]
Friulian Support [fur]
Gaelic Support [gd]
Galician Support [gl]
Georgian Support [ka]
German Support [de]
Greek Support [el]
Gujarati Support [gu]
Hebrew Support [he]
Hiligaynon Support [hil]
Hindi Support [hi]
Hungarian Support [hu]
Icelandic Support [is]
Indonesian Support [id]
Interlingua Support [ia]
Inuktitut Support [iu]
Irish Support [ga]
Italian Support [it]
Japanese Support [ja]
Kannada Support [kn]
Kashmiri Support [ks]
Kashubian Support [csb]
Kazakh Support [kk]
Khmer Support [km]
Kinyarwanda Support [rw]
Konkani Support [kok]
Korean Support [ko]
Kurdish Support [ku]
Lao Support [lo]
Latin Support [la]
Latvian Support [lv]
Lithuanian Support [lt]
Low Saxon Support [nds]
Luxembourgish Support [lb]
Macedonian Support [mk]
Maithili Support [mai]
Malagasy Support [mg]
Malay Support [ms]
Malayalam Support [ml]
Maltese Support [mt]
Manx Support [gv]
Maori Support [mi]
Marathi Support [mr]
Mongolian Support [mn]
Myanmar (Burmese) Support [my]
Nepali Support [ne]
Northern Sotho Support [nso]
Norwegian Support [nb]
Occitan Support [oc]
Oriya Support [or]
Persian Support [fa]
Polish Support [pl]
Portuguese Support [pt]
Punjabi Support [pa]
Romanian Support [ro]
Russian Support [ru]
Sanskrit Support [sa]
Sardinian Support [sc]
Serbian Support [sr]
Sindhi Support [sd]
Sinhala Support [si]
Slovak Support [sk]
Slovenian Support [sl]
Somali Support [so]
Southern Ndebele Support [nr]
Southern Sotho Support [st]
Spanish Support [es]
Swahili Support [sw]
Swati Support [ss]
Swedish Support [sv]
Tagalog Support [tl]
Tajik Support [tg]
Tamil Support [ta]
Telugu Support [te]
Tetum Support [tet]
Thai Support [th]
Tibetan Support [bo]
Tsonga Support [ts]
Tswana Support [tn]
Turkish Support [tr]
Turkmen Support [tk]
Ukrainian Support [uk]
Upper Sorbian Support [hsb]
Urdu Support [ur]
Uzbek Support [uz]
Venda Support [ve]
Vietnamese Support [vi]
Walloon Support [wa]
Welsh Support [cy]
Xhosa Support [xh]
Zulu Support [zu]

查看与虚拟化有关的四个软件包分组的详细信息

基础虚拟化环境安装

[root@localhost ~]# yum groupinfo Virtualization
Loaded plugins: fastestmirror, presto
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirror.esocc.com
* extras: mirror.esocc.com
* updates: mirror.esocc.com

Group: Virtualization
Description: Provides an environment for hosting virtualized guests.
Mandatory Packages:
qemu-kvm
Default Packages:
hypervkvpd
Optional Packages:
qemu-guest-agent
qemu-kvm-tools
[root@localhost ~]#

用于安装和维护虚拟机实例的客户端工具

[root@localhost ~]# yum groupinfo “Virtualization Client”
Loaded plugins: fastestmirror, presto
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net

Group: Virtualization Client
Description: Clients for installing and managing virtualization instances.
Mandatory Packages:
python-virtinst
virt-manager
virt-viewer
Default Packages:
virt-top
[root@localhost ~]#

虚拟机访问控制接口

[root@localhost ~]# yum groupinfo “Virtualization Platform”
Loaded plugins: fastestmirror, presto
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirror.esocc.com
* extras: mirror.esocc.com
* updates: mirror.esocc.com

Group: Virtualization Platform
Description: Provides an interface for accessing and controlling virtualized guests and containers.
Mandatory Packages:
libvirt
libvirt-client
virt-who
Optional Packages:
fence-virtd-libvirt
fence-virtd-multicast
fence-virtd-serial
libvirt-cim
libvirt-java
libvirt-snmp
perl-Sys-Virt
[root@localhost ~]#

离线虚拟化镜像工具

[root@localhost ~]# yum groupinfo “Virtualization Tools”
Loaded plugins: fastestmirror, presto
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirror.esocc.com
* extras: mirror.esocc.com
* updates: mirror.esocc.com

Group: Virtualization Tools
Description: Tools for offline virtual image management.
Default Packages:
libguestfs
Optional Packages:
libguestfs-java
libguestfs-tools
virt-v2v
[root@localhost ~]#

查看软件包组中包含的某一个软件包的详细信息

[root@localhost ~]# yum info hypervkvpd
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Available Packages
Name        : hypervkvpd
Arch        : x86_64
Version     : 0
Release     : 0.9.el6
Size        : 17 k
Repo        : base
Summary     : HyperV key value pair (KVP) daemon
URL         : http://www.kernel.org
License     : GPLv2
Description : Hypervkvpd is an implementation of HyperV key value pair (KVP)
: functionality for Linux.

[root@localhost ~]#