Cloudera: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | ==== | + | ==== Systeme und Netzwerkaufbau ==== |
| − | |||
<pre> | <pre> | ||
| − | yum -y install | + | 192.168.178.3 dell01 dell01.karl.schlicker.org # KVM Host 1 |
| + | 192.168.178.4 dell02 dell02.karl.schlicker.org # KVM Host 2 | ||
| + | </pre> | ||
| + | |||
| + | ====Installation des KVM-Host ==== | ||
| + | |||
| + | Nachdem man CentOS 7 per Minimal System installiert hat und konfiguriert hat, installiert man noch zusätzliche Pakete und deaktiviert die Firewall | ||
| + | <pre> | ||
| + | [root@dell01: yum -y install wget | ||
| + | [root@dell01: systemctl disable firewalld | ||
</pre> | </pre> | ||
| + | |||
===== Virt-Manager ===== | ===== Virt-Manager ===== | ||
<pre> | <pre> | ||
| − | yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils | + | [root@dell01: yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils |
| − | systemctl start libvirtd | + | [root@dell01: systemctl start libvirtd |
| − | systemctl enable libvirtd | + | [root@dell01: systemctl enable libvirtd |
</pre> | </pre> | ||
Check: | Check: | ||
<pre> | <pre> | ||
| − | lsmod | grep kvm | + | [root@dell01: lsmod | grep kvm |
| + | |||
| + | kvm_intel 170200 0 | ||
| + | kvm 566604 1 kvm_intel | ||
| + | irqbypass 13503 1 kvm | ||
| + | </pre> | ||
| + | |||
| + | ===== Bridge Network ===== | ||
| + | <pre> | ||
| + | [root@dell01: cd /etc/sysconfig/network-scripts | ||
| + | [root@dell01: cp ifcfg-eno1 ifcfg-br0 | ||
| + | [root@dell01: vi ifcfg-eno1 | ||
| + | TYPE=Ethernet | ||
| + | BOOTPROTO=static | ||
| + | DEVICE=eno1 | ||
| + | ONBOOT=yes | ||
| + | BRIDGE=br0 | ||
| + | |||
| + | [root@dell01: vi ifcfg-br0 | ||
| + | TYPE=Bridge | ||
| + | BOOTPROTO=static | ||
| + | DEVICE=br0 | ||
| + | ONBOOT=yes | ||
| + | IPADDR=192.168.10.21 | ||
| + | NETMASK=255.255.255.0 | ||
| + | GATEWAY=192.168.10.1 | ||
| + | DNS1=192.168.10.11 | ||
| + | |||
| + | [root@dell01: systemctl restart network | ||
| + | [root@dell01: ip addr show br0 | ||
</pre> | </pre> | ||
| + | |||
| + | ===== X-Forwarding für virt-manager ===== | ||
| + | <pre> | ||
| + | [root@dell: yum -y install xorg-x11-xauth xorg-x11-xinit-session xorg-x11-fonts-misc xorg-x11-fonts-75dpi xorg-x11-fonts-100dpi xorg-x11-font-utils xorg-x11-fonts-Type1 | ||
| + | </pre> | ||
| + | Check vom Mac: | ||
| + | <pre> | ||
| + | MAC:~ ktsadmin$ ssh -Y root@dell01 | ||
| + | |||
| + | [root@dell01: virt-manager | ||
| + | </pre> | ||
| + | |||
| + | ====Grund-Installation der virtuallen Maschinen ==== | ||
| + | |||
| + | ===== GRUB2 Konsolen-Output ===== | ||
| + | |||
| + | Um mit '''virsh console vm1''' eine Ausgabe zu erhalten, muss die GRUB-Boot-sequenz angepasst werden. | ||
| + | |||
| + | Dafür folgendes machen | ||
| + | <pre> | ||
| + | [root@vmdb01 ~]# vi /etc/sysconfig/grub | ||
| + | ... | ||
| + | GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_vmdb01/root rd.lvm.lv=centos_vmdb01/swap console=ttyS0" | ||
| + | ... | ||
| + | |||
| + | [root@vmdb01 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg | ||
| + | Generating grub configuration file ... | ||
| + | Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64 | ||
| + | Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img | ||
| + | Found linux image: /boot/vmlinuz-0-rescue-5e01831527494fefb94bd713107d4991 | ||
| + | Found initrd image: /boot/initramfs-0-rescue-5e01831527494fefb94bd713107d4991.img | ||
| + | done | ||
| + | </pre> | ||
| + | |||
| + | Danach rebooten | ||
Aktuelle Version vom 12. Dezember 2017, 17:43 Uhr
Systeme und Netzwerkaufbau
192.168.178.3 dell01 dell01.karl.schlicker.org # KVM Host 1 192.168.178.4 dell02 dell02.karl.schlicker.org # KVM Host 2
Installation des KVM-Host
Nachdem man CentOS 7 per Minimal System installiert hat und konfiguriert hat, installiert man noch zusätzliche Pakete und deaktiviert die Firewall
[root@dell01: yum -y install wget [root@dell01: systemctl disable firewalld
Virt-Manager
[root@dell01: yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils [root@dell01: systemctl start libvirtd [root@dell01: systemctl enable libvirtd
Check:
[root@dell01: lsmod | grep kvm kvm_intel 170200 0 kvm 566604 1 kvm_intel irqbypass 13503 1 kvm
Bridge Network
[root@dell01: cd /etc/sysconfig/network-scripts [root@dell01: cp ifcfg-eno1 ifcfg-br0 [root@dell01: vi ifcfg-eno1 TYPE=Ethernet BOOTPROTO=static DEVICE=eno1 ONBOOT=yes BRIDGE=br0 [root@dell01: vi ifcfg-br0 TYPE=Bridge BOOTPROTO=static DEVICE=br0 ONBOOT=yes IPADDR=192.168.10.21 NETMASK=255.255.255.0 GATEWAY=192.168.10.1 DNS1=192.168.10.11 [root@dell01: systemctl restart network [root@dell01: ip addr show br0
X-Forwarding für virt-manager
[root@dell: yum -y install xorg-x11-xauth xorg-x11-xinit-session xorg-x11-fonts-misc xorg-x11-fonts-75dpi xorg-x11-fonts-100dpi xorg-x11-font-utils xorg-x11-fonts-Type1
Check vom Mac:
MAC:~ ktsadmin$ ssh -Y root@dell01 [root@dell01: virt-manager
Grund-Installation der virtuallen Maschinen
GRUB2 Konsolen-Output
Um mit virsh console vm1 eine Ausgabe zu erhalten, muss die GRUB-Boot-sequenz angepasst werden.
Dafür folgendes machen
[root@vmdb01 ~]# vi /etc/sysconfig/grub ... GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos_vmdb01/root rd.lvm.lv=centos_vmdb01/swap console=ttyS0" ... [root@vmdb01 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-5e01831527494fefb94bd713107d4991 Found initrd image: /boot/initramfs-0-rescue-5e01831527494fefb94bd713107d4991.img done
Danach rebooten