No commit activity in last 3 years
No release in over 3 years
This library can be used as a module for 'fog' or as standalone libvirt provider.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 5.0
~> 1.13.0
>= 0
>= 0
~> 0.3.4
>= 0

Runtime

>= 1.27.4
~> 0.1.1
>= 0
>= 0.7.0
 Project Readme

Fog::Libvirt

fog-libvirt is a libvirt provider for fog.

Build Status Dependency Status Code Climate Gem Version Gittip

Installation

fog-libvirt can be used as a module for fog or installed separately as:

$ sudo gem install fog-libvirt

Usage

Example REPL session:

>> require "fog/libvirt"
=> true
>> compute = Fog::Compute.new(provider: :libvirt, libvirt_uri: "qemu:///session")
=> #<Fog::Libvirt::Compute::Real:46980 @uri=#<Fog::Libvirt::Util::URI:0x0000000002def920 @parsed_uri=#<URI::Generic qemu:/session>, @uri="qemu:///session"...
>> server = compute.servers.create(name: "test")
=>
  <Fog::Libvirt::Compute::Server
    id="bbb663e4-723b-4165-bc29-c77b54b12bca",
    cpus=1,
    cputime=0,
    os_type="hvm",
    memory_size=262144,
    max_memory_size=262144,
    name="test",
    arch="x86_64",
    persistent=true,
    domain_type="kvm",
    uuid="bbb663e4-723b-4165-bc29-c77b54b12bca",
    autostart=false,
    nics=[    <Fog::Libvirt::Compute::Nic
      mac="52:54:00:d1:18:23",
      id=nil,
      type="network",
      network="default",
      bridge=nil,
      model="virtio"
    >],
    volumes=[    <Fog::Libvirt::Compute::Volume
      id=nil,
      pool_name="1Download",
      key=nil,
      name="test.img",
      path="/home/lzap/1Download/test.img",
      capacity="10G",
      allocation="1G",
      owner=nil,
      group=nil,
      format_type="raw",
      backing_volume=nil
    >],
    active=false,
    boot_order=["hd", "cdrom", "network"],
    display={:type=>"vnc", :port=>"-1", :listen=>"127.0.0.1"},
    cpu={},
    hugepages=false,
    guest_agent=true,
    virtio_rng={},
    state="shutoff"
  >

See README.md.

Contributing

Please refer to CONTRIBUTING.md.

License

Please refer to LICENSE.md.