Skip to content

This module provides to communicate Libvirt server for PowerShell.

License

Notifications You must be signed in to change notification settings

9506hqwy/pwsh-virt

Repository files navigation

PowerShell Libvirt Module

This module provides to communicate Libvirt server for PowerShell v5.1 or later.

Installation

  1. Download module archive from release page.

  2. If need, remove Zone.Identifier from archive.

    Unblock-File PwshVirt.zip
  3. Extract archive to PSModulePath. The module's folder name is 'PwshVirt'.

Server Configuration

This module connects to Libvirt server with TCP or TLS.

Configure Libvirt server in /etc/libvirt/libvirtd.conf

  • TCP

    listen_tcp = 1
    auth_tcp=none
    
  • TLS

    listen_tls = 1
    

Usage

Import-Module PwshVirt

# connect to Libvirt server using tcp protocol.
Connect-VirtServer -Transport tcp

# list all defined domain.
Get-VirtDomain

# disconnect from Libvirt server.
Disconnect-VirtServer

Help

see docs directory.