This article is first published in the dark world.
The previous article introduced how to install the KVM Virtual Machine manager virt-manager in Ubuntu. This article describes how to use virt-manager to create a virtual machine in the graphic interface.
Log on to Ubuntu, open virt-manager, right-click the KVM to be connected, and click "details", as shown in:
650) This. width = 650; "Title =" clip_image001 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image001 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883120Csqv.png "width =" 413 "Height =" 322 "/>
Before creating a VM, we have to do two things. First, create the system image storage pool to be loaded for the virtual machine, and second, create the hard disk storage pool for the virtual machine.
First, create the system image storage pool to be loaded for the virtual machine, as shown below:
650) This. width = 650; "Title =" clip_image002 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image002 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883121j8E4.png "width =" 764 "Height =" 541 "/>
Enter the name of the storage pool node.
650) This. width = 650; "Title =" clip_image003 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image003 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883121rLze.png "width =" 672 "Height =" 491 "/>
The default KVM storage pool is in the/var/lib/libvirt/images directory, for example:
650) This. width = 650; "Title =" clip_image004 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image004 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883122MCTh.png "width =" 600 "Height =" 427 "/>
Now, modify the default storage pool location to/home/ISO, for example:
650) This. width = 650; "Title =" clip_image005 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image005 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883122oSJh.png "width =" 905 "Height =" 286 "/>
Note:/home/ISO is an existing directory on the KVM server. It cannot be mounted to a local directory through remote NFS on the KVM server.
Now we can see the corresponding image files in the ISO storage pool, such:
650) This. width = 650; "Title =" clip_image006 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image006 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883123bUnL.png "width =" 753 "Height =" 542 "/>
Use the same method to create a storage pool for the Virtual Machine hard disk, for example:
650) This. width = 650; "Title =" clip_image007 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image007 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883124xtzx.png "width =" 709 "Height =" 344 "/>
Right-click KVM, create a VM, and enter the relevant information, such:
650) This. width = 650; "Title =" clip_image008 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image008 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883124I6ns.png "width =" 657 "Height =" 527 "/>
For the ISO image file, click "Browse", for example:
650) This. width = 650; "Title =" clip_image009 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image009 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883125vbcX.png "width =" 453 "Height =" 449 "/>
Select an image file, for example:
650) This. width = 650; "Title =" clip_image010 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image010 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883126uGBk.png "width =" 754 "Height =" 533 "/>
650) This. width = 650; "Title =" clip_image011 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image011 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883126hvPV.png "width =" 441 "Height =" 441 "/>
Configure the memory and CPU of the VM, for example:
650) This. width = 650; "Title =" clip_image012 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image012 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883127F6Fo.png "width =" 437 "Height =" 445 "/>
Configure the virtual machine's hard disk, such:
650) This. width = 650; "Title =" clip_image013 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image013 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_14068831273Nm6.png "width =" 436 "Height =" 436 "/>
Create a hard disk for a VM, such:
650) This. width = 650; "Title =" clip_image014 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image014 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883128vWhe.png "width =" 865 "Height =" 528 "/>
650) This. width = 650; "Title =" clip_image015 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image015 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883128NAUB.png "width =" 746 "Height =" 531 "/> 650) This. width = 650; "Title =" clip_image016 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image016 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883129SyrT.png "width =" 758 "Height =" 529 "/> 650) This. width = 650; "Title =" clip_image017 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image017 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883129wLRn.png "width =" 437 "Height =" 438 "/>
650) This. width = 650; "Title =" clip_image018 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image018 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883130Rz9U.png "width =" 442 "Height =" 618 "/>
After the above information is configured, you can install the virtual machine.
650) This. width = 650; "Title =" clip_image019 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image019 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883130svxz.png "width =" 816 "Height =" 443 "/>
You can also enable the VM to display the hardware status of the VM, for example:
650) This. width = 650; "Title =" clip_image020 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image020 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883131TljQ.png "width =" 562 "Height =" 521 "/>
Note that virtual machines created through the virt-manager graphic interface cannot be connected through the VNC client. We can see that the IP address of the remote virtual machine VNC is 127.0.0.1, and the port number is automatically allocated, so we cannot connect. If you want to connect, you can use virsh Edit to edit the virtual machine configuration file after creating the virtual machine. Add the following code:
<Graphics type = 'vnc 'port = '000000' autoport = 'no' Listen = '0. 0.0.0 '>
<Listen type = 'address' address = '0. 0.0.0 '/>
</Graphics>
The connection port of VNC can be customized.
650) This. width = 650; "Title =" clip_image021 [4] "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image021 [4] "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883131WhfA.png "width =" 674 "Height =" 194 "/>
Then you can open the Virtual Machine and start system installation, such:
650) This. width = 650; "Title =" clip_image022 "style =" border-right-width: 0px; Background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; padding-Right: 0px; border-top-width: 0px; "Border =" 0 "alt =" clip_image022 "src =" http://img1.51cto.com/attachment/201408/1/526870_1406883132mHwV.png "width =" 808 "Height =" 763 "/>
This article from the "muddy world" blog, please be sure to keep this source http://ilanni.blog.51cto.com/526870/1533889