Saturday, June 18, 2011

Connecting to samba share from windows guest on KVM

  1. Install samba server. I will not explain this here as it depends on your linux distribution.
  2. Configure it: cat /etc/samba/smb.conf
    [WorkShare]
    comment = Host Share
    path = /home/mansour/work/
    valid users = mansour
    public = yes
    writable = yes
    printable = no
  3. Now we need add "mansour" to samba users. If you don't this, you wont be able to login to the share!
    smbpasswd -a mansour
  4. start your KVM :
    kvm -m 2G -vga std -smp 2 -net nic,vlan=1 -net user,vlan=1 my-window-xp-pro.im
  5. From window Start --> Run : \\10.0.2.2\WorkShare
    enter the username and password, and you should be able to view the files in your share.

For reference: Use Windows XP on Gentoo Linux with KVM

Sunday, June 12, 2011

Installing Perl Modules with CPAN

I was trying to install the latest version of XSH2. Really a very neat utility, and a must for each XML programmer. The previous revision had a bug, and I didn't know that I can install the latest from CPAN, just like I install any other software with emerge, yum, RPM, or ruby gem. Ok, so here's the steps:
  1. Login as root.
  2. Initialize the CPAN configuration. This is easily done with:
    perl -MCPAN -we 'shell'
    Accepting all the defaults is ok.
  3. Now run
    install XML::XSH2
    And you are good to go.
I didn't know it's that easy to install perl modules !