/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Virtualization/kvm.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
modprobe kvm-intel|kvm-amd
2
 
 
3
 
* Creating disk image
4
 
    qemu-img create -f qcow2 vdisk.qcow2 32G
5
 
* Installation
6
 
    kvm -hda vdisk.qcow2 -cdrom /path/to/boot-media.iso -boot d  -m 1024
7
 
* Booting
8
 
    kvm -hda vdisk.qcow2 -m 1024
9
 
* VDE Network (default net, configured in /etc/conf.d/vde)
10
 
    kvm -hda solaris.qcow2 -m 1024 -net nic,model=rtl8139 -net vde,vlan=0,sock=/var/run/vde.ctl
11
 
* Problems
12
 
    vde problem, after daemon restart the qemu should be restarted
13
 
* More Options
14
 
    -nographic -serial null -monitor null
15
 
    -nographic
16
 
    -daemonize
17
 
    -localtime
18
 
    -soundhw es1370 -no-acpi -snapshot -localtime -boot c -usb -usbdevice tablet -net nic,vlan=0,macaddr=00:00:10:52:37:48 -net tap,vlan=0,ifname=tap0,script=no
19
 
 
20
 
Background Execution
21
 
====================
22
 
    kvm -hda solaris.qcow2 -m 1024 -net nic,model=rtl8139 -net vde,sock=/var/run/e.ctl -nographic -monitor null -serial none
23
 
 
24
 
    screen accessible later
25
 
    screen -dmS MyQemu qemu -hda /dev/hda -snapshot -m 512 
26
 
    screen -r MyQemu 
27
 
 
28
 
Forwarding USB
29
 
==============
30
 
 * Start KVM with USB enabled: kvm -usb
31
 
 * Switch to console: Ctrl+Alt+2
32
 
 * Add devices: usb_add host:####:####
33
 
    The numers can be acquired using lsusb
34
 
    Multi mode usb_add host:1234:*
35
 
 * Remove device: usb_dev <dev_id>
36
 
 * Connected: info usb
37
 
 
38
 
 - Running user should have permissions to access usb
39
 
 
40
 
 
41
 
Problems
42
 
=========
43
 
 * Lately gtk display of qemu is broklen. Add '-display sdl' option to run