Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
debian:virtualization-debian:start [2017/08/10 18:22] – michael | debian:virtualization-debian:start [2017/09/09 17:43] (current) – michael | ||
---|---|---|---|
Line 8: | Line 8: | ||
Wenn man nun den Output **vmx** oder **svn** bekommt ist alles in Ordnung. Wenn nichts kommt kann auf diesem Host nicht Visualisiert werden. | Wenn man nun den Output **vmx** oder **svn** bekommt ist alles in Ordnung. Wenn nichts kommt kann auf diesem Host nicht Visualisiert werden. | ||
+ | |||
+ | FIXME | ||
---- | ---- | ||
Line 30: | Line 32: | ||
- | Nun sollte überprüft werden, ob KVM erfolgreich seine beiden Core-Module laden konnte. | ||
- | |||
- | < | ||
- | # lsmod | grep kvm | ||
- | </ | ||
- | |||
- | <WRAP center round box 100%> | ||
- | < | ||
- | kvm_intel | ||
- | kvm | ||
- | </ | ||
- | </ | ||
- | |||
- | Stimmt die Ausgabe mit der oben aufgelisteten Ausgabe in etwa überein, so sollte nun schon alles parat sein zum Virtualisierungen. | ||
- | |||
- | <WRAP center round tip 100%> | ||
- | **Wichtig zu Beachten:** | ||
- | Falls Redhat 7 oder CentOS 7 als minimal Installation installiert wurde, so fehlt nun noch das sogenannte x-window Pakage, welches jedoch zum anzeigen des Virt-managers unumgänglich ist. Zum nachinstallieren folgenden Befehl ausführen: | ||
- | < | ||
- | # yum install "@X Window System" | ||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Starten des Virt-Managers ===== | ||
- | Befindet man sich auf einem Server mit GUI und arbeitet auch direkt auf diesem, so kann man ganz einfach via Konsole den **virt-manager** aufrufen und das Programm wird gestartet. | ||
- | |||
- | Ist man jedoch so wie ich, per **Putty** von einem **Windows System** aus verbunden, so wird dies nicht ganz so einfach funktionieren. Es muss nämlich hierzu zuerst noch ein spezielles Programm Namens: " | ||
- | auf dem Windows System installiert werden. **Xming** erlaubt es Grafikdarstellungen welche via SSH gesendet werden in Windows als eigenes Fenster Remote darzustellen. So können wir also dann später auch ganz einfach nur den **virt-manager** per Putty aufrufen und es sollte dann die besagte Konsole öffnen. | ||
- | |||
- | ==== Xming Installation ==== | ||
- | - Als erstes sollte wenn nicht schon passiert Xming [[https:// | ||
- | - Anschliessend soll Xming gestartet werden. {{ : | ||
- | - <wrap hi> | ||
- | - Als nächstes müssen wir dann in Putty selber bei der Hypervisor-Verbindung das X11 forwarding zulassen. Dazu geht man beim richtigen System (Nach dem laden des Putty Profiles) Unter **Connection / SSH / X11** und setzt dort ein häcklein bei " | ||
- | - Nun kann man die veränderten Einstellung noch in der Session speichern; Und anschliessend die Putty Verbindung neu aufbauen. | ||
- | |||
- | Hat nun alle geklappt kann, jetzt auch von der Putty Session aus ganz einfach mit dem Befehl: " | ||
- | |||
- | ---- | ||
- | ===== Starten des Virt Managers ===== | ||
- | |||
- | Virt Manager is a graphical tool through which we can install and manage virtual machines. To start the virt manager type the ' | ||
- | |||
- | < | ||
- | # virt-manager | ||
- | </ | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | ===== Configure Bridge Interface ===== | ||
- | Before Start creating VMs , let’s first create the bridge interface. Bridge interface is required if you want to access virtual machines from outside of your hypervisor network. | ||
- | |||
- | < | ||
- | # cd / | ||
- | # cp ifcfg-eno49 ifcfg-br0 | ||
- | </ | ||
- | |||
- | <WRAP center round box 100%> | ||
- | **Edit** the **Interface file** and set followings: | ||
- | |||
- | < | ||
- | # vim ifcfg-eno49 | ||
- | </ | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | </ | ||
- | |||
- | <WRAP center round box 100%> | ||
- | **Edit** the **Bridge file (ifcfg-br0)** and set the followings: | ||
- | |||
- | < | ||
- | # vim ifcfg-br0 | ||
- | </ | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | <wrap em> | ||
- | </ | ||
- | |||
- | Restart the network Service to enable the bridge interface. | ||
- | |||
- | < | ||
- | # systemctl restart network | ||
- | </ | ||
- | |||
- | Check the Bridge interface configuration, | ||
- | |||
- | < | ||
- | # ip addr show br0 | ||
- | </ | ||
- | |||
- | ===== Start Creating Virtual Machines. ===== | ||
- | Now Create Virtual Machine either from the command line using ' | ||
- | |||
- | Now let’s Create a virtual machine of '' | ||
- | |||
- | Start the “virt-manager” | ||
- | |||
- | Go to the File Option, click on '' | ||
- | |||
- | {{: | ||
- | |||
- | We will be using ISO file as installation media. In the next step Specify the path of ISO file. | ||
- | |||
- | {{: | ||
- | |||
- | Click on Forward. | ||
- | |||
- | Specify the Compute Resources : RAM and CPU as per your setup. | ||
- | |||
- | {{: | ||
- | |||
- | Click on Forward to proceed further. | ||
- | |||
- | Specify the storage Size of Virtual Machine, In my case I am using 25G. | ||
- | |||
- | {{: | ||
- | |||
- | In the Next step Specify the Name of Virtual Machine and select network as **Bridge br0** | ||
- | |||
- | {{: | ||
- | |||
- | Click on Finish to start the installation. | ||
- | |||
- | {{: | ||
- | |||
- | Follow the screen instructions and complete the installation. | ||
- | |||
- | |||
- | ===== Creating a virtual Machine from Command Line: ===== | ||
- | |||
- | Virtual Machines can be created from the console as well using the '' | ||
- | |||
- | < | ||
- | # virt-install --name=Ubuntu-16-04 --file=/ | ||
- | </ | ||
- | |||
- | The above **virt-install** command consitst of following options : | ||
- | |||
- | * **–name** = <Name of the Virtual Machine> | ||
- | * **–file** = < | ||
- | * **–file-size** = < Size of the Virtual Machine, in my case it is 20GB > | ||
- | * **–nonsparse** = < Allocate the whole storage while creating> | ||
- | * **–graphics** = < Specify the graphical tool for interactive installation, | ||
- | * **–vcpu** = < Number of virtual CPU for the Machine > | ||
- | * **–ram** = < RAM size for the virtual Machine > | ||
- | * **–cdrom** = < Virtual CD ROM which specify the installation media like ISO file > | ||
- | * **–network** = < it is used to specify which network we will use for the virtual machine, in this example I am bridge interface> | ||
- | * **–os-type** = < Operating system type like linux and window> | ||
- | * **–os-variant**= <KVM maintains the OS variants like ‘fedora18′, | ||
- | |||
- | |||
- | Open now the Virt Viewer //(on Windoff)// and follow the instruction to complete the installation. | ||
- | |||
- | {{: | ||
- | |||
- | Follow the instruction now and complete the installation. | ||
- | |||
- | Once the Installation is completed we can access the Virtual Machine console from ‘virt-manager‘ as shown below. | ||
- | |||
- | {{: | ||
- | That’s it, basic installation and configuration of KVM hypervisor is completed. | ||
---- | ---- | ||
https:// | https:// |