README.txt
author Jens Kasten <jens@kasten-edv.de>
Sat, 24 Aug 2013 14:45:02 +0200
changeset 128 dcbcfd2a5421
parent 127 8eb957db5ee1
permissions -rw-r--r--
Added tag version 0.1.7.8 for changeset 8eb957db5ee1
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     1
=========
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     2
kvm-tools
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     3
=========
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
     4
A commandline script to use a simple domain(guest) configuration file.
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     5
122
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
     6
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
     7
=====
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
     8
Usage
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
     9
=====
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    10
### kvm-admin ####
127
8eb957db5ee1 fix bridge name with score or underscore
Jens Kasten <jens@kasten-edv.de>
parents: 122
diff changeset
    11
usage: kvm-admin [-h] [--debug] [--verbose] [--version]
122
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    12
                 {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    13
                 ...
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    14
kvm-admin: error: too few arguments
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    15
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    16
### kvm-admin -h ###
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    17
usage: kvm-admin [-h] [--debug]
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
    18
                 {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    19
                 ...
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    20
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    21
optional arguments:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    22
  -h, --help            show this help message and exit
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    23
  --debug               Print full python traceback.
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    24
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    25
All commands for kvm-admin:
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    26
  valid kvm-admin commands
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    27
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
    28
  {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    29
                        additional help
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    30
122
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    31
-----------------------------------------------------------------------------
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    32
### kvm-admin status all ###
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    33
List all running qemu-kvm domains
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    34
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    35
-----------------------------------------------------------------------------
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    36
Arguments with optional arguments:
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    37
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    38
### kvm-admin status -h ###
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    39
usage: kvm-admin status [-h] [--full] domain
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    40
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    41
positional arguments:
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    42
  domain      Show information about qemu-kvm domain(s).
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    43
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    44
optional arguments:
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    45
  -h, --help  show this help message and exit
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    46
  --full      Display full status information for each running qemu-kvm
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    47
              domain.
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    48
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    49
#### kvm-admin shutdown -h ###
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    50
usage: kvm-admin shutdown [-h] [--time-out 'in seconds']
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    51
                          [--wait-to-send-enter 'in seconds']
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    52
                          domain
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    53
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    54
positional arguments:
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    55
  domain                Shutdown a qemu-kvm domain. Its work for windows and
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    56
                        linux guests, but not on linux when the Xserver is
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    57
                        looked.
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    58
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    59
optional arguments:
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    60
  -h, --help            show this help message and exit
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    61
  --time-out 'in seconds'
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    62
                        Set the time out for waiting till the qemu-kvm domain,
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    63
                        will be killed.
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    64
  --wait-to-send-enter 'in seconds'
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    65
                        Set this will send, after a given time in seconds, an
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    66
                        enter signal to the qemu-kvm domain for the grafical
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    67
                        shutdown dialog.
c8c86db080e3 update README; add in docs/qemu-kvm.example as a gentoo init.d script; change version in setup
Jens Kasten <jens@kasten-edv.de>
parents: 113
diff changeset
    68
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    69
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    70
=========
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    71
Depencies
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    72
=========
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    73
List: python >=2.4 and < 3.0 
63
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
    74
      python-argparse (debian package name)
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    75
        optional using argparse from kvmtools.argparse 
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
    76
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    77
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    78
All others are standard python library.
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 51
diff changeset
    79
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    80
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    81
======
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    82
Update
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    83
======
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    84
When you update qemu-kvm than run this command:
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    85
	generate-kvm-options --generate --verbose
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    86
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
    87
This build a list of all availables qemu-kvm options.
63
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
    88
This is used to check if the given key in the configuration file 
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    89
is a valid qemu-kvm option.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    90
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    91
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    92
====
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    93
Info
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    94
====
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    95
The qemu-kvm option for monitor, and pidfile has default values.
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    96
But this options can be overriden in each domain configuration file.
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    97
The qemu-kvm domain name should not be "all".
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    98
See status description below.
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
    99
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   100
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   101
========
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   102
Downlaod
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   103
========
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   104
1. The scripts can downloaded via webrowser as bz2, zip, or gzip archive.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   105
	http://hg.kasten-edv.de/kvm-tools
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   106
	https://hg.kasten-edv.de/kvm-tools 
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   107
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   108
2. clone the mercurial repository. 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   109
    hg clone http://hg.kasten-edv.de/kvm-tools  
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   110
    hg clone https://hg.kasten-edv.de/kvm-tools --insecure
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   111
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   112
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   113
============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   114
Installation
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   115
============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   116
Look at INSTALL.txt.
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   117
# Fix: debian package and new setup.py 
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   118
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   119
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   120
==================
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   121
System preparation
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   122
==================
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   123
Its recommend to use an unprivileged user.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   124
It can set in the global configuration file /etc/kvm/config/kvm.cfg
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   125
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   126
Uncomment:
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   127
	# optional, add an user kvm to run the qemu-kvm process
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
   128
	runas = kvm
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   129
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   130
Each domain configuration file can have this option too to use for each domain 
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   131
a different user.
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   132
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   133
Example to use an system user kvm on debian. 
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   134
If qemu-kvm already is installed then add only the group kvm
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   135
and modify the /etc/passwd.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   136
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   137
	addgroup --gid 116 kvm
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   138
	adduser --system --gid 116 --uid 116 --home /var/run/kvm --disabled-password --shell /bin/false kvm
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
   139
	chown kvm:kvm /var/run/kvm  (or /usr/local/var/run/kvm)
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
   140
    chmod 750 /var/run/kvm  (or /usr/local/var/run/kvm)
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   141
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   142
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   143
=============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   144
Kernel module
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   145
=============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   146
If the kernel shipped by your distribution you have to load the follow kernel module.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   147
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   148
kvm-module:
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   149
	modpobe -v kvm-[intel|amd]
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   150
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   151
For using tap device:
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   152
	modprobe -v tun
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   153
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   154
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   155
=============================
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   156
QEMU-KVM domain configuration
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   157
=============================
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   158
An example for a domain configuration file.
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   159
The syntax values are 1:1 on commandline usage the only differ is instead using
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   160
	-option_name value
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   161
	option_name = value
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   162
63
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   163
Its exists only one tap option, which has an extend attribute.
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   164
This is only used in combination with tap device.
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   165
Its automatically add the tap device to given bridge.
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   166
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   167
The syntax to append to net = tap option is:
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   168
    Example:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   169
	net = tap,bridge=bridge_name 
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   170
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   171
For fist run, you can use:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   172
	kvm-admin my_new_domain create
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   173
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   174
This build a very minimalistic domain config through a console based dialog.
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
   175
# Todo: build a python dialog script
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   176
51
8955ce280ef3 update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 39
diff changeset
   177
Example domain configuration file:
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   178
    name = my_first_domain
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   179
    # first drive
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   180
    drive = file=/home/kvm/my_testfile.img,if=virtio,index=0,cache=none
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   181
    # second drive 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   182
    drive = file=/home/kvm/my_swapfile.img,if=virtio,index=1,cache=none
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   183
    # memory for using in the guest
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   184
    m = 512
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   185
    # default language for keyboard
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   186
    k = de
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   187
    # add more then one cpu to the guest
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   188
    smp = 2
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   189
    # vnc port 5901 on the qemu-kvm host machine
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   190
    # example usage: vncviever :1 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   191
    vnc = :1
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   192
    # first network interface
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   193
    net = nic,mac=00:50:11:22:33:00
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   194
    net = tap,bridge=br0
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   195
    # second network interace 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   196
    net = tap,bridge=br1
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   197
    net = nic,mac=00:50:11:22:33:01
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   198
    # to run kvm guest as unprivileged user
70
0972898cb40a small typo fix in README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 63
diff changeset
   199
    runas = kvm
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   200
    # override the pidfile, the directory have to writeable
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   201
    pidfile = absolute_path_to_pidfile
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   202
    # override the monitor to use tcp connection
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   203
    monitor = tcp:localhost:4444,server,nowait
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   204
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   205
Example kvm.cfg:
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   206
    # have to set the absolute path to qemu-kvm binary
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   207
    qemu-kvm = /usr/bin/kvm
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   208
    # optional, run the process in daemon mode
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   209
    daemonize = enabled
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   210
    # optional, use cpu typ 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   211
    cpu = core2duo
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   212
    # optional, use localtime in guest
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   213
    rtc = base=localtime
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   214
    # optinal, run as kvm user
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   215
    runas = kvm
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   216
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   217
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   218
================
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   219
Sound for guests
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   220
================
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   221
You have to do this as root user:
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   222
    modprobe -v snd-pcm-oss
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   223
Or:
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   224
    export QEMU_AUDIO_DRV=alsa 
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   225
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   226
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   227
====================
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   228
Hotplug a pci device
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   229
====================
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   230
If you plan to hotplug a device in a guest this kernel module have to load in guest. 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   231
	modprobe -v acpiphp
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   232
	modprobe -v pci_hotplug 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   233
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   234
Use the monitor to hotplug a device:
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   235
    # add a nic to guest
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   236
    kvm-admin my_guest monitor pci_add auto nic model=e1000
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   237
    # add a harddrive to guest
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   238
    kvm-admin my_guest monitor pci_add auto storage file=/path/to/partion_or_file,if=virtio
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   239
113
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   240
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   241
============================
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   242
Query qemu-kvm doamin status
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   243
============================
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   244
For a single qemu-kvm domain use:
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   245
    kvm-admin status domain_name
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   246
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   247
For all running domains use:
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   248
    # argument --full is optional and print more information
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   249
    kvm-admin status all --full
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   250
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   251
Info: The qemu-kvm domain name should not be "all" because of using in status
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   252
      report.
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   253
d180b27d13a9 add 'status all --full' options, update README
Jens Kasten <jens@kasten-edv.de>
parents: 112
diff changeset
   254
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   255
=============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   256
Monitor using
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   257
=============
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   258
You can communicate with the guest monitor on commandline.
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   259
Each command behind the monitor concatenate to a string. 
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   260
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   261
usage: kvm-admin monitor domain_name option
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   262
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   263
Reboot or shutdown or status can send via the monitor too.
112
0ca5084026ff update README.txt
Jens Kasten <jens@kasten-edv.de>
parents: 87
diff changeset
   264
    kvm-admin monitor domain_name system_powerdown
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   265
63
d52d274c7ae3 Update Readme
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   266
You can use the command line monitor like the orgin "ALT + CTRL + 2" monitor.
39
b0b22dee909a rename README to README.txt and update it
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   267
You can add an usb device or ecject cdrom etc.