NodeVirt
Simple libvirt module for Node.js
ALERT
This version is not stable for production environment. The code can be changed substantially during the development phases, the documentation is not yet present.
Features
- Hypervisor
- Connect - virConnectOpen
- Disconnect - virConnectClose
- GetHostname - virConnectGetHostname
- GetMaxVcpus - virConnectGetMaxVcpus
- GetSysInfo - virConnectGetSysinfo
- LookupByName - virDomainLookupByName
- LookupByUUID - virDomainLookupByUUID
- Domain
- Start - virDomainCreate
- Stop - virDomainDestroy
- Resume - virDomainResume
- Reboot - virDomainReboot
- Reset - virDomainReset
- Shutdown - virDomainShutdown
- Undefine - virDomainUndefine
- GetName - virDomainGetName
- SetVcpus - virDomainSetVcpus
- SetMemory - virDomainSetMemory
Example
var nodevirt = Hypervisor = nodevirtHypervisor; var hyper = 'qemu:///system';hyper; var domain = hyper;console; hyper;
Build
Install Tools:
$ sudo apt-get install make openssl libssl-dev g++ gcc$ sudo npm install -g node-gyp
Install Libvirt & KVM:
$ sudo apt-get install libvirt-dev qemu-kvm libvirt-bin bridge-utils
Install NodeVirt:
$ npm install nodevirt
To build form source run:
$ npm install$ node-gyp rebuild