Before we start, we need intellij enterprise version and a register tool..
[url]

[Summary]
1. We should open the pom.xml file instead of the project directory.
2. Modify the extension of the directory in the project properties.
3. Modify the .m2 file in your personal directory to make jboss know where to deploy the project.
4. We need seperate run/debug config to make it clearer.

[Steps]
OVIRT_HOME=/home/demo
JBOSS_HOME=/usr/jboss-as
JDK=/usr/java/jdk1.7.0_17
$ cmd as demo
# cmd as root

1.Compile the ovirt from src
in $OVIRT_HOME

$ mvn clean install -Pgwt-admin,gwt-user -DskipTests=true

2.Deploy ovirt
You need ~/.m2/settings.xml file in /root/ and /home/demo directory.





        
                        oVirtEnvSettings
        

        
                
                        oVirtEnvSettings
                        
                           /usr/jboss-as
                           /usr/java/jdk1.7.0_17
                        
                
         

in $OVIRT_HOME/ear

# mvn clean install -Pdep,setup

3.Run jboss
You should export an environment variant and a runtime configuration file.

$ echo -e "ENGINE_USR=admin111nENGINE_ETC=/etc/ovirt-engine" > $OVIRT_HOME/backend/manager/conf/engine.conf.defaults
# export ENGINE_DEFAULTS=$OVIRT_HOME/backend/manager/conf/engine.conf.defaults
# /usr/jboss-as/bin/standalone.sh

UPDATE:
Now there is README.developer in the source dir, just follow it.

UPDATE 2015.3.18
fedora 21中编译:
# yum install mingw* libtool* auto-buildrequires intltool glib2-devel icoutils msitools
# ./autogen.sh
# mingw64-configure
# mingw64-make -j4
# rpmbuild -bb mingw-virt-viewer.spec
编译msi过程中,可能会提示缺少storageencryption.rng,从以下地址下载即可。
https://raw.githubusercontent.com/wido/libvirt/master/docs/schemas/storageencryption.rng

在fedora环境中,需要的有spice-gtk,libusbx,usbredir,remote-review,全部下载最新git源
spice-gtk,usbredir
http://cgit.freedesktop.org/spice
libusbx
git://github.com/libusbx/libusbx.git
remote-viewer
git.fedorahosted.org/git/virt-viewer.git

libusbx和usbredir:

mingw32-configure;mingw32-make;mingw32-make install

spice-gtk:
mingw32-configure –with-sasl=no –with-audio=gstreamer –enable-smartcard=no –with-gtk=2.0 –without-python
因为virtviewer要gtk2.0的,所以这也就2.0的;mingw32下没找到pygtk,图省事儿就不要python了,其他的缺啥下啥

mingw32-make
mingw32-make install

virt-viewer:

mingw32-configure
mingw32-make
mingw32-make install

生成remote viewer.exe

安装包
运行nsiswrapper生成windows安装包

nsiswrapper --run 
    --name "Virt-Viewer" 
    --outfile "Virt-Viewer-for-Windows.exe" 
    --with-gtk 
    /usr/i686-pc-mingw32/sys-root/mingw/bin/virt-viewer.exe

缺少的dll从网上下或者windows环境中安装的virtviewer加到$PATH中
这样会缺少三个xml文件,在virtviewer/src里,直接copy过去

export PATH=$PATH:/usr/i686-pc-mingw32/sys-root/mingw/bin:.

windows client中使用usbredir:
需要libwdi或者zadig或者usbclerk
链接

todo:
只有libvirt不是最新的了,可是目前来看没影响

不喜欢java,就是不喜欢。。但还是要干的。。
4000多个文件构建UML图的话有点困难,都是小类,看了些tools的代码,然后转到vdsm内容,通讯方式是xml-rpc,当初我猜对了。

vdsm是oVirt的节点代理,功能可订制,也可移植到其他管理平台,基于KVM,储存VM各种暂态数据
vdsm提供的api通过xmlrpc使用,架构如下


------------+------VDSM-------+------+-----
            |                 |      |
    sysfs---+                 |      |
      LVM---+              libvirt   |
net-tools---+              qmp|      |Virtio serial
      xxx---+             ---+      +-------------/
           ...                |      |
                      -------/        -------
                     /                        
                    |  KVM-QEMU VM             |
                     ________________________/

主要包括vdsm,vdsm_cli,vds_bootstrap,vdsm_reg,vdsm_hooks
其中lifecycle hooks有针对vdsm和vm在before和after期间
bootstrap用于验证兼容性,包括网络,cpu,认证等,目前只支持RH自家产品

Ovirt
Just make some notes:
# need net
qemu-kvm -m 1024 -localtime -M pc -smp 2 -drive file=ovirt.qcow2,cache=writeback,boot=on -boot d -name kvm-ovirt,process=ovirt -usb -usbdevice tablet
Ovirt provided a fedora.iso with node in it. Ao is building the engine.

#on virtfan
spicec -h localhost -p 5910

node应该是自动加入engine的,结果是现在能加入,但是不能安装
nmap后engine确实是有8443,node只有22,安装过程是交互的(node通过外网获取安装包,返回状态到engine)

改变端口为443,按照troubleshooting更改engine上的nfs服务。f17上nfs默认建立服务为v4,要改为v3,并且添加group和user id分别为36的vdsm与kvm,用提供的脚本测试下。
Troubleshooting_NFS_Storage_Issues

ok,等明天加入节点就可以了。

Building ovirt from source
with cmdline
within an ide
install jboss maven plugin on eclipse

here’s the engine arch

and here’s the engine-core arch

运行engine-manage-domain需要ipa-server,类似windows的ActiveDirectory,需要不同于engine的主机上安装ipa
安装ipa-server