Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ a virtual machine created migrated to host RHEL6.4 on Ubuntu 14.04     - Linux system performance tuning of Analysis (Linux)

- Android Custom View password box example (Programming)

- Shuffle Process Arrangement in MapReduce (Server)

- Linux Regular expressions grep and egrep (Linux)

- Linux Basics Tutorial: create your own Vim IDE (Linux)

- Three binary tree traversal (recursive, non-recursive traversal and Morris) (Programming)

- Docker Build a Java compiler environment (Linux)

- XenServer Virtual Machine Installation --- first ISO image file storage expansion (Linux)

- On Android running ClojureScript (Linux)

- CentOS / RedHat system partition essential requirements and partition scheme (Linux)

- Shared directory settings between Linux and Linux (Linux)

- How do you prevent other users from accessing your home directory in Linux (Linux)

- Zombie process under Linux (Linux)

- Swift acquaintance of values and references, the circular reference, Agent Precautions (Programming)

- How to install Unbound and DNSCrypt in Archlinux (Server)

- The Sublime Text 3 configuration file (Linux)

- Ubuntu Locale configuration problem solving Can not set LC_CTYPE (Linux)

- SQL Server automatic backup script (Database)

- Java foundation comb: Array (Programming)

- Linux-du and df command (Linux)

 
         
  a virtual machine created migrated to host RHEL6.4 on Ubuntu 14.04
     
  Add Date : 2018-11-21      
         
       
         
  HOST RHEL6.4 Server as a virtual machine, run the following command to check the configuration and installation of related software:

# Egrep '^ flags * (vmx | svm).' / Proc / cpuinfo
A display Description CPU support VT function
2, open Virtual Technolege (VT, blur technology) CPU in the motherboard BIOS
3, install kvm
# Yum install kvm virt- * libvirt
4, check kvm module is installed:
# Lsmod | grep kvm
A message similar to the following:
kvm_intel 53484 9
kvm 316506 1 kvm_intel
5, start the service
# Service libvirtd start

qemu Ubuntu 14.04 on RHEL6.4 than the version on to the new, resulting in a Guest (RHEL6.4) to create a virtual machine Ubuntu14.04 copied to not run on RHEL6.4HOST host. To solve this problem, you can follow the steps below:

1) On Ubuntu 14.04 Ba qcow2 format vm turn into a raw format.

2) define vm raw formats on RHEL6.4.

Since RHEL6.4 support vm raw format, you can create a virtual machine raw format directly on Ubuntu, and then copied to RHEL6.4. But vm raw format occupy too much space, time consuming to copy them.

View virtual machine image format command:

 $ Qume-img info vm.img

image: vm.img

file format: raw

virtual size: 80G

disk size: 80G # at this time to start creating very small. Sparse files.

So you can use the following approach:

1) On Ubuntu14.04 install kvm vm.img types of virtual machines with virt-manager. The default is raw format. You can use 80G.

2) Copy this vm.img and vm.xml to RHEL6.4. Note the directory location must be (you can use the link):

/etc/libvirt/qemu/vm.xml

/var/lib/libvirt/images/vm.img

3) Modify vm.xml. To note here, is slightly different vm.xml and Ubuntu14.04 RHEL6.4 used on. Listed below are the last RHEL6.4 vm.xml (different from):

< Domain type = 'kvm'>
    < Name> vm < / name>
    < Uuid> ... < / uuid>
    < Memory unit = 'KiB'> 4194304 < / memory>
    < CurrentMemory unit = 'KiB'> 4194304 < / currentMemory>
    < Vcpu placement = 'static'> 4 < / vcpu>
    < Os>
        < Type arch = 'x86_64' machine = 'rhel6.4.0'> hvm < / type>
        < Boot dev = 'hd' />
    < / Os>
    < Features>
        < Acpi />
        < Apic />
        < Pae />
    < / Features>
    < Clock offset = 'utc' />
    < ! -
    < Clock offset = 'localtime' />
    ->
    < On_poweroff> destroy < / on_poweroff>
    < On_reboot> restart < / on_reboot>
    < On_crash> destroy < / on_crash>
    < Devices>
        < -! Diff below ->
        < Emulator> / usr / libexec / qemu-kvm < / emulator>
        < Disk type = 'file' device = 'disk'>
            < Driver name = 'qemu' type = 'raw' />
            < Source file = '/ var / lib / libvirt / images / vm.img' />
            < Target dev = 'vda' bus = 'virtio' />
        < / Disk>
        < Disk type = 'block' device = 'cdrom'>
            < Driver name = 'qemu' type = 'raw' />
            < Target dev = 'hdc' bus = 'ide' />
            < Readonly />
            < Address ... />
        < / Disk>
        ...
        < Serial type = 'pty'>
            < Target port = '0' />
        < / Serial>
        < Console type = 'pty'>
            < Target type = 'serial' port = '0' />
        < / Console>
        ...
    < / Devices>
< / Domain>

Except that:

< Emulator> / usr / libexec / qemu-kvm < / emulator>

4) Then run definition:

$ Virsh define vm.xml

5) startup and shutdown:

$ Virsh start vm

$ Virsh shutdown vm

Here's how virsh console log in the virtual machine. First you need to create ttyS0.conf file vm's / etc / init / under, which reads as follows:

# /etc/init/ttyS0.conf:
# TtyS0 - agetty
stop on runlevel [016]
start on runlevel [345]

instance ttyS0
respawn
pre-start exec / sbin / securetty ttyS0
exec / sbin / agetty / dev / ttyS0 115200 vt100-nav

Because at this time we have not properly configured vm network, you can not ssh to the virtual machine. So you need to use libguestfs-tools to copy ttyS0.conf vm in.

1) First, you need to install on the host RHEL6.4 libguestfs-tools:

$ Yum install libguestfs-tools

2) Create and edit on the host good: ttyS0.conf, then copied to the vm in:

$ Virsh shutdown vm # must first shut down the virtual machine
$ Virt-copy-in -d vm ttyS0.conf / etc / init
$ Virt-ls -d vm / etc / init
$ Virt-cat -d vm /etc/init/ttyS0.conf

3) Start and console to vm:

$ Virsh start vm
$ Virsh console vm

4) Configure vm network. Restart the virtual machine. Then you can ssh to vm on.

We're done! If you think small vm, you can resize.
     
         
       
         
  More:      
 
- CentOS installation Percona Server 5.5.42 compiling problem solve one case (Linux)
- Ubuntu 32 compile Android 4.0.4 Problems (Linux)
- Performance Optimization: Using Ramlog transfer log files to memory (Linux)
- How to choose the first programming language based on the life you want (Programming)
- libreadline.so.6: can not open shared object file problem solution (Linux)
- CentOS 6.5 install Firefox (Linux)
- WEB-based Android Remote Tools Python implementation (Programming)
- How to configure chroot environment in Ubuntu 14.04 (Linux)
- Compile and install GCC 4.8.1 + GDB 7.6.1 + Eclipse in CentOS 6.4 in (Linux)
- Restrict console access to Linux servers to improve security (Linux)
- Install JDK 1.7 + Eclipse in CentOS 6.4 in (Linux)
- LinkedList Basic Usage (Programming)
- C # / iOS / Android Universal Encryption and decryption (Programming)
- Linux CentOS configuration SVN + SVN hook (Server)
- Linux server startup and logon security settings (Linux)
- Install Ubuntu 14.04 and Windows 8 / 8.1 dual-boot in UEFI mode (Linux)
- Oracle table space create large files (Database)
- MySQL script incremental backups (innobackupex) (Database)
- Fedora 20 Installation and Configuration (Linux)
- The script Linux command (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.