[libvirt-users] some problem with snapshot by libvirt
by xingxing gao
Hi,all,i am using libvirt to manage my vm,in these days i am testing
the libvirt snapshot ,but meet some problem:
the snapshot was created from this command:
snapshot-create-as win7 --disk-only --diskspec
vda,snapshot=external --diskspec hda,snapshot=no
but when i tried to revert from the snapshot which created from the
above command ,i got error below:
virsh # snapshot-revert win7 1338041515 --force
error: unsupported configuration: revert to external disk snapshot not
supported yet
version:
virsh # version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.93
10 years
[libvirt-users] hotplug
by Douglas Russell
Another separate thread for a slightly separate issue.
For some reason, hotplugging disks does not work for me.
I built my guest with ubuntu's vmbuilder. It's Precise, virtual.
I have acpiphp in my /etc/modules file:
$ lsmod
Module Size Used by
psmouse 97443 0
serio_raw 13211 0
virtio_balloon 13108 0
acpiphp 24231 0
floppy 70365 0
hotplug_pci seems to be compiled into the kernel:
$ grep HOTPLUG_PCI /boot/config-3.2.0-32-virtual
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_FAKE=m
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_HOTPLUG_PCI_CPCI=y
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
CONFIG_HOTPLUG_PCI_SHPC=m
But when I attach a disk, absolutely nothing happens in the guest. No
messages in the logs, no change to /proc/partitions, no new device nodes.
When I reboot, the disk appears.
Any ideas?
Thanks,
Douglas
12 years, 1 month
[libvirt-users] libvirt python api error
by 宣铭艺
I use the code below:
import libvirt
auth =
[[libvirt.VIR_CRED_AUTHNAME,libvirt.VIR_CRED_NOECHOPROMPT],'root',None]
conn = libvirt.openAuth("qemu:///system",auth,0)
with open("/root/cflinux.xml") as f:
xml=f.read()
domain = conn.defineXML(xml)
domain.createWithFlags(0)
and report the error:
libvir: Security Labeling error : internal error cannot load AppArmor
profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
Traceback (most recent call last):
File "a.py", line 7, in <module>
domain.createWithFlags(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in
createWithFlags
if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed',
dom=self)
libvirt.libvirtError: internal error cannot load AppArmor profile
'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
who can help me fix the error?What may cause the error?
Thanks.
--
樱宝宝: http://www.xuanmingyi.com
12 years, 1 month
[libvirt-users] SCSI/IDE Devices in Guest
by Douglas Russell
I'm experimenting with how to attach storage to a guest virtual machine (I
sent another message to th elist about that as it's slightly different)
Looking in the XML files for my virtual machine, I see this:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/vm/myvm/tmpeuiVc9.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
However, /dev/hda is not a device in the guest. It is /dev/sda. It's not
really a problem in it's own right, but it's one of several connected
things which don't make sense. Is there some explanation for this?
I believe this is linked to some weirdness when I attach some extra storage
like so:
virsh attach-disk myvm /dev/lvm-group1/mystorage sdb --driver qemu
--persistent
This adds the following stanza:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/lvm-group1/mystorage'/>
<target dev='sdb' bus='scsi'/>
<address type='drive' controller='0' bus='0' unit='1'/>
</disk>
Looks about right. In the guest though, it pushes /dev/sda (root and swap
are here on sda1 and sda2) upto /dev/sdb (sdb1 and sdb2). Somehow it still
boots correctly despite fstab referrencing /dev/sda1 and /dev/sda2 for /
and swap. The new /dev/sda is this storage I tried to add as sdb. What
could be causing this?
Thanks,
Douglas
12 years, 1 month
[libvirt-users] Multicast with KVM NAT networking
by james pedia
I used omping to test multicast between 2 KVM VMs under same physical host, and
it is not working in terms of multicast (normal pings/ssh works between
these 2 VMs).
How to enable multicast for KVM guests running under NAT networking mode
under the same physical host?
Per some doc from RedHat, it would be very slow using NAT with multicast
for KVM. I have to use virbr0/NAT mode since I am using wireless. So
although it would be slow, it should still work, but this is not the case
for me.
12 years, 1 month
[libvirt-users] Attaching storage to a virtual machine
by Douglas Russell
I am slightly lost trying to attach some storage to a functioning virtual
machine. If this where a real machine, I would simply be trying to mount a
LVM volume.
I have found a lot of documentation about adding storage pools, but I'm
unsure if that is actually what I should be doing. Is that just for storage
of the virtual machines themselves? Once I'd added my LVM volume group to
virsh I could see no way of then assigning one volume of that to be offered
as a logical volume to one particular virtual machine.
I've also seen this:
http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/s...
Looks like I could use that to assign one of the LVM volumes in my LVM
volume group to the VM.
If anyone could explain the different function of these two techniques and
which sounds applicable I would be most grateful.
Thanks,
Douglas
12 years, 1 month
[libvirt-users] error : virPidFileAcquirePath:345 : Failed to acquire pid file '/home/corey/.libvirt/libvirtd.pid': Resource temporarily unavailable
by 何鑫
Hi all, When I try to start libvirtd, using "libvirtd -d", error notification shown below:error : virPidFileAcquirePath:345 : Failed to acquire pid file '/$HOME/.libvirt/libvirtd.pid': Resource temporarily unavailable Using "libvirtd -v", show: "libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info." The file "libvirtd.pid" only contains "2010" without any other infomation. I have checked that libvirtd has been installed in "/libvirt/sbin" with binary format by self-compiled. So how can I solve the problem? Or how to start libvirtd?
Meanwhile, virsh can't search "libvirt-sock", because the libvirtd is not started successfully.
Thanks a lot!
Corey
12 years, 1 month
[libvirt-users] overriding shutdown for LXC
by erkan yanar
Moin Im using lxc@libvirt for LXC-applicationcontainer.
Works quite nice for now, beside shutting down the container,
which is not implemented. Hooks don't help here, as far as I found out.
Is there a way to override/define the shutdown function?
Regards
Erkan
--
über den grenzen muß die freiheit wohl wolkenlos sein
12 years, 1 month