Artifact ID: | 7768da8a2ee0a485678d7f9605657a33898191d4 |
---|---|
Page Name: | Concepts |
Date: | 2017-01-14 15:31:44 |
Original User: | vitus |
Mimetype: | text/x-markdown |
Parent: | d2e2adc27dd2ec6b5f96fcede8432a80a8a21c8b (diff) |
Next | 4cb8c5829f11889a2d655e252af46004c8c87bb0 |
Concepts
Use vws script.
Although there is start script in the directory of virtual machine, which is theoretically can be used to start machine without vws script, most operations witb virtual workstations should be done via vws.
You can edit start script direcrtly and add options vws doesn't know about yet, but it should be done with care - vws might parse and edit this script. We would take as much care as we can to preserve user modifications.
There are also things in the start script which should be kept intact or vws would be unable to perform some operations - such as attach cdrom on start.
Note that vws start command is able to pass arbitrary qemu optyions.
If you want to send commands to qemu monitor, preferrable way to do so is
vws monitor
command. It interacts nicely with other qemu commands, so you can be sure that if you use some vws command while monitor is open, it would not break things.
Personal and shared VMs
vws supports personal and shared VMs. By default, vws create creates personal vm in the ~/VWs. If you want to create shared VM, use --shared option.
~/VWs may be symlink to another partition where there is enough space for virtual machines.
If you want to share already created VM, just move it to shared VMs directory, as specified in /etc/vws.conf and chgrp it to vm_group (as specified in the same file). You should be able to do so without superuser rights, because shared VM directory should be writable to vm_group (if vws is properly set up) and you must be member of this group to use kvm at all.
VMs are created group writable anyway, both shared and personal. It does no harm to have personal VMs group-writable, because modern Linuxes have personal group for each user.
Autostart VMs
Sometimes it is desirable that some VMs start upon system bootup. In vws autostart VMs are considered shared.
/etc/vws.conf lists two directories for shaed vms SharedVMs and AutostartVMs. VMs in first directory should be started explicitely one by one using vws start command.
VMs and second one are started at once by vws autostart.
Note that there also is vws shutdown command which tries to stop any running VM it finds - shared or personal, autostarted or not.
Creating Virtual Machines
There are reasonable defaults for almost all machine parameters in the
/etc/vws.conf
. So, you just speciy those parameters you want to change.
Importing images from other systems
VM in vws consists of at least disk image and start script. So, if you want to use VM disk image created by some other virtualization system (virsh, oVirt, VirtualBox, VMWare), you have to create VM from existing image.
Just specify your image in the --image option of create command, and it would be converted from its original format to qemu qcow2 format and start file would be written.
Creating VMs by installation from ISO image
If you specify ISO image via --install option to vws create, newly created virtual machine would be started immediately and given image attached to its virtual CD-ROM drive, so installation process starts.