Fog::Libvirt
fog-libvirt is a libvirt provider for fog.
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.