[libvirt-users] Can not restore domain from a shared state file
by Zhang Qian
Hi,
I have two KVM host: h1 and h2, both of them mount an NFS directory as a
shared storage.
I can save (virsh save <domain> <file>) a domain in h1 to a state file in
the shared storage successfully, but failed to restore it from h2 with the
following error message:
# virsh restore testRes.dat
error: Failed to restore domain from testRes.dat
error: operation failed: failed to start VM
I can always restore it from h1, but sometimes works for h2 (wait for a
while, then "virsh restore" command may succeed in h2). I guess the state
file generated by "virsh save" command is not intact from h2 point view, may
be cause by the cache of NFS server?
Any suggestions will be really appreciated, thanks in advance!
Regards,
Qian
14 years, 3 months
[libvirt-users] XML-Created domain vanishes after shutdown
by Alexander Topolanek
Hi,
im migrating existing kvm-images into libvirt domains, by creating a
domain in virsh from a xml file. The domain starts, is working fine, but
after shutdown it is lost, and I have to recreate it.
BTW, can I reset the domain count somewhere?
Any ideas?
thx and kind regards
Alexander
virsh # version
Compiled against library: libvir 0.4.6
Using library: libvir 0.4.6
Using API: QEMU 0.4.6
Running hypervisor: QEMU 0.9.1
This is my xml file:
<domain type='qemu' id='2'>
<name>munin</name>
<uuid>6bb2995a-5443-2ddb-67fe-d69a9814ece4</uuid>
<memory>262144</memory>
<currentMemory>524288</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>preserve</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/kvm/virsh/munin.img'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='00:30:1c:45:40:02'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'
keymap='de'/>
</devices>
</domain>
14 years, 3 months
[libvirt-users] How to eject cdrom by libvirt API
by Zhang Qian
Hi,
I want to eject cdrom by calling libvirt C API, I found there is a similar
feature in virt-manager: disconnect cdrom from the related iso file, I am
wondering how to achieve this by libvirt API.
Thanks!
Regards,
Qian
14 years, 4 months
[libvirt-users] remote libvirt vbox
by angelo alfano
I tried:
import libvirt
conn = libvirt.open("vbox+ssh://user@192.168.0.10/session")
Prompted for a password for ssh connection, but returns this
error:
libvir: QEMU error : server closed connection
Traceback (most recent call last):
File "/home/angelo/workspace/test.py", line 11, in <module>
conn = libvirt.open("vbox+ssh://user@192.168.0.10/session")
File "/usr/lib/python2.6/dist-packages/libvirt.py", line 169, in open
if ret is None:raise libvirtError('virConnectOpen() failed')
libvirt.libvirtError: server closed connection
14 years, 4 months
[libvirt-users] error libvirt
by angelo alfano
I have a problem con libvirt, if running this python code:
import libvirt
conn = libvirt.open("vbox:///session")
return this error:
libvir: QEMU error : server closed connection
libvir: warning : Failed to find the interface: Is the daemon running ?
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a node driver: Is the libvirtd daemon running ?
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a secret storage driver: Is the daemon running ?
If I running the python code in sudo mode, I don't have error.
I have before add the my user at the group "libvirtd" with:
sudo adduser user libvirtd
Angelo
14 years, 4 months
[libvirt-users] Volume not found when migrating a VM
by Mathias Tausig
Hello!
I want to migrate a machine from one host to another.
But upon running
migrate drbd01 qemu+tls://192.168.20.2/system
in virsh, I get the error message
Fehler: cannot open file '/dev/masterGroup/drbd01_system': No such file
or directory
"/dev/masterGroup/drbd01_system" is the LVM based system volume of the
VM to be migrated which is of course available (the machine can be
started without any problem). I tried to execute the migrate comman both
locally and remote.
I am using libvirt 0.8.1 under SLES11.
regards
Mathias
14 years, 4 months
[libvirt-users] Error connecting to console
by Anthony Davis
Hi,
i have KVM running at the moment and im trying to do a text based
install of centos, so i need to connect to the console via virsh
virsh console servername
but i get this error:
error: Failed to get local hostname
How do i resolve this issue to get a consol connection to the server?
I have tried to put it into the /etc/hosts file, but to no avail.
Hope someone can help or suggest another method of doing a headless
and X less install of a guest?
Kind Regards
Tony
14 years, 4 months
[libvirt-users] migration using libvirt api
by rahul singh
Hello,
I am working on xen hypervisor. I am facing problem in migating vm
locally on same system using libvirt api. please help me with some c sample
codes. Please send some demo programs or some related help how to migrate a
vm locally using libvirt api.
Thanking Yuo
Rahul Singh
14 years, 4 months