Virtualization

Define Virtualization and Its Principle

Manage a Local Virtualization Host

Getting ready

$ vagrant up
$ vagrant ssh

How to do it

From the man pages *kvm

Install Virtual machine and Its method

check the machine

$ lsmod | grep kvm kvm_intel 172032 3 kvm 536576 1 kvm_intel irqbypass 16384 3 kvm

$ sudo yum install virt-manager libvirt-python python-virtinst qemu-kvm libvirt virt-install bridge-utils libvirt-client

Running machine

 $ sudo virsh list
[sudo] password for ved: 
 Id    Name                           State
----------------------------------------------------
 2     centos7.0                      running

For all machine

$ sudo virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     centos7.0                      running
 -     rhelserver                     shut off
$ virsh destroy <packagename>
$ virsh start server

How it work

Managing Virtual Machine Getting ready How we to do it How it work

Creating/Installing a New Machine

Now we create virtual operating System on Virtual machine Getting ready How we to do it How it work

Build chroot environment

Create a directory 
# mkdir -p /var/tmp/chroot

Setup the chroot enviornment
# mkdir -p /var/tmp/chroot/var/lib/rpm
# rpm --rebuilddb --root=/var/tmp/chroot
Download manually centos-release 
# wget http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm
--2016-07-20 12:38:31--  http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm
Resolving mirror.centos.org (mirror.centos.org)... 103.27.60.52, 2605:9000:401:102::2
Connecting to mirror.centos.org (mirror.centos.org)|103.27.60.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23516 (23K) [application/x-rpm]
Saving to: ‘centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm’

100%[===========================================================================================================>] 23,516      76.7KB/s   in 0.3s   

2016-07-20 12:38:37 (76.7 KB/s) - ‘centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm’ saved [23516/23516]

Install it forcefully and manually
# rpm -i --root=/var/tmp/chroot --nodeps centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm 
warning: Generating 12 missing index(es), please wait...
warning: centos-release-7-2.1511.el7.centos.2.10.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY

Install by yum that centos distribution into chroot 
# yum --installroot=/var/tmp/chroot install -y rpm-build yum

Finally 
 # chroot /var/tmp/chroot/
cloudyuga / # ls
bin  boot  dev    etc  home  lib    lib64  media  mnt  opt    proc  root  run  sbin  srv  sys  tmp  usr  var

results matching ""

    No results matching ""