Monday, March 23, 2009

Migrate aNd Manager Release 0.71


Welcome to the team
First welcome Kezong Liang, Stephen joing me on this project. Stephen will be concentrating on multi-language support of the program.

What's in 0.71 release?
This release is a preview of 0.8. Several bugs have been fixed in GUI mode. And it could be download with yum from Mohak Dilipbhai Vyas.
The GUI function is only showing ideas of how the GUI may look like.

Instruction:
1. download this rpm package and put vyasrepo in your repo list
http://matrix.senecac.on.ca/~mdvyas/vyasrepo-10-1.fc10.noarch.rpm
2. type in this command..
yum install mnm

How to run...
the program will be saved in your /usr/sbin/. If you do not want to risk you documents, running in virtual machine is strongly recommanded.

Thanks
Thank you for Patty, Milton on helping me testing this program, and Mohak kindly packaged this program and put it in his repository. And of course all the hard work from Stephen Liang. :-)

Wednesday, March 18, 2009

How many VMs can my Asus EEE PC handle?? 2?? no.. 4?? em... hehe..




Intro:
I've been working on my NAD project with vbox's vms.. i'm really curous what this little single core cpu machine can do. Here is the config..

Asus EEE
- 2G Ram (MAX for eee)
- Fedora 10
- fresh boot
- laptop mode (as real ram as much as possible, instead of swap)
VMs
- 4 F10 with 256 ram, 4mb Video ram, text mode (init 3)
- 1 F10 with 512 ram, 12mb Video, X windows

Assumption:
- F10 host (Asus EEE) fresh boot with X running use about 500-700mb
- One F10 VM in text mode use around 250Mb
- idealy
- total 2gb ram means I can use at least 5 Vms.. (700+(250*5))
- when the VM in text mode and idle, it use 5-15% CPU
- start all VMs one by one to reduce run time and chance of crashes

Result:
- IT WORKS!!! 5VMs running smoothly!!
- impressive!!
- it use some swap but.. well.. cos the last one was 512mb F10..
- it may able to run 6 VMs smoothly if I have 2 more 256mb ram F10
- really impressive!!
- if it has service running (httpd, dns).. it may use a bit more memory... and a lot more CPU. using a 'find' command use 60% host CPU already!
- it may able to handle 6VMs or even 7VMs in text mode and still have an acceptable performance. even with some simple service on and those are not busy services..
- it's perfect for testing...
- it's absolutely impressive!!!! ;-p

Adding a bridge NIC(virbr, br, pan) in Fedora 10(F10), purely command lines..

I've been using Virtual Box for a while and love it. But the downside of vbox is you can not use your NIC's alias as the bridge or interface. So, I found out a way to add a bridge NIC in pure command mode. Since there is no such tutorial online, I would love to write this down and share with you. This is just a short tutorial that to show you create a virtual NIC in command lines only.


========================================================================

brctl addbr virbr2
ifconfig virbr2 up
ifconfig virbr2

# now, record the MAC address of your Virtual NIC

vi /etc/sysconfig/network-scripts/ifcfg-virbr2
# and type all following lines in there,
# but modify 'HWADDR' as the MAC address
# and change the IP as you want.

TYPE=Ethernet
DEVICE=virbr2
HWADDR=B6:9F:39:E6:DC:64
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=no
NETMASK=255.255.255.0
IPADDR=192.200.200.2


# now, check if it's really working
# if it's successfull, the ip you typed before should be assigned
service network restart
ifconfig virbr2


========================================================================
then, your virtual NIC should be up and running after restart.


PS: i put a long title on purpose, so other people can google it. :-)

Monday, March 16, 2009

mNm Update



I've been working on the GUI after 0.7 release. The next release will have a working GUI that automatic mount Fedora supported partitions, and detect all users from supported OS. It will also have a click box that allow user just migrate certain folder, mount or users. And of course, automatically create user if the user is not existing.

And finally, I got my tree working with check box. The next step will be integrating these check box with the migration process. Since I don't have good foundation on python GUI module, this may take me a while.

But i can't help myself to show off my work, hehe.. even there is a lot to work on..so.. here is the capture...

Friday, March 13, 2009

mNm Release 0.7

Finally, GUI can work with out command lines!! :-) right now i'm calling "create and move" function to do file copying and automatic create users. This function will be the foundation of the program and it will be good enough to use in firstboot.

Anyway, here is the code...
mNm Release 0.7 source code

Sunday, March 8, 2009

mNm Release 0.6.3

It's only been few days after release 0.6. This release of 0.6.3 is not for bug fixing, it's actually some internal improvement of 0.6. It is kind of an early release 0.7 I have successfully move every thing into a class. And instead of putting supported OS database in array, i put them in a file and import them when necessary.

The next step of 0.7 will be targeting on calling internal function from GUI instead of using os.system to call up mNm in bash.

If time is allowed, I will also create another function to get all supported OS into a list. So, the GUI could just call up the function and user will be easier to choose.

Soure Code of mNm0.6.3


Some more to share...

It was tough to restructure the whole program. Especially it's about 800 lines of code now. Sometime I've totally forgot what i have and what i was trying to do in the code. So, I try to work on 0.7 as soon as I can, so i don't have to pick up again. ;-p

And surprisingly, every thing go smoother after 0.6 release. I didn't expect having my function use those classes would be so easy. I only spend about 5,6 hours from 0.6 to 0.6.3. That's a relief. :-)

Since the foundation is much more better now. All I have to care is improving the GUI, and build some small functions if necessary.

Wednesday, March 4, 2009

Migrate aNd Manage(mNm) Milestone for Release 0.7

Before adding functions on GUI, I want to build up a better foundation. At this moment it is impossible to have mNm pure GUI mode. Currently, mNm GUI will organise a command line with all parameters and call the line in batch. Which is acceptable but not a perfect GUI if I want this in firstboot. There for, I want to build a better foundation so I don't have to worry about variables in the future.

So, here is the milestone for mNm release 0.7:
= put all supported OS type and directory list in an array which is stored in a class for easier management and calling.
= GUI call up internal functions, instead of calling batch.


Please check the link below for updated milestone.
mNm Milestone Release0.7in FedoraHosted

Migrate aNd Manage(mNm) Release 0.6

After all hours and days of debugging, finally, release 0.6 is here. It sounds easy to put all variables into class, but.. OMG.. i couldn't believe how tough it was.. So I had to change my mile stone. But the brightside is, it's always better to improve the foundation instead of changing it later when its more than 2000 lines of code, right? Luckily... I have only did 800 lines... ;-p

Anyway, here is what I've done for Release 0.6...
- those code of sorting flags and calling function will be put in 2 functions instead of on the upper level lines. It's better for future development.
- put global variables into classes
- fixed all bugs after moving all global variables into classes - added a variable named "ProgMsg?" for easier debugging

mNm Release 0.6 code in FedoraHost

Migrate aNd Manage Release 0.6 Progress (and problems..)

After bug fix of 0.5, which is 0.52. I've moved all the codes into functions. I found there is problem on calling few functions, such as calling help.

After hours of testing and searching, I found the reason. The reason is because the way python handle global is totally different to my other programming language experience. Of course, I can assign global variable in functions then, I can change it in any where, or I can pass the variables. But... I think I'll change all variable in a class, so I can call up any time any where. And I think it's better for future development too.

This release's coding is more than I thought. It's more like restructuring the whole program instead of adding code on it. @@ And I'll have to do a lot of testing to make sure all variables pass successfully too. And I need a little plan on it too.

And the reason why I'm putting every into functions is because it's easier for GUI development. So I can actually call up the functions form GUI instead of just call up mnm in bash command with all parameters.