• [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.
  • 相关阅读:
    能帮你找到网页设计灵感的16个网站
    [转]自定义SqlMembershipProvider方法
    C#实现的根据年月日计算星期几的函数
    分享一个我自己写的支持多条件组合查询的分页存储过程
    史上最强的福克斯遥控钥匙失灵解决方案(zt)
    在页面实现数据还原,在终止数据库进程时,报不能用kill来终结自己的进程
    ViewState使用兼谈序列化
    jQuery 的上传图片预览插件
    Asp.net 备份、还原Ms SQLServer及压缩Access数据库
    aspnet_Membership表的意义
  • 原文地址:https://www.cnblogs.com/licheng/p/2536251.html
Copyright © 2020-2023  润新知