Close Menu
    What's Hot

    How to Auto Start a Program on Raspberry Pi? (4 Ways)

    8 September، 2024

    List of Best Hacking Software For Windows, Linux, and Mac OS X

    7 September، 2024

    The rpm command

    20 December، 2022

    Copy virtual machine to the new host

    20 December، 2022
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    keepuptechnologykeepuptechnology
    • Home
      • Linux
      • Network
      • raspberry pi
      • mqtt
      • esp8266
    • Linux

      List of Best Hacking Software For Windows, Linux, and Mac OS X

      7 September، 2024

      The rpm command

      20 December، 2022

      Copy virtual machine to the new host

      20 December، 2022

      Remove password from Virtual Machine Manager on Linux

      20 December، 2022

      How to create FAT32 USB drive on Linux

      20 December، 2022
    • Network

      Wifi Pineapple Mark V on TP-Link MR3020

      10 September، 2022
    • IOT
      • esp8266
      • mqtt
      • raspberry pi
    • All
      1. IOT
      2. raspberry pi
      3. Linux
      4. View All

      How to Auto Start a Program on Raspberry Pi? (4 Ways)

      8 September، 2024

      How to Install VMWare ESXi on a Raspberry Pi? (Step by step)

      20 December، 2022

      Getting started with Proxmox on Raspberry Pi (Virtualization server)

      20 December، 2022

      How To Create USB Rubber Ducky With Raspberry Pi Pico

      24 November، 2022

      How to Auto Start a Program on Raspberry Pi? (4 Ways)

      8 September، 2024

      How to Install VMWare ESXi on a Raspberry Pi? (Step by step)

      20 December، 2022

      Getting started with Proxmox on Raspberry Pi (Virtualization server)

      20 December، 2022

      How To Create USB Rubber Ducky With Raspberry Pi Pico

      24 November، 2022

      List of Best Hacking Software For Windows, Linux, and Mac OS X

      7 September، 2024

      The rpm command

      20 December، 2022

      Copy virtual machine to the new host

      20 December، 2022

      Remove password from Virtual Machine Manager on Linux

      20 December، 2022
    • Contact Us
    Subscribe
    keepuptechnologykeepuptechnology
    Home » Copy virtual machine to the new host

    Copy virtual machine to the new host

    0
    By admin on 20 December، 2022 Linux
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Post describes how to copy installed virtual machine from Fedora to another RedHat family host. This procedure consists of disk image copy and VM configuration in few steps. In other words, guest OS can be very easily copied or cloned to the new host and here is how:

    Contents

    1. Does new host has hardware virtualization?
    2. Install virtualization software on new Fedora host
    3. Copy disk image to the new host
    4. Create a virtual machine on new host
      • Step 1: Enter your virtual machine details
      • Step 2: Provide the existing storage path
      • Step 3: Choose Memory and CPU settings
      • Step 5: Ready to begin installation

    1. Does new host has hardware virtualization?
    First make sure that CPU on new Linux host has hardware virtualization (svm is for AMD, vmx for Intel). Virtualization Technology (VT) is a set of enhancements to newer processors that improve performance for running a virtual machine by offloading some of the work to the new cpu extensions. Run the following command from command line. If command returns a list then CPU has hardware virtualization (and that’s good).

    # simple
    egrep"svm|vmx"/proc/cpuinfo
    # paint CPU flags
    grep-E "(vmx|svm)"--color=always /proc/cpuinfo

    If CPU doesn’t have built in hardware virtualization, QEMU will still run with acceptable performance. In this case, KVM kernel driver will not be loaded.

    What is KVM? KVM stands for Kernel-based Virtual Machine. In a Linux world, KVM is a full virtualization solution on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It offers guests the ability to use paravirtualized block and network devices, which leads to better performance and lower overhead.

    2. Install virtualization software on new Fedora host
    The most simple way is to install the KVM hypervisor with yum utility. The kvm package contains KVM kernel module providing the KVM hypervisor on the default Fedora kernel.

    yum install kvm

    Install the other recommended virtualization packages:

    yum install virt-manager libvirt libvirt-python python-virtinst

    … or you can prepare Fedora hypervisor with groupinstall option:

    # list all software groups
    yum grouplist
    #  install virtualization support
    yum groupinstall virtualization

    3. Copy disk image to the new host
    By default, disk images are located in /var/lib/libvirt/images directory. In my case I had 8GB WinXP.img disk image in RAW format. New hypervisor was next door Fedora so I made plain scp:

    # cd to the images directory
    cd/var/lib/libvirt/images
    # copy disk image to the new host
    scpWinXP.img root@192.168.5.21:/var/lib/libvirt/images

    4. Create a virtual machine on new host
    To create new VM, use libvirt utility tool. Libvirt is collection of software that provides a convenient way to manage virtual machines and other virtualization functionality, such as storage and network interface management. Start VM manager from Application menu:

    Applications -> System Tools -> Virtual Machine Manager

    Before VM manager starts, password popup will appear. Enter root password to unlock VM manager. After VM manager is displayed, click on “New” icon and follow wizard in 5 easy steps. In scenario with copying VM, wizard will skip fourth step (so there will be only four steps).

    Step 1: Enter your virtual machine details
    In first step you will be notified if QEMU uses KVM or not. Here is case where QEMU initially did not find KVM and the following notification was displayed:

    Step 1 of 5 - Warning: KVM is not available.
    This may mean the KVM package is not installed, or KVM kernel modules are not loaded.
    Your virtual machines may perform poorly.

    To test if kvm kernel modules are loaded, run lsmod command. There should be two modules listed:

    lsmod | grepkvm

    If above command displays only kvm module, you can try manually load kvm_intel (or kvm_amd) module:

    modprobe kvm_intel

    In my case output message was:

    Error inserting kvm_intel (/lib/modules/2.6.33.4/kernel/arch/x86/kvm/kvm-intel.ko)Operation not supported

    The problem was in disabled virtualization in BIOS. Here is how to enable virtualization for Fujitsu Siemens ESPRIMO P5730. Reboot computer (during boot press F2 key) and set:

    System console 
       Advanced     
        Advanced Processor Options         
        Virtualization Technology (VT-x) -> enabled

    After Fedora booted, both modules kvm and kvm_intel were properly loaded and libvirt VM wizard wrote a nice message:

    Connection: localhost (QEMU/KVM)

    Everything is fine now and VM configuration can begin. In first step is important to input VM name and to choose type of guest OS installation.

    Name: WinXP
    choose how you would like to install the OS: Import existing disk image

    Step 2: Provide the existing storage path
    Because of selected Import existing disk image option in first step, in second step is needed to input path to the existing disk image. Disk images are saved in default libvirt location:

    /var/lib/libvirt/images/WinXP.img

    After disk image location is entered, choose an operating system type and version. It should be the same type as is contained OS on disk image (in my case it is Windows XP).

    OS type: Windows
    Version: Microsoft Windows XP

    Step 3: Choose Memory and CPU settings
    This step is simple. For Windows XP guest OS I set one CPU and 1GB or RAM – no more no less.

    Memory (RAM): 1024MB
    CPUs: 1

    Funny, step 4 was skipped and wizard jumped to the last step.

    Step 5: Ready to begin installation
    Step 5 is the last step and in this scenario there will be no guest OS installation. After powering on VM, Windows XP should boot immediately in exact state of the last shut down. Click on Customize configuration before install to set VirtIO disk and to add EvTouch device. Here are steps to set VirtIO disk. By default, disk will be set as IDE, but if QEMU uses KVM, then it’s possible to use paravirtualized drivers for disk and nic to boost better performances.

    Click on Customize configuration before install (imported disk will be set as IDE):

    1. remove IDE disk
    2. click on add new hardware (choose Storage)
    3. click on “Select managed or other existing storage”
    4. browse to the location of disk image /var/lib/libvirt/images/WinXP.img
    5. set Device type as “Virtio disk”
    6. in case of RAW disk image set cache mode to “none”
    7. Device type: RAW / QCOW2 (the same format as is copied disk image)

    And finally I added Input device “EvTouch USB Graphic Table”. A graphic tablet configured as the default pointer in the guest OS will ensure that the virtual cursor moves in sync with the local desktop cursor.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleRemove password from Virtual Machine Manager on Linux
    Next Article The rpm command
    admin
    • Website

    Related Posts

    List of Best Hacking Software For Windows, Linux, and Mac OS X

    7 September، 2024

    The rpm command

    20 December، 2022

    Remove password from Virtual Machine Manager on Linux

    20 December، 2022
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Subscribe to Updates

    Get the latest sports news from SportsSite about soccer, football and tennis.

    Keep Up Technologies. Articles and topics to keep up with computer science and technology
    We're social. Connect with us:

    Facebook X (Twitter) Instagram Pinterest YouTube
    Top Insights
    Get Informed

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    © 2025 Makrof. Designed by Makrof.

    Type above and press Enter to search. Press Esc to cancel.