[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Stoping a VM & to start from Snaphshot



On Mon, Sep 15, 2008 at 6:07 AM, Johnson koil Raj <johnson.raj@xxxxxxxxx> wrote:
> Hi,
>
> i) How to stop a running VM in a Linux Machine.can I submit a second job
> to the host which running that VM to stop that VM

Yes, you can submit a Vanilla job to the host running the VM in order
to stop the running VM.
For example, each VMware VM corresponds to one running regular process
on both Linux and Windows called "vmware-vmx". If you try to kill the
process, you can stop the running VM. Or you can use vmware utility
called "vmware-cmd" to stop a running VM.

For either way, the second job need to run with the same user account
of the running VM so that the second job can have privilege to control
the running VM.

>
> ii) when a Snapshot image is created how to use that to start the VM
> next time.Where to place the Snapshot image file, whether with the same
> VMDK image, whether any changes to be made in VMX file.
>

Basically snapshot images and parent(original) image must be located
in the same machine.
Supposed that on your submit machine the original image is in
/original and a snapshot image in /snapshot.
In /snapshot, you can see "vmdk" and "vmx" files. These files already
contain the information of where is parent image. So if you want to
submit a new vm job with the snapshot image in /snapshot, on execute
machine the snapshot file need to be able to access the original image
in /original/

If you are using a shared file system and /original is in the shared
file system, you can submit a new VM job with vmware_dir = /snapshot.
Otherwise, you can't submit a new VM job with vmware_dir = /snapshot.

In no shared file system case, you need to create a new VM from
snapshot. That is, you need to combine original and snapshot to create
a new VM.

In order to combine snapshot and original, you can use either command
utility "vmrun" or GUI.
In GUI tools, "delete snapshot" means it.

However, the thing you need to know is that the final VM will be
generated in the directory of original VM. For example, when you try
to open a VM in /snapshot and execute "delete snapshot", files in
/snapshots will be deleted and files in /originals will be changed.
That is, original VM will now have the changes stored in the snapshot.


Best,
-jaeyoung