summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/all/1505652
blob: 041cd5c3bcce7c2d362ecb910a1efca1b073f6c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
permissions: 0.993
debug: 0.991
register: 0.991
semantic: 0.990
architecture: 0.989
device: 0.989
assembly: 0.987
performance: 0.985
user-level: 0.984
arm: 0.983
graphic: 0.982
PID: 0.981
peripherals: 0.979
virtual: 0.976
risc-v: 0.974
files: 0.974
socket: 0.971
boot: 0.969
network: 0.968
hypervisor: 0.966
vnc: 0.964
mistranslation: 0.951
kernel: 0.944
ppc: 0.943
KVM: 0.943
TCG: 0.932
VMM: 0.929
x86: 0.817
i386: 0.666

An IO error happen when qemu  snapshot-create

My qemu version is 1.7.1,but when I try to make live snapshot by libvirt,the libvirt sometimes report an error :qemuMonitorJSONCheckError:377 : internal error: unable to execute QEMU command 'transaction': An IO error has occurred.

Here is the command being snpshot create by virsh:
virsh  snapshot-create snapshot-test.vm   snapshot.xml  --no-metadata  --disk-only --reuse-external
the snapshot.xml:
<domainsnapshot>
  <description>test</description>
  <disks>
    <disk name='vda' snapshot="external">
      <source dev='/home/disk/sbd8' file='/home/disk/sdb8'  type="block"/>
    </disk>
  </disks>
</domainsnapshot>


I have read the qemu code about the snapshot create, and I find the qemu when call the function handle_aiocb_rw_linear():
static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf)
{
    ssize_t offset = 0;
    ssize_t len;

    while (offset < aiocb->aio_nbytes) {
        if (aiocb->aio_type & QEMU_AIO_WRITE) {
            len = pwrite(aiocb->aio_fildes,
                         (const char *)buf + offset,
                         aiocb->aio_nbytes - offset,
                         aiocb->aio_offset + offset);
        } else {
            len = pread(aiocb->aio_fildes,
                        buf + offset,
                        aiocb->aio_nbytes - offset,
                        aiocb->aio_offset + offset);
        }
        if (len == -1 && errno == EINTR) {
            continue;
        } else if (len == -1) {
            offset = -errno;
            break;
        } else if (len == 0) {
            break;
        }
        offset += len;
    }

    return offset;
}

The function pwrite happen error,the errono is 1,and the  error describe:"pwrite  failed, Operation not permitted (1, EPERM) because the process does not have the appropriate privileges to use the pwrite system call".
The qemu call stack about is:
external_snapshot_prepare()->bdrv_flush()->...->paio_submit->...->handle_aiocb_rw_linear.

Please ask the libvirt community for help.  This issue is probably related to your libvirt storage setup.

On Tue, Oct 13, 2015 at 11:52:26AM -0000, jiangchi68 wrote:
> My qemu version is 1.7.1,but when I try to make live snapshot by
> libvirt,the libvirt sometimes report an error
> :qemuMonitorJSONCheckError:377 : internal error: unable to execute QEMU
> command 'transaction': An IO error has occurred.
> 
> Here is the command being snpshot create by virsh:
> virsh  snapshot-create snapshot-test.vm   snapshot.xml  --no-metadata  --disk-only --reuse-external
> the snapshot.xml:
> <domainsnapshot>
>   <description>test</description>
>   <disks>
>     <disk name='vda' snapshot="external">
>       <source dev='/home/disk/sbd8' file='/home/disk/sdb8'  type="block"/>
>     </disk>
>   </disks>
> </domainsnapshot>

Please send your question to <email address hidden>.

It could be related to /home/disk file permissions.