Virtual machine manager and linux

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.

Local Installation

sudo apt-get install virt-manager
  • Applications ->Ubuntu Software Center -> Search for «virt-manager»
  • Install «Virtual Machine Manager»

Installation for Remote Server

sudo apt-get install virt-manager ssh-askpass-gnome --no-install-recommends

This will give you virt-manager, and the tool to ask for an ssh password to connect to other servers, and that is all.

Launching

  • Applications ->System Tools ->Virtual Machine Manager
  • 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:
    • http://www.ubuntu.com/getubuntu/download
    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.

    • 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 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 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

      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.

      KVM/VirtManager (последним исправлял пользователь c-73-136-18-217 2016-04-10 01:23:12)

      The material on this wiki is available under a free license, see Copyright / License for details
      You can contribute to this wiki, see Wiki Guide for details

      Источник

      Manage virtual machines with virt-manager

      The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers). It presents a summary view of running domains, their live performance & resource utilization statistics. Wizards enable the creation of new domains, and configuration & adjustment of a domain’s resource allocation & virtual hardware. An embedded VNC and SPICE client viewer presents a full graphical console to the guest domain.

      Virtual machine list Guest CPU Guest console

      About virt-manager’s supporting tools

      • virt-install is a command line tool which provides an easy way to provision operating systems into virtual machines.
      • virt-viewer is a lightweight UI interface for interacting with the graphical display of virtualized guest OS. It can display VNC or SPICE, and uses libvirt to lookup the graphical connection details.
      • virt-clone is a command line tool for cloning existing inactive guests. It copies the disk images, and defines a config with new name, UUID and MAC address pointing to the copied disks.
      • virt-xml is a command line tool for easily editing libvirt domain XML using virt-install’s command line options.
      • virt-bootstrap is a command line tool providing an easy way to setup the root file system for libvirt-based containers.

      Download

      Install it from your OS distribution (others coming soon)

      # yum install virt-manager (Fedora) # apt-get install virt-manager (Debian) # emerge virt-manager (Gentoo) # pkg_add virt-manager (OpenBSD)

      Communicate

      Join the virt-manager mailing list or try the IRC channel #virt on OFTC

      Источник

      Virt-Manager

      Virt-Manager is a graphical user front end for the Libvirt library which provides virtual machine management services. Virt-manager interface makes it easy for the user to create, delete and manipulate virtual machines without going through the terminal.

      Virt-manager does mainly support KVM but it can work with other hypervisors such as Xen and LXC.

      Installation

      The factual accuracy of this article or section is disputed.

      Reason: Virt-Manager also supports QEMU/KVM user sessions which do not require manually starting/enabling any units. (Discuss in Talk:Virt-Manager)

      To use LXC connection enable/start the libvirtd.service .

      QEMU connection does not require libvirtd.service running.

      You can check the unit status to make sure the service is running.

      Configuration

      To use as a normal user without root we need to configure KVM, this will also enable the libvirt networking components.

      Set the UNIX domain socket ownership to libvirt and the UNIX socket permission to read and write.

      . unix_sock_group = 'libvirt' . unix_sock_rw_perms = '0770' .

      Add your user to the libvirt user group.

      Add your user to /etc/libvirt/qemu.conf . Otherwise, QEMU will give a permission denied error when trying to access local drives.

      Search for user = «libvirt-qemu» or group = «libvirt-qemu» , uncomment both entries and change libvirt-qemu to your user name or ID. Once edited it should look something like below.

      # Some examples of valid values are: # # user = "qemu" # A user named "qemu" # user = "+0" # Super user (uid=0) # user = "100" # A user named "100" or a user with uid=100 # user # The group for QEMU processes run by the system instance. It can be # specified in a similar way to user. group

      Upon opening Virt-Manager, it will default to the system variant (root) of the QEMU connection.

      This can be changed to the user connection by going to: File > Add Connection.

      Now select QEMU/KVM User session as the Hypervisor and click OK. This will now auto-connect to the user session. You can now disconnect and remove the system connection if desired.

      Источник

      Читайте также:  Linux service samba start
Оцените статью
Adblock
detector