今回の機器

今回インストールしたのは下記参考リンクの機器。

初AMDマシンとなるので、コンパイルオプションの指定等勝手がわからない。

kernel設定

今回は3.8.13-gentoo。

大事そうなとこだけ抜き出す。

使用用途はサーバで、ほとんどCUIでしか操作しないため、GUI、サウンド関連は要らない。

Processor type and features --- Paravirtualized guest support

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          --- Paravirtualized guest support                                                │ │
  │ │          [ ]   Paravirtual steal time accounting                                          │ │
  │ │          [ ]   Xen guest support                                                          │ │
  │ │          [*]   KVM Guest support (including kvmclock)                                     │ │
  │ │          -*-   Enable paravirtualization code                                             │ │
  │ │          [*]     Paravirtualization layer for spinlocks                                   │ │

Generic Driver Options

Maintain ~のところにチェックが入っていないと立ち上がらない。

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          (/sbin/hotplug) path to uevent helper                                            │ │
  │ │          [*] Maintain a devtmpfs filesystem to mount at /dev                              │ │
  │ │          [ ]   Automount devtmpfs at /dev, after the kernel mounted the rootfs            │ │
  │ │          [*] Select only drivers that don't need compile-time external firmware           │ │

Network device support

bonding、KVMに必要なtapと、今後hostapdを導入して無線APとしても動作させるため、Wirelessもチェックしている。

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          --- Network device support                                                       │ │
  │ │          [*]   Network core driver support                                                │ │
  │ │          <*>     Bonding driver support                                                   │ │
  │ │          < >     Dummy net driver support                                                 │ │
  │ │          < >     EQL (serial line load balancing) support                                 │ │
  │ │          [ ]     Fibre Channel driver support                                             │ │
  │ │          < >     Generic Media Independent Interface device support                       │ │
  │ │          < >     Ethernet team driver support (EXPERIMENTAL)  -- >                        │ │
  │ │          < >     MAC-VLAN support (EXPERIMENTAL)                                          │ │
  │ │          < >     Virtual eXtensible Local Area Network (VXLAN)                            │ │
  │ │          <*>     Network console logging support                                          │ │
  │ │          [ ]     Netpoll traffic trapping                                                 │ │
  │ │          <M>     Universal TUN/TAP device driver support                                  │ │
  │ │          < >     Virtual ethernet pair device                                             │ │
  │ │          < >   ARCnet support  -- >                                                       │ │
  │ │                    CAIF transport drivers                                                 │ │
  │ │                Distributed Switch Architecture drivers  -- >                              │ │
  │ │          [*]   Ethernet driver support  -- >                                              │ │
  │ │          < >   FDDI driver support                                                        │ │
  │ │          [ ]   HIPPI driver support (EXPERIMENTAL)                                        │ │
  │ │          < >   General Instruments Surfboard 1000                                         │ │
  │ │          -*-   PHY Device support and infrastructure  -- >                                │ │
  │ │          < >   PPP (point-to-point protocol) support                                      │ │
  │ │          < >   SLIP (serial line) support                                                 │ │
  │ │                USB Network Adapters  -- >                                                 │ │
  │ │          [*]   Wireless LAN  -- >                                                         │ │

Ethernet driver support

今回はオンボードがBroadcom、追加NICがIntelのPCI-eの安いやつ。

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          --- Ethernet driver support                                                      │ │
  │ │          [ ]   3Com devices                                                               │ │
  │ │          [ ]   Adaptec devices                                                            │ │
  │ │          [ ]   Alteon devices                                                             │ │
  │ │          [ ]   AMD devices                                                                │ │
  │ │          [ ]   Atheros devices                                                            │ │
  │ │          [ ]   Cadence devices                                                            │ │
  │ │          [*]   Broadcom devices                                                           │ │
  │ │          < >     Broadcom 440x/47xx ethernet support                                      │ │
  │ │          < >     Broadcom NetXtremeII support                                             │ │
  │ │          < >     Broadcom CNIC support                                                    │ │
  │ │          <*>     Broadcom Tigon3 support                                                  │ │
  │ │          < >     Broadcom NetXtremeII 10Gb support                                        │ │
  │ │          [ ]   Brocade devices                                                            │ │
  │ │          < >   Calxeda 1G/10G XGMAC Ethernet driver                                       │ │
  │ │          [ ]   Chelsio devices                                                            │ │
  │ │          [ ]   Cisco devices                                                              │ │
  │ │          < >   Dave ethernet support (DNET)                                               │ │
  │ │          [ ]   Digital Equipment devices                                                  │ │
  │ │          [ ]   D-Link devices                                                             │ │
  │ │          [ ]   Emulex devices                                                             │ │
  │ │          [ ]   Exar devices                                                               │ │
  │ │          [ ]   HP devices                                                                 │ │
  │ │          [*]   Intel devices                                                              │ │
  │ │          < >     Intel(R) PRO/100+ support                                                │ │
  │ │          < >     Intel(R) PRO/1000 Gigabit Ethernet support                               │ │
  │ │          <*>     Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support                   │ │

PHY Device support and infrastructure

  │ │          <*>   Drivers for Broadcom PHYs                                                  │ │

Serial ATA and Parallel ATA drivers

  │ │          <*>       AMD/NVidia PATA support                                                │ │

hardware Monitoring support

lm_sensorsあたりで値が取得できるかはまだ試してないけど。

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          --- Hardware Monitoring support                                                  │ │
  │ │          [ ]   Hardware Monitoring Chip debugging messages                                │ │
  │ │                    Native drivers                                                         │ │
  │ │          < >   Abit uGuru (rev 1 & 2)                                                     │ │
  │ │          < >   Abit uGuru (rev 3)                                                         │ │
  │ │          < >   AMD Athlon64/FX or Opteron temperature sensor                              │ │
  │ │          <*>   AMD Family 10h+ temperature sensor                                         │ │
  │ │          < >   AMD Family 15h processor power                                             │ │
  │ │          < >   FB-DIMM AMB temperature sensor on Intel 5000 series chipsets               │ │
  │ │          < >   Fintek F71805F/FG, F71806F/FG and F71872F/FG                               │ │
  │ │          < >   Fintek F71882FG and compatibles                                            │ │
  │ │          < >   Intel Core/Core2/Atom temperature sensor                                   │ │
  │ │          < >   ITE IT87xx and compatibles                                                 │ │
  │ │          < >   Maxim MAX197 and compatibles                                               │ │
  │ │          < >   NTC thermistor support                                                     │ │
  │ │          < >   National Semiconductor PC87360 family                                      │ │
  │ │          < >   National Semiconductor PC87427                                             │ │
  │ │          < >   Silicon Integrated Systems Corp. SiS5595                                   │ │
  │ │          < >   SMSC LPC47M10x and compatibles                                             │ │
  │ │          < >   SMSC LPC47B397-NC                                                          │ │
  │ │          <*>   SMSC SCH5627                                                               │ │
  │ │          < >   SMSC SCH5636                                                               │ │

Pseudo filesystems

起動時にデバイスがRead Onlyになって起動できないってときはここを確認。

TmpfsがデフォルトでなぜかOff(もしやsystemdでは不要?)の為、OpenRCが正常に動かない。

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          -*- /proc file system support                                                    │ │
  │ │          [*]   /proc/kcore support                                                        │ │
  │ │          [*]   /proc/vmcore support                                                       │ │
  │ │          [*] Tmpfs virtual memory file system support (former shm fs)                     │ │
  │ │          [*]   Tmpfs POSIX Access Control Lists                                           │ │
  │ │          -*-   Tmpfs extended attributes                                                  │ │
  │ │          [*] HugeTLB file system support                                                  │ │
  │ │          < > Userspace-driven configuration filesystem                                    │ │
  │ │                                                                                           │ │

Virtualization

  │ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │          --- Virtualization                                                               │ │
  │ │          <M>   Kernel-based Virtual Machine (KVM) support                                 │ │
  │ │          < >     KVM for Intel processors support                                         │ │
  │ │          <M>     KVM for AMD processors support                                           │ │
  │ │          [*]     Audit KVM MMU                                                            │ │
  │ │          <M>   Host kernel accelerator for virtio net (EXPERIMENTAL)                      │ │

その他設定

make.conf

CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"

CHOST="x86_64-pc-linux-gnu"

USE="-alsa bindist mmx sse sse2 qemu virt-network"

MAKEOPTS="-j3"

GENTOO_MIRRORS="http://ftp.iij.ad.jp/pub/linux/gentoo/"

SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"

QEMU_SOFTMMU_TARGETS="x86_64"
QEMU_USER_TARGETS="x86_64"

VIDEO_CARDS=""

cat /etc/conf.d/net

今回はbondingした2つのethを、今後のKVMの為にブリッジに突っ込んでいる。

bondingのモードは、active-slave。

# bridge for kvm
bridge_brkvm="bond0"
config_brkvm="192.168.1.100/24"
routes_brkvm="default via 192.168.1.1"
dns_servers_brkvm="192.168.1.1"
brctl_brkvm="setfd 0
sethello 30
stp off"

# bonding
slaves_bond0="enp2s0 enp3s0"
config_bond0="null"
miimon_bond0="100"
mode_bond0="1"

# enp2s0(intel)
config_enp2s0="null"

# enp3s0(broadcom)
config_enp3s0="null"

depend_bond0() {
        need net.enp2s0 net.enp3s0
}

depend_brkvm() {
        need net.bond0
}

cat /var/lib/portage/world

app-admin/sudo
app-admin/syslog-ng
app-editors/vim
app-emulation/libvirt
app-misc/tmux
app-portage/eix
mail-client/mailx
mail-mta/postfix
net-misc/autossh
net-misc/bridge-utils
net-misc/ntp
sys-boot/grub
sys-kernel/gentoo-sources
sys-process/htop
sys-process/vixie-cron

今後の作業

KVMで仮想マシン作りまくる為、作り方等を調べる。

以後参考にしたいリンク OpenSUSEのKVMのページ

comments powered by Disqus
カテゴリ
タグ
月別アーカイブ