Wednesday, February 11, 2009

The VM CLone War...

= The VM Clone War =
Lately, the LUX team has been using VM a lot. And I think half of us are using Virtual Box. And we have to setup a network with VMs. Instead of installing your system one by one, you can actually clone you hard disk and add another vm. On my beloved LUX-ers requested, here is how your clone your vm HD.

1. First, clone your hard disk with VBoxManage command
VBoxManage clonehd /media/NesEeeStorage/VMs/vm-Fedora10c.vdi /media/NesEeeStorage/VMs/vm-Fedora10a.vdi

2. Add your new vm with a different name.
Here is the capture....
[bossanesta@NesEeeF10 VMs]$ VBoxManage clonehd /media/NesEeeStorage/VMs/vm-Fedora10c.vdi /media/NesEeeStorage/VMs/vm-Fedora10a.vdi
VirtualBox Command Line Management Interface Version 2.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.


=== NOTES ===

= if your VM's HDs are in different path =
The VBoxManage is kinda weired. When you run it, it will only search vm's harddisks in default path. So, if you changed your vm location like I do. Use full path just like me.

= creating VM with command
You can do it in GUI mode or.. if you wanna be a VBox-Guru, try "VBoxManage create". "man VBoxManage" is your friend.

= about VM networking
I've been trying to create a VM network. well.. got a lot of trouble.. @@ but i found there is a typo in VBox's office tutorial . It drove me crazy, cos I didn't expect a simple mistake from an official site while a lot of people I know got help from that page. So, I was trying to yum install this and yum install that.. My ubuntu's vbox is not working now, cos somehow I got a wrong version of vbox. Anyway, here is the typo....

PATH=/sbin:/usr/bin:/bin:/usr/bin <== the last one should be "/usr/sbin".

= It's cross platform!
Do not forget that VBox is cross platform! It means, If you have a dual or tri or quad boot like me, you can run your VM in Linux, Windows, Solaris, OSX!! That's the reason why I'm using it instead of KVM althought KVM provide a better control.

= Cloning is good news for lazy sys admin
It's always good to keep a copy of your VM. Because if you don't have enough time to trouble shot your VM and things happened. You can always go back to the one your clone before. I have been using VM for 1 months, created over 10 VMs so far in 3 tri-boot laptops. And I found that sometime the VM's hd got problem if you restart a lot. And I always just use another one, cos it's faster than scanning the HD.

I not a big fans of auto update. First newer dosen't mean better, second, you may have a big chance that things are not working. That including linux kernel and vbox. When I was trying to install VBoxManage, I downloaded the package from repo.. and.. my vbox dosen't work any more. I guess it happened to Mohak(vyas) also. And he used the windows way to fix this linux problem --> uninstall and install. And it worked... @@ Looks like I'll do the same thing... I'm putting this in the last point, cos I dun want ppl know that I'm using the "windows way" to trouble shot.. and u know.. ususally people dun even bother read the whole blog. ;-p

No comments: