[libvirt-users] Libvirt lvm pool and external snapshot
by Vasiliy Tolstov
Hello, does it possible to create external snapshot from lvm storage pool
based VM?
I want to create snapshot with disk only and doing volume download via
libvirt api.
How this possible?
P.s. I know about lvm command for snapshot,but I need to use pure libvirt
api.
9 years, 4 months
[libvirt-users] problems with xl (libxenlight)
by big strong
Since new version of xen use xl as the default toolstack to manage xen,
I've met a lot of problems.
1. xl has no commands such as start and clone, which is confusing. How can
I bring a vm back after I shutdown it?
2. Each time I use 'xl shutdown domid' it comes into "PV control interface
not available: external graceful shutdown not possible.
Use "-F" to fallback to ACPI power event." The only way to do it is to use
-F option and then the state of the vm turns to block. And it can never be
started again.
3. If I want to use virt-manger with xl. How can I import a vm created with
xl into virt-manager? I think there should be a convertion form cfg file to
xml file, but I haven't found official solution. What I did is to create a
new vm in virt-manager with the disk created by xl. but it always comes
into error when I tried to manage vm with virt-manager.
4. how can I change back to use virsh instead of xl as the toolstack to
manage xen? It's really aboring to counter all kinds of problems
9 years, 4 months
[libvirt-users] Proper way to reference a disk
by Michael Schwager
Hi,
We are running on CentOS 7.0. We want to move our VMs (kvm/qemu) from
qcow/image files to logical volumes under LVM.
I have moved one of them but I had a little trouble editing the disk
properly and I wonder what is the correct way to do it. Specifically, in
the XML under the devices/disk section why does the source say "source file=",
and not "source dev="? The reason I ask is that I have a number of other
machines to move and I don't want to mess them up.
The source file entry for the disk was like this in our xml file:
<source file='/var/lib/libvirt/images/pxetest.qcow2'/>
I got the vm to work by converting the image to raw, then dumping via dd
into the LV, and editing the XML using virsh as follows:
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<*source file*='/dev/kvm_temp/pxetest'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
By comparison I have a test machine on another real host upon which I
loaded a VM and put its disk into a logical volume. Its disk section looks
like this:
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<*source dev*='/dev/kvm_hosts/pxetest2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
The source file / source dev thing really has me wondering.
*- Mike Schwager*
* Linux Network Engineer, Mocho Trading LLC*
--
This message is for the named person(s) use only. It may contain
confidential proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender. You must not, directly or indirectly use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. Mocho Trading LLC reserves the right to monitor all e-mail
communications through its networks. Any views expressed in this message
are those of the individual sender, except where the message states
otherwise and the sender is authorized to state them to be the views of any
such entity.
9 years, 4 months
[libvirt-users] Using Virtio drivers with kernal 2.6.18-164.el5
by Jatin Davey
Hi All
I looked at this page for reference to using virtio drivers on KVM guests.
http://wiki.libvirt.org/page/Virtio
In the requirements section it is mentioned that we need a virtio
compatible guest with kernel >= 2.6.25
One of my guest has this version:
[root@localhost ~]# uname -a
Linux localhost 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64
x86_64 x86_64 GNU/Linux
I was still able to use the virtio drivers by enabling the corresponding
options in the qemu xml file and also i created a new initrd image file
inside my guest using the mkinitrd command as mentioned in the link
provided above.
My question is , Is it fine to use the virtio drivers with the kernel
that i have for my guest or i definitely need to get to kernel version
>= 2.6.25 ?
Thanks
Jatin
9 years, 4 months
[libvirt-users] Source information not showing for virsh domiflist causing problems with migrating VMs
by Carl J Taylor
Hi,
Does anyone know of a way to get around this problem. I have several long
running VMs running on an Ubuntu 14.10 host and for some reason I am
getting errors when trying to migrate them to another host. If I restart
the VM then the problem does not exist, however for various reasons that is
not an option with the remaining VMs.
root@comp001:~# /root/bin/vm_migrate.sh ws001 comp003
virsh migrate --live --persistent --tunneled --p2p --unsafe --domain ws001
--desturi qemu+tcp://comp003/system
error: internal error: No <source> 'bridge' attribute specified with
<interface type='bridge'/>
I have eventually figure out that the problem is not with the XML
definitions for the host, but is related to the details of the network
interfaces assigned to the host as output by the virsh domiflist command.
The question I need to resolve is how do I populate the missing Source
information.
Any help gratefully appreciated.
Kind regards
Carl Taylor
root@comp001:~# libvirtd --version
libvirtd (libvirt) 1.2.8
root@comp001:~# virsh domiflist --inactive ws001
Interface Type Source Model MAC
-------------------------------------------------------
- network br300 virtio 52:54:00:62:9b:20
- network br201 virtio 52:54:00:f0:73:85
- network default virtio 52:54:00:69:b1:e5
root@comp001:~# virsh domiflist ws001
Interface Type Source Model MAC
-------------------------------------------------------
vnet18 bridge - virtio 52:54:00:62:9b:20
vnet19 bridge - virtio 52:54:00:f0:73:85
vnet20 network default virtio 52:54:00:69:b1:e5
9 years, 4 months
[libvirt-users] [Libvirt Users]how to provide password authentication for qemu driver
by Dhaval_Shah1@dell.com
Dell Customer Communication
Hi All,
I am using
Compiled against library: libvirt 1.2.9
Using library: libvirt 1.2.9
Using API: QEMU 1.2.9
Running hypervisor: QEMU 2.1.2
I want user to provide username and password authentication to virConnectPtr
virConnectOpenAuth(const char *name,
virConnectAuthPtr auth,
unsigned int flags) to login remotely for the qemu hypervisor.
But it is not taking user provided username and driver. Because internally it is calling below qemu driver function,
static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
so it is not taking any user provided auth parameters and it is internally calling separate function for prompting password. I don't want to provide password here.
In case of windows HyperV it is working fine as it takes auth parameters but for Qemu Hypervisor I am facing this issue since here the auth parameters as marked as ATTRIBUTE_UNUSED.
Can anyone help me with this that how can I achieve this?
Thanks & Regards,
Dhaval Shah
9 years, 4 months
[libvirt-users] Hyperv on windows 2012 R2 support in libvirt
by doyensundu
Hi,
I have been trying to work with libvirt apis to manage
hyper-v on windows 2012 r2 server.
I had taken patch a modified it to suite the latest code on GITHUB.
I could able to connect. But i don't know what else to do and how to use
the api's. There is no documentation.
I want to use/manage hyper-v to provision guest OS's, configure network,
create virtual switch etc.
I see few classes (
https://msdn.microsoft.com/en-us/library/cc136822%28v=vs.85%29.aspx) have
been implemented in libvirt.
The classes include : Msvm_ComputerSystem, Msvm_ConcreteJob,
Msvm_MemorySettingData, Msvm_ProcessorSettingData,
Msvm_VirtualSystemSettingData, Win32_ComputerSystem, Win32_Processor.
I want to know how to use libvirt api's to connect, provision a guest os,
configure network.
Few examples/guidance would be helpful to me.
Thanks
surender
9 years, 4 months
[libvirt-users] Limitations of macvtap devices?
by Lars Kellogg-Stedman
I am running OpenStack inside a libvirt guest that is connected to the
local network via a macvtap interface. My experience so far suggests
that a macvtap interface will not pass traffic with a source MAC
address other than the MAC address of the interface itself...for
example, if inside the guest eth0 is attached to a bridge.
Is that correct, or is there some setting that will make that work?
Outbound traffic doesn't seem to be a problem (I can see, for example,
dhcp requests on the local network), but replies get dropped before
they reach the guest.
Thanks,
--
Lars Kellogg-Stedman <lars(a)redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack | http://blog.oddbit.com/
9 years, 4 months
[libvirt-users] Improved Shared Folders UX and security
by drift@ruggedinbox.com
Would it degrade security if libvirt were to handle SELinux labeling of
shared folders automatically instead of the manual adjustments needed
currently?
Would it degrade security if libvirt were allowed to create a non
existing shared directory specified in a VM's xml upon import?
9 years, 4 months
[libvirt-users] SELinux for separate shared folders
by drift@ruggedinbox.com
How can I enforce SELinux separation between the shared folders
belonging to different VMs running with sVirt's SELinux dynamic labels?
I want to create a permanent exception for VM 'A' to only be able to
read and write to shared folder 'A' and the same for VM 'B' and shared
folder 'B'
svirt_image_t permits access to a shared folder but for all VMs.
9 years, 4 months