Friday, February 6, 2015

sharing folder host and guest

Sharing folders and files from Host to KVM guest(both linux);

install samba server on Host. (system-config-samba)

Do the configuration required using system-config-samba. (adding directory to share, user name , password). (in Host) use same system-config-samba.

// to set rw permission on all folders uncomment this in /etc/samba/smb.conf

setsebool -P samba_export_all_rw on

sudo service smb restart

Then, do mount from KVM guest.
mount -t cifs //   /mnt/samba  -v

Note, here workspace should be last directory name of the past you shared.
For example in path /home/to/path/workspace.

to mount permanently using fstab add this entry :
 // /home/gfuser/workspace/ cifs username=username,password=whatever_password,iocharset=utf8,sec=ntlm 0 0

then run ,
mount -a

for best practices , use this guide

dd for creating a file with specific size

dd for creating a file with specific size

trying to create file: first used random - didn't work. then tried, urandom, worked fine. for non-cryptographic uses like this :) use only urandom.

renaming a file in git

want to rename a file in git ?

git mv