Use libvirt to remotely manage virtual machines

Source: Internet
Author: User

How can I use libvirt to remotely manage virtual machines?

To use libvirt to connect to the hypervisor, we need a URI. This URI is used with the virsh and virt-Viewer commands. You can follow the steps below. virt-viewer can call some link parameters, for example: virsh-C qemu: // when the system is linked to a remote machine, you can define several protocols used: SSH, TCP, and TLS. When connecting to a remote machine, you need to use the user and Host Name of the remote host for Link. If no linked user is defined, the user of $ user in the local environment will be used for Link. when connected to qemu
Hypervisor supports two connection types: system can have all access permissions and the session has limited access permissions. For example:

Use full access to link the qemu hypervisor to the local machine. The front-C is used to execute the following LIST Command (-- Connect)

Virsh-C qemu: // system list

Use full access to connect to the qemu hypervisor of the remote host. Enter the SSH password every time. If you change to SSH without a password, you do not need to enter the password. The result is displayed directly.

Virsh-C qemu + SSH: // tux@mercury.example.com/system directly enters interactive virsh Mode

Virsh-C qemu + SSH: // 10.1.1.8/system list directly displays the list result

Other connection formats are as follows:

Qemu: // SESSION (local access to per-user instance)
Qemu + Unix: // SESSION (local access to per-user instance)
Qemu: // System (local access to system instance)
Qemu + Unix: // System (local access to system instance)
Qemu: // example.com/system (Remote Access, TLS/X509)
Qemu + TCP: // example.com/system (Remote Access, SASL/Kerberos)
Qemu + SSH: // root@example.com/system (Remote Access, ssh tunnelled)

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.