trying to write a simple java program to connect to KVM, but getting the error
CODE
----------------------------------------------------------------------------------------------------
package com.poc.kvm_connection;
import org.libvirt.Connect;
import org.libvirt.ConnectAuth;
import org.libvirt.ConnectAuthDefault;
import org.libvirt.LibvirtException;
public class KvmConnectionApplication {
public static void main(String[] args) throws Exception {
KvmConnectionApplication application = new KvmConnectionApplication();
application.testConnection();
}
public void testConnection() throws LibvirtException {
ConnectAuth defaultAuth = new ConnectAuthDefault();
Connect conn = new Connect("qemu+tcp://10.230.211.237/system", defaultAuth,
0);
}
}
ERROR
--------------------------------------------------------------------------------------------------------------------
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load
library 'virt': The specified module could not be found.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:169)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:242)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:368)
at com.sun.jna.Native.loadLibrary(Native.java:353)
at org.libvirt.jna.Libvirt.<clinit>(Unknown Source)
at org.libvirt.Connect.<clinit>(Unknown Source)