/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/Virtualization/qemu.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
KVM
 
2
---
 
3
 Disk Format: qcow2
 
4
 
 
5
 Virtualization: KQEmu and KVM are two approaches for paravirtualization. From
 
6
 performance point of view, their are quite close. Benchmarks:
 
7
    http://www.linuxinsight.com/finally-user-friendly-virtualization-for-linux.html
 
8
 
 
9
 Actually,
 
10
  a) KQEmu provides alternative (to kvm) kernel module, which should be loaded
 
11
  prior to qemu usage.
 
12
  b) KVM app. is a slighly modified qemu to get benefits of kvm kernel module.
 
13
  However, it requires qemu to be installed and uses parts of qemu's 
 
14
  infrastracture.
 
15
 
 
16
 
 
17
1. Converting VMWare images
 
18
  qemu-img convert W2K.vmdk  -O qcow2 ../w2k.bin
 
19
 
 
20
2. Mounting qcow2 images
 
21
   we need nbd, and at least kvm-70 (include qemu-nbd)
 
22
 
 
23
    Server:
 
24
        qemu-nbd w2k.bin --bind=127.0.0.1
 
25
 
 
26
    Client:
 
27
        connecting: 
 
28
            modprobe nbd
 
29
            nbd-client 127.0.0.1 1024 /dev/nbd0 
 
30
            fdisk -l /dev/nbd0
 
31
        
 
32
        populating partitions in /dev/mapper:
 
33
            kpartx -a /dev/nbd0 (kpartx is from 'multipath-tools' package)
 
34
 
 
35
        mounting ntfs filesystem:
 
36
            mount -t ntfs-3g /dev/mapper/nbd0p1 /mnt/tmp2/ -o force
 
37
 
 
38
        disconnecting:
 
39
            nbd-client -d /dev/nbd0
 
40
            
 
41
    Problems to expect:
 
42
        - Please note that read-write nbd with client and server on the same 
 
43
        machine is a bad idea: expect deadlock within seconds (this may vary 
 
44
        between kernel versions, maybe on one sunny day it will be even safe?).
 
45
        Read-write nbd with client and server on some machine has a rather 
 
46
        fundamental problem: when the system is short of memory, it tries to 
 
47
        write back dirty pages. So the nbd client asks the nbd server to write 
 
48
        back data, but as nbd-server is a userland process, it may require 
 
49
        creating dirty pages to fullfill the request. That way lies the 
 
50
        deadlock. Note also that the README in the source has a (slightly) more
 
51
        in-depth discussion of this problem.
 
52
        
 
53
2. Handling Windows installed on SCSI disk in VMWare:
 
54
        - Boot from Windows install CD and upgrade windows installation.
 
55
        Reinstall all service packs and hotfixes.
 
56
 
 
57
3. Changing to control console
 
58
    ctrl+alt+2 (ctrl+alt+1 - go back)
 
59
 
 
60
4. Save/Restore current state (Suspend/Resume in VMWare)
 
61
    Save: savevm <state_id>
 
62
    Restore: qemu -loadvm <state_id>
 
63
    Info: info snapshots (within qemu console)
 
64
    
 
65
    Question: Synchronization with disk images????
 
66
 
 
67
5. Better screen resolution
 
68
    -std-vga (requirment is a standard VESA driver in guest)
 
69
 
 
70
6. Mouse is not completely grabbed
 
71
    -usb -usbdevice tablet
 
72
 
 
73
7. Copy/Paste between host and guest
 
74
    Try: QEmu guest tools
 
75
        http://wolfpackally.wo.funpic.de/qemu/qgt/readme.txt
 
76
    or other network based clipboard sharing programms.
 
77
 
 
78
8. Other keys
 
79
    ctrl+alt+f          - Full screen mode
 
80
    ctrl+PgUp/PgDown    - Scroll console up & down
 
81
 
 
82
9. Problems
 
83
    - No screen autoresizing (autoresolution)
 
84
    
 
85
    More Infos:
 
86
    http://borderworlds.dk/blog/20070217-00.html
 
87
        
 
 
b'\\ No newline at end of file'