How to start a Virtual Machine

This set of steps describes the way for creating a running instance of Virtual Machine. You have enough rights to run it properly, but at the same time oportunity to make harm to any already running virtual machine (unregister commands). In case of doubts -- please contact Marian.ZUREK@cernNOSPAMPLEASE.ch. Some commands might not operate as advertised due to known issues with Tools installation on Linux distributions. The commands listed below are known to work as expected.

  • login to the VM hypervisor either using your ssh-keys or password provided
ssh -2 root@lxb7978
  • list the registered VM:
vmware-cmd  -l
vmware-cmd /var/xen/mnt/vol1/lxetvm0041/base_SLC4_ia32_lxetvm0041.vmx getstate
  • get to one of working directories (one not listed above)
  • clean the directory
cd /var/xen/mnt/vol1/lxetvm0041 or /var/xen/mnt/vol2/lxetvm0042 or /var/xen/mnt/vol3/lxetvm0043
rm  *
cd /var/xen/mnt/vol1/lxetvm0041 or /var/xen/mnt/vol2/lxetvm0042 /var/xen/mnt/vol3/lxetvm0043
  • call one of the scripts with the parameters (base_SLC4_ia32 is a base SLC4installation, WN_base_SLC4_ia32 for is a standard WN installation ):
sh ../../createVM.sh base_SLC4_ia32 lxetvm0041 00:50:56:35:1f:CD
sh ../../createVM.sh base_SLC4_ia32 lxetvm0042 00:50:56:35:1f:CE
sh ../../createVM.sh WN_base_SLC4_ia32 lxetvm0043 00:50:56:35:1f:CF
  • after 10-15 minutes a virtual machine should be created for you
  • from another terminal you should be able to login to the virtual machine
ssh root@lxetvm0041 or lxetvm0042 or lxetvm0043
  • (OPTIONAL) if you want get back to the initial state of the machine (clean start) issue command from within the machine itself
poweroff
    • from hypervisor console (1 out of 3)
vmrun start /var/xen/mnt/vol1/lxetvm0041/hostname.vmx
vmrun start /var/xen/mnt/vol2/lxetvm0042/hostname.vmx
vmrun start /var/xen/mnt/vol3/lxetvm0043/hostname.vmx
  • when you do not need the virtual machine please stop it by command (from within the machine itself)
poweroff
  • deregister the machine from VM Server by issuing command from terminal open to lxb7978 (one out of 3)
vmware-cmd -s unregister /var/xen/mnt/vol1/lxetvm0041/hostname.vmx
vmware-cmd -s unregister /var/xen/mnt/vol2/lxetvm0042/hostname.vmx
vmware-cmd -s unregister /var/xen/mnt/vol3/lxetvm0043/hostname.vmx
  • clean the directory
cd /var/xen/mnt/vol1/lxetvm0041 or /var/xen/mnt/vol2/lxetvm0042 or /var/xen/mnt/vol3/lxetvm0043
rm  *

Prepared by Marian ZUREK. Any troubles/improvement ideas please report to Marian.ZUREK@cernNOSPAMPLEASE.ch

-- MarianZUREK - 15 May 2008

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2010-05-06 - AlbertoRescoPerez
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ETICS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback