Rotten mud: Use virt-manager to create a virtual machine in Ubuntu

Source: Internet
Author: User

This article was sponsored by Xiuyi linfeng and first launched 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:

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:

Enter the name of the storage pool node.

The default KVM storage pool is in the/var/lib/libvirt/images directory, for example:

Now, modify the default storage pool location to/home/ISO, for example:

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:

Use the same method to create a storage pool for the Virtual Machine hard disk, for example:

Right-click KVM, create a VM, and enter the relevant information, such:

For the ISO image file, click "Browse", for example:

Select an image file, for example:

Configure the memory and CPU of the VM, for example:

Configure the virtual machine's hard disk, such:

Create a hard disk for a VM, such:

After the above information is configured, you can install the virtual machine.

You can also enable the VM to display the hardware status of the VM, for example:

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.

Then you can open the Virtual Machine and start system installation, such:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.