Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ To create and manage virtual machines on Ubuntu Redhat     - Java filter (Programming)

- Ora-00439: feature not enabled: managed standby (Database)

- Linux mount command Detailed (Linux)

- Linux NIC configuration (Linux)

- AngularJS notes --- Scope and controller (Programming)

- Linux environment variable settings methods and differences (Linux)

- Shell Scripting early experience (Programming)

- Linux prohibit non-WHEEL user su command Detail (Linux)

- Linux awk text analysis tool (Linux)

- To install and deploy PHP environment under the CentOS (Server)

- CentOS of NFS (Server)

- Linux Network Security: nmap port scanning software (Linux)

- Expand an existing RAID arrays and remove the failed disk in a RAID (Linux)

- secureCRT remote login Linux must first open the connection protocol (Linux)

- CentOS6.6 ordinary users to use sudo command to borrow root user privileges (Linux)

- Oracle creates split and splitstr functions (Database)

- Linux Network Programming - signal blocking and shielding (block, unblock) (Programming)

- Manager Docker browser (Server)

- RPM package management under Linux (Linux)

- Linux GCC 5.1.0 compiler installation (Linux)

 
         
  To create and manage virtual machines on Ubuntu Redhat
     
  Add Date : 2018-11-21      
         
         
         
  Virtual machine brings great convenience to work, not just in demand use of resources, and migration configuration is particularly convenient. This article will use the Ubuntu 14.04 Desktop version to create RedHat 64 Enterprise Server (RHEL64) virtual machine.

1 ready to install the CD-ROM image

rhel-server-6.4-x86_64-dvd.iso

2 Open the Virtual Machine Manager

Although you can create a virtual machine using the command line, but the principle of simple things simple to do, I use virt-manager to create a virtual machine. Open a terminal on Ubuntu, enter the following command to open Virtual Machine Manager (a virtual box of something similar, if not able to find this thing, it is apt-get install it):

$ Sudo virt-manager

3 start creating installation process

a. Press the button Create a new virtual machine, enter the name: RHEL64-origin

I like to create a clean virtual machine, use this as the source, then later used when cloned from this source. Usually I created this virtual machine, install jdk and gcc only two things. So I put the name of the machine is called the origin. Then press Forward.

b. In Use ISO image:Fill in your address column in the iso

c. The next step is then input memory size and number of CPU. These parameters can be adjusted after the virtual machine creation. At this point I enter 4096MB RAM and 2 CPU. Only then Host machine than physical memory / CPU and more can be.

d. Then the next step to create a disk image. At this point we need to be careful. You may need to consider future expansion. For example, here you specify a 128GB disk image, it will really create the 128GB of files on your hard disk. First you have to have such a large hard disk space for the image file. This is RAW image file formats, so it does not compress. So if we need to create 10 virtual machines how to do? To keep this problem to be solved. Assuming that the physical hard disk space is 700GB, we prepare future storage 10-20 virtual machines, each virtual machine hard disk space 128GB. At this point we can enter 128GB. Select Allocate entire disk now. Press Next. Then pop up a statistical report, do not ignore it, press Finish. Enter Redhat installation interface. This I will not say more.

e. all the way Next, confirm discard any data. When asked to enter the hostname, enter RHEL64-origin, press Configure Network, set eth0 network Connect automatically.

f. In Whick type of installion would you like? appears, select Create Custum Layout. That is their own partition. 128GB total partition:

1024MB --- / boot ---- Primary
8192MB --- swap
8192MB --- / tmp
16384MB --- / home
The rest is --- /

4 converting file formats

Virtual machine image file as follows:

/var/lib/libvirt/images/RHEL64-origin.img

This is the raw format, space = 128GB. Requiring into qcow2 format. Enter the directory RHEL64-origin.img, run the command:

$ Sudo qemu-img convert -O qcow2 RHEL64-origin.img RHEL64-origin.qcow2

It is generated only 2GB size RHEL64-origin.qcow2.

Then change the virtual machine configuration file:

$ Sudo vi /etc/libvirt/qemu/RHEL64-origin.xml

turn up:

type = 'raw' => type = 'qcow2'

RHEL64-origin.img => RHEL64-origin.qcow2

The results are as follows:

    < Disk type = 'file' device = 'disk'>
      < Driver name = 'qemu' type = 'qcow2' />
      < Source file = '/ var / lib / libvirt / images / RHEL64-origin.qcow2' />
      < Target dev = 'vda' bus = 'virtio' />
      < Address type = 'pci' domain = '0x0000' bus = '0x00' slot = '0x05' function = '0x0' />
    < / Disk>

$ Sudo virsh define RHEL64-origin.xml

$ Sudo virsh list --all

$ Sudo virsh start RHEL64-origin

Adding to the host machine ip and hostname mapping, accelerate virtual machine ssh login speed:

#vi / etc / hosts

# Virt-machine

192.168.122.178 rehl64-org

$ Ssh @ rehl64-org

Log into the virtual machine:

[Root @ RHEL64-origin ~] # df -h
Filesystem Size Used Avail Use% Mounted on
/ Dev / vda6 94G 1.8G 87G 2% /
tmpfs 1.9G 0 1.9G 0% / dev / shm
/ Dev / vda1 1008M 60M 898M 7% / boot
/ Dev / vda2 16G 172M 15G 2% / home
/ Dev / vda3 7.9G 146M 7.4G 2% / tmp
[Root @ RHEL64-origin ~] #

success. You can delete the file:

$ Sudo rm -fr /var/lib/libvirt/images/RHEL64-origin.img

5 Postscript

From October 2012 began to be written now, it has been more than a year and a half. If the full over here and practice, a lot can be harvested. Then prepare to enter a deeper level in the field of cloud computing: software-defined networking. Because we created a large number of virtual machines, and how these false machine consisting of a large network. Most of the time we choose bridge (bridge), which allows the virtual machine and the host on a network, so that virtual machines can be used as a host of the network. If NAT way, each host is one subnet, each virtual machine within the host machine are interoperable within the subnet. NAT way, between different virtual machine host can not visit each other, they need to form a network gateway.

Software-defined network-related technology can solve these problems. With definable network infrastructure with virtual machines, physical machines underlying cloud formed, together constitute the infrastructure of IaaS. Then is the Hadoop various cloud platform software as the core. As to the cloud development and deployment of business specific code is relatively simpler.
     
         
         
         
  More:      
 
- Openfire achieve load balancing cluster by Nginx (Server)
- Log analysis is done with Grafana Elasticsearch (Server)
- Simple RPM package production (Linux)
- How to build a container cluster (Server)
- Oracle archive log summary (Database)
- SQLite3 simple operation (Database)
- MySQL5.7 implement virtual column expression index (Database)
- Installation of JDK and Tomcat under Linux (CentOS) (Linux)
- Installation Elementary OS Freya to do some settings (Linux)
- Linux upgrade Glibc (Linux)
- Linux PXE unattended installation PXE-E32: TFTP OPen timeout the solution (Linux)
- Linux mount command Detailed (Linux)
- How do you change the default browser and Email Client in Ubuntu (Linux)
- To access an Oracle database using Instant Client (Database)
- Linux awk text analysis tool (Linux)
- Detailed Linux su command to switch users Mistakes (Linux)
- Let OpenCV face detection score output codes (Programming)
- Customize the 404 error page Nginx (Server)
- Fedora 21 setting boot script (Linux)
- Sorting Algorithm (1) Quick Sort C ++ implementation (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.