您的当前位置:首页正文

[KVM]KVMVirtManager使用方法

2021-02-08 来源:年旅网
[KVM]KVMVirtManager󰀀󰀀󰀀󰀀 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. InstallationInstall virt-manager on your desktop:1. From a Command Linesudo apt-get install virt-manager2. Or from the Ubuntu Software Center:Applications -> Ubuntu Software Center -> Search for \"virt-manager\"Install \"Virtual Machine Manager\" LaunchingTo launch KVM/VirtManager:Applications -> System Tools -> Virtual Machine ManagerTo 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 ConnectionHypervisor: QEMU/KVMConnection: Remote tunnel over SSHHostname: hostname or IP address of the remote host. For a user other than root use the formatusername@hostname and make sure the user is part of the libvirtd on the remote server. Creating a Virtual MachineFirst, download an ISO cd image of some OS you want to run. For Ubuntu, you can find theseat:Double click on the name of the host. The Status column should read ActiveRight click on the name of the host, and select NewThis will start a wizard to guide you through the rest of your VM creation1. Enter your virtual machine detailsName: fooChoose Local install media (ISO image or CDROM), or you can use another method ifyou know what you're doingForward

2. Locate your install mediaUse ISO image

Browse to find the ISO you downloaded earlierOptional: Select the matching OS TypeOptional: Select the matching VersionForward

3. Choose Memory and CPU settingsMemory (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 drive8 GB is the default

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

5. Ready to begin installationConfirm the detailsFinish

6. You should now see the OS installation proceed within a virt-manager window. Completethe 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, withfunctions unique to that virtual machine.

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

RunPause

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, pressthe 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, youcan see:

the number of processors allocatedthe 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 delete3. 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 thedata within the VM itself, you should delete the storage file, as these are usually verylarge.

因篇幅问题不能全部显示,请点此查看更多更全内容