Index: vws ================================================================== --- vws +++ vws @@ -477,11 +477,15 @@ def cmd_autostart(options): """ Starts all VMs which are in the autostart directory """ + import pwd dirname = config.get("directories", "AutostartVMs") + os.seteuid(pwd.getpwnam( + config.get("permissions","autostart_user") + ).pw_uid) if not os.access(dirname,os.R_OK): return for name in os.listdir(dirname): if not os.access(os.path.join(dirname,name,"start"), os.X_OK): continue Index: vws.mkd ================================================================== --- vws.mkd +++ vws.mkd @@ -144,10 +144,21 @@ allow qemu, started from non-root user to add interface to bridge. 2. Create bridge interface to use. You can have several bridges and specify which one would be used on VW creation. Really, by manual editing of the startup script, you can add several network interfaces to VW and connect them to the different bridges. + +You should assign some MAC address to the bridge interface used by +virtual machines. + +If you ethernet interface is part of the bridge, it already have one. +Otherwise use command + + ip link set dev *bridge_name* address XX:XX:XX:XX:XX:XX + +or some distribution-specific configuration file. + 3. Setup you host system to forward packets from bridge network to outside internet. You can either use NAT, or include your ethernet interface into bridge. 4. Make sure DHCP server is running in the bridge network. If your ethernet interface is part of the bridge, VWs would get their dynamic IP @@ -262,10 +273,15 @@ **vws spiceuri** *machine* Prints out URI you should feed into your spice viewer to access this machine. +**vws list** [ **--state** ] + +Lists available virtual machines. If **--state** option is given, prints +out state (running or stoped) type (private or shared) and spice URI (if +machine is running). **vws sendkey** *machine* *keyspec* Allows to send some key combination to the virtual machine. For example if windows screen is locked spice client is sometimes unable to deliver @@ -305,10 +321,11 @@ Configuration file for [vws], which uses standard .ini format. There are following sections [directories] + [permissions] [create options] [tools] Directories section ------------------- @@ -323,10 +340,22 @@ It is recommended to have both these directories on the same partition, so moving VM from autostart to shared and vice versa would not involve physically copying of the files. **NB** *autostart is planned for version 0.3* +Permissions +----------- + +Options of this section controls interaction with unix user names and +groups for shared and authostarted VMs. + +* autostart_user - user name of user which should all autostart vms run +run as +* vm_group - group name which should own all shared VMs. +* setgid_vm - boolean, true if setgid attribute should be set on shared + VM directory + Create options -------------- This section list default values, used by **vws create** to create new virtual machines.