zoukankan      html  css  js  c++  java
  • [KVM] KVM/VirtManager 使用方法

    You can create, delete, run, stop, and manage your virtual machines graphically. The tool virt-manager allows you to use a graphical interface to interact with KVM.

     

    Installation

    Install virt-manager on your desktop:

    1. From a Command Line
      sudo apt-get install virt-manager
    2. Or from the Ubuntu Software Center:
      • Applications -> Ubuntu Software Center -> Search for "virt-manager"

      • Install "Virtual Machine Manager"

     

    Launching

    To launch KVM/VirtManager:

    • Applications -> System Tools -> Virtual Machine Manager

    To manage virtual machines on the local system:

    • Double-click on "localhost (System)"

    Or to connect to any other virtual machine host (running libvirt-bin and openssh-server):

    • File -> Add Connection

    • Hypervisor: QEMU/KVM

    • Connection: Remote tunnel over SSH

    • Hostname: hostname or IP address of the remote host. For a user other than root use the format username@hostname and make sure the user is part of the libvirtd on the remote server.

    http://waste.mandragor.org/virt-manager-screenshot.png

     

    Creating a Virtual Machine

    • First, download an ISO cd image of some OS you want to run. For Ubuntu, you can find these at:
    • Double click on the name of the host. The Status column should read Active

    • Right click on the name of the host, and select New

    • This will start a wizard to guide you through the rest of your VM creation
      1. Enter your virtual machine details
        • Name: foo

        • Choose Local install media (ISO image or CDROM), or you can use another method if you know what you're doing

        • Forward

      2. Locate your install media
        • Use ISO image

        • Browse to find the ISO you downloaded earlier

        • Optional: Select the matching OS Type

        • Optional: Select the matching Version

        • Forward

      3. Choose Memory and CPU settings
        • Memory (RAM): 512MB (your choice)

        • CPUs: 1 (your choice)

        • Forward

      4. Select Enable storage for this virtual machine

        • Select Create a disk image on the computer's hard drive

        • 8 GB is the default

        • To speed up VM creation, you can unselect Allocate entire disk now

        • Forward

      5. Ready to begin installation
        • Confirm the details
        • Finish

      6. You should now see the OS installation proceed within a virt-manager window. Complete the installation and reboot.

     

    Working with a Running Virtual Machine

    If you double-click on any machine in Virtual Machine Manager, a new window will open, with functions unique to that virtual machine.

    From this window, you apply several actions to this VM:

    • Run
    • Pause
    • Shutdown (cleanly shuts down the VM OS)
    • Reboot (cleanly reboots the VM OS)
    • Force off (equivalent to yanking the power, could yield data loss in the VM)
    • Fullscreen

     

    Console

    The Console tab in the main window provides access to the VM's desktop and tty consoles.

    • The desktop is accessed over a VNC connection to the guest. When you are "inside" the guest, the keyboard and mouse are "locked" to the guest. To release the keyboard and mouse, press the buttons Ctrl-Alt at the same time.
    • The tty console can been accessed by:
      • Send Key -> Ctrl-Alt-F1

     

    Details

    The Details tab provides a view of the resources assigned to this virtual machine. Here, you can see:

    • the number of processors allocated
    • the amount of memory assigned
    • the default boot device (CDROM or Hard Disk)
    • a listing of the storage devices attached to the VM and their type (CDROM, IDE, SCSI, Virtio)
    • the network adapter and its model
    • the emulated mouse, display, serial, and sound hardware

     

    Deleting a Virtual Machine

    To delete a virtual machine:

    1. Shutdown or force off the VM.
    2. In Virtual Machine Manager, highlight the VM you want to delete
    3. Click Delete at the bottom of the panel

    4. You can optionally delete the associated disk file for the VM. If you don't want or need the data within the VM itself, you should delete the storage file, as these are usually very large.
  • 相关阅读:
    通过Maven简单搭建SSM框架
    javaWeb常用面试题
    到底什么是对象,什么是对象的引用?对象和对象的引用有那些区别?
    第二章 python中重要的数据结构(下)
    第一章 python中重要的数据结构(上)
    springboot 集成完整的swagger2
    JAVA -> 数据加密和解密 留存
    mac rar文件解压缩
    java 图片合成文字或者awt包下的对话框引入自定义字体库
    java中list或数组中随机子集工具类
  • 原文地址:https://www.cnblogs.com/licheng/p/2536251.html
Copyright © 2011-2022 走看看