Hello,
I would like to ask what I am doing wrong and what is the best approach to
resolve this situation:
First of all I start virtual machine by virDomainCreateXML. In my
application I use libvncclient library that sends mouse events to this
running domain. I had some troubles with coordinates of mouse cursor but all
problem was solved when I added <input type='tablet' bus='usb'/> to
xml
configuration.
So now I have a running domain and I want to create snapshot and then after
some operations I want to restore this snapshot. I use virDomainSave and
virDomainRestore that work fine. The only problem is, that after creating
and restoring snapshot I have the same problem with coordinates of mouse. I
need to create and restore snapshot also with <input type='tablet' bus=
'usb'/> somewhere specified. I also tried methods virDomainSaveFlags with
xml configuration string(see below) as parameter *dxml, but method fails
with: libvir: Domain Config error : XML error: domainsnapshot.Unable to
create snapshot.
What should I add to xml configuration? I look at
http://libvirt.org/
formatsnapshot.html on example but I dont know what paths I should use in my
program. I dont understand much snapshots and similar stuff so could you
give me example how could I edit my xml configuration? Or what I should do
to make virDomainSave and virDomainRestore work?
xml configuration:
<domain type='kvm'>
<name>Name</name>
<uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1810</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64'
machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<input type='tablet' bus='usb'/>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<source file='/home/lukas/Desktop/Image.img'/>
<target dev='hda'/>
</disk>
<interface type='network'>
<source network='default'/>
</interface>
<graphics type='vnc' port='5901'>
<listen type='address'
address='127.0.0.1'/>
</graphics>
</devices>
</domain>