qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding LoadVM capability for temporary snapshots


From: Soumyadipta Das
Subject: Adding LoadVM capability for temporary snapshots
Date: Thu, 28 May 2020 10:54:14 +0000 (UTC)

Hi All,

I am trying to add loadvm capabilities to the temporary snapshot mode which is entered through the "-snapshot" command argument.

In block.c file at "bdrv_append_temp_snapshot" function we can add the block snapshot information using:

    nb_sns = bdrv_snapshot_list(bs, &sn_tab);
    if (nb_sns > 0) {
        for (i = 0; i < nb_sns; i++) {
            sn = &sn_tab[i];
            bdrv_snapshot_create(bs_snapshot, sn);
        }
    }

However after adding the save state information like:

#include "migration/savevm.h"                                                                                                                        #include "migration/qemu-file.h"

QEMUFile *f_src,*f_dst;

f_src = qemu_fopen_bdrv(bs, 0);
f_dst = qemu_fopen_bdrv(bs_snapshot, 1);
qemu_put_qemu_file(f_dst, f_src);
qemu_fclose(f_src);
qemu_fclose(f_dst);

I get the following error at the linking stage:

block.o: In function `bdrv_append_temp_snapshot':
 undefined reference to `qemu_fopen_bdrv' 
                      
I have added qemu_fopen_bdrv definition to replication/savevm.h

Need help is linking block.o with replication/savevm.o

Regards,
Soumy


reply via email to

[Prev in Thread] Current Thread [Next in Thread]