GenVM - Interactive mode

GenVM create disks images completely automatically, but you can use an interactive mode, with option ‘-i’, to open a shell during installation. The shell, Bash, start on the directory where you invoke genvm. The virtual machine is still mounted and you can chroot on it to use your future system.

This mode permit to customize your VM manually as you want from the host.

When the shell start, your location is displayed:

You are here : /users/fhh

as well as the mount point of virtual machine:

Virtual machine is mounted here : /tmp/tmp.WpMWT3v9N0

as mentioned, use “Ctrl+d” or “exit” to exit interactive mode.

Example

fhh@aaricia ~ $ su -c "genvm -i -p toor test.vmdk"
Password: 


*** ENTERING IN INTERACTIVE SHELL ***

You are here : /users/fhh
Virtual machine is mounted here : /tmp/tmp.WpMWT3v9N0
Press "Ctrl+d" or "exit" to exit


bash-4.3# ls /tmp/tmp.WpMWT3v9N0
bin  boot  dev  etc  home  initrd.img  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  vmlinuz

When you change root to your future system, remember to source “/etc/profile” to access to commands:

bash-4.3# chroot /tmp/tmp.WpMWT3v9N0 /bin/bash
root@aaricia:/# ls
bash: ls: command not found
root@aaricia:/# source /etc/profile
root@aaricia:/# ls
bin  boot  dev  etc  home  initrd.img  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  vmlinuz
root@aaricia:/# exit # exit chroot
exit

Copying a file from host to the virtual machine:

bash-4.3# cp config.tar.gz /tmp/tmp.WpMWT3v9N0/root/

Exit interactive mode:

bash-4.3# exit


*** END OF INTERACTIVE SEQUENCE ***