[libvirt-users] How to use /dev/mapper in virt-manager/libvirt
by Marc Haber
Hi,
my test host is running Debian/GNU Linux unstable and has virt-manger
0.9.5 and libvirt 1.2.1. I am using encryption and thus have devices
in /dev/mapper that are not LVs, for example called
/dev/mapper/myvirtualdisk.
I'd like to configure libvirt in a way that allows me to directly
assign such devices to a VM. This does not work when I create a
filesystem directory storage pool in virt-manager since virt-manager
obviously choked in /dev/mapper/control, which is a character special
device that is only readable by root. I currently help myself by
linking the devices in question manually to /dev/luksdev and having a
filesystem directory storage pool point to that directory. this works,
but is ugly.
Is there a nicer way to get the contents of /dev/mapper available as
volumes in virt-manager?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 31958062
10 years, 9 months
[libvirt-users] Failed to terminate process X with SIGKILL: Device or resource busy
by sylecn
Hi,
I'm using libvirt/kvm with openstack. When vm has CPU stall, the instance
can't be destroyed. I have asked the question on openstack user mailing
list and received no answers in weeks.
Here is one example:
# virsh destroy instance-00000085
error: Failed to destroy domain instance-00000085
error: Failed to terminate process 61222 with SIGKILL: Device or
resource busy
# lsof -p 61222
# ps -f -p 61222
UID PID PPID C STIME TTY TIME CMD
107 61222 1 68 Jan24 ? 9-23:06:19 [qemu-system-x86]
<defunct>
The log in /var/log/libvirt/libvirtd.log:
2014-02-08 03:21:31.597+0000: 2177: error : virProcessKillPainfully:315
: Failed to terminate process 61222 with SIGKILL: Device or resource busy
Restart libvirt-bin service did not solve the problem.
virsh shutdown/reboot just hang. Maybe that is because the CPU in vm is
stalled.
I wonder if there is some way to destroy (or rebuild) dead instance without
rebooting the hypervisor. Any suggestions is welcome.
The software I am running:
hypervisor os: ubuntu 12.04.3
hypervisor kernel: 3.8.0-35-generic
vm os: ubuntu 12.04
vm kernel: 3.2.0-56-virtual
openstack: havana
libvirt: 1.1.1-0ubuntu8~cloud2
Thanks,
Yuanle
10 years, 9 months
[libvirt-users] Connecting disks to controller virtio-scsi of qemu/kvm
by chickenmarkus@freenet.de
Hello,
I try to use the virtio-scsi driver to use my disks. But my setup at first:
* in general Debian Wheezy
* Kernel: 3.11-0.bpo.2-amd64
(http://packages.debian.org/wheezy-backports/linux-image-3.11-0.bpo.2-amd64)
* Qemu-KVM: 1.7.0 (http://packages.debian.org/jessie/qemu-kvm)
* Virsh 1.2.1 (http://packages.debian.org/jessie/libvirt-bin)
The new kernel and dirty things from Jessie are for discard support
(also not working with current configuration despite thin volumes with
working discard). Once I have the this "new" qemu version, why not to
use virtio...
Every disk with target bus "scsi" gets an own scsi-hd device. Libvirt
ignores the scsi controller of type virtio-scsi.
Here is a XML snippet:
<devices>
<controller type='scsi' model='virtio-scsi' index="0"/>
<disk type="block" device="disk">
<source dev="/dev/ssd0/sarabi"/>
<driver discard="unmap"/>
<target dev="sda" bus="scsi"/>
<address type="drive" controller="0" bus=0/>
</disk>
</devices>
This creates the virtio-scsi controller (verified by lspci in guest) but
do not "connect" the disks to it. The resulting command line looks
following:
kvm [...] -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x5 -drive
file=/dev/ssd0/sarabi,if=none,id=drive-scsi0-0-0-0,format=raw,discard=unmap
-device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2
[...]
How get my disk to run over virtio-scsi? Or did I found something like a
bug?
Bye Markus
10 years, 9 months
[libvirt-users] Can I move the disk image of the guest while it is running?
by Gergely Horváth
Hello guys!
We want to move some guests' disk images to different locations (within
the same machine, locally), but we do not want to turn off the guests.
Can we do that while the guest is running, like live migration?
I did not find any related documentation or posts about it.
Let's say the guest has a disk at /ssd/image.raw
We want to move that to /hdd/image.raw
Is there any way to do that without interrupting the guest?
--
Üdvözlettel / Best regards
Horváth Gergely | gergely.horvath(a)inepex.com
IneTrack - Nyomkövetés egyszerűen | Inepex Kft.
Ügyfélszolgálat: support(a)inetrack.hu | +36 30 825 7646 | support.inetrack.hu
Web: www.inetrack.hu | nyomkovetes-blog.hu | facebook.com/inetrack
Inepex - The White Label GPS fleet-tracking platform | www.inepex.com
10 years, 9 months
[libvirt-users] Question about managing migration transfers
by Joaquim Barrera
Hi folks,
As part of a project I am working on, I need to control every step of a
migration, from when I establish the connection to the destination, to
when I decide to move data blocks, its size, etc. As I can see in the
documentation, tunnelled migration allows some kind of control, as the
data goes through libvirt before leaving the host.
May someone put more light on the subject? Is there any possibility to
achieve such control I am looking for, or libvirt hacking will be needed?
Thank you very much.
10 years, 9 months
[libvirt-users] Extending an existing LVM pool - vgextend and pool XML
by Daniel H Barboza
Hi,
I am trying to figure it out the best way to add a disk/partition to an
existing LVM pool. A google search led me to this link (a thread from
this same mailing list, September 2013):
https://www.redhat.com/archives/libvirt-users/2013-September/msg00136.html
The interesting part is this:
"
On 21/09/13 02:15, McEvoy, James wrote:
I looked around but could not find any info on how to expand a libvirt managed LVM storage pool. I do not see any virsh command to do it
but I was successful using the vgexpand command to add some more storage once I destroyed the pools and then restarted it.
I'd like to verify that this is the proper way to grow the storage in a libvirt LVM storage pool.
It's not the proper way in principle, but since libvirt doesn't
supportto extendthe volume groups for a logical pool yet, it's the only
way now. Onehint though,you can try to refresh the pool by command
"virsh pool-refresh" afterthe volume
group of the pool is extended. I.e, don't have to restart the pool."
I've tried this method and it works, but checking the pool XML using
"virsh pool-edit <vg_name>" shows that the XML didn't change. Is it
intended?
The versions I'm using:
# libvirtd --version
libvirtd (libvirt) 1.1.3
# virsh --version
1.1.3
Any thoughts/comments are welcome.
Thanks!
10 years, 9 months
[libvirt-users] libvirt-1.2.0
by cool dharma06
hi,
i am using libvirt-1.2.0 which is installed from source. Which i am using
to launch instance on xen.
its working fine when i am launching vm from the root user. But i am
entered as another user means its throwing the error.
And libvirt is working fine in that user except the creating vm: Please
refer the following things:
eucalyptus@cooldharma06:/opt/i-47FD0798$ virsh -c xen:///
WARNING: gnome-keyring:: couldn't connect to:
/home/dharmalingams/.cache/keyring-r004e7/pkcs11: Permission denied
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # version
Compiled against library: libvirt 1.2.0
Using library: libvirt 1.2.0
Using API: Xen 1.2.0
Running hypervisor: Xen 4.3.0
virsh # list
Id Name State
----------------------------------------------------
*virsh # create libvirt_sec.xml *
*error: Failed to create domain from libvirt_sec.xml*
*error: access denied*
>From the libvirtd.log:
2014-01-31 09:46:16.329+0000: 27937: error : virAccessDriverPolkitCheck:176
: access denied: Policy kit denied action org.libvirt.api.domain.write from
28281,1877379: exit status 1
2014-01-31 09:46:16.329+0000: 27937: error :
virAccessManagerSanitizeError:203 : access denied
2014-01-31 09:46:16.329+0000: 27937: error :
virAccessManagerSanitizeError:203 : access denied
Suggest me some solution to solve this one.
Thanks & Regards,
cooldharma06.
10 years, 9 months
[libvirt-users] Management of host device for network passthrough
by Richard Gomes
Hello,
I've configured a network passtrough like this:
<interface type='direct'>
<mac address='52:54:00:ec:e8:d9'/>
<source dev='eth1' mode='passthrough'/>
<target dev='macvtap0'/>
<model type='rtl8139'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09'
function='0x0'/>
</interface>
OK. it works :)
There's only one small difficulty:
I have to make sure the host network interface is down before I start
the VM.
Then, after the VM starts, I have to bring the host network interface up
by hand.
If the host interface is up before the VM starts, the VM fails to start.
If I do not bring the host network interface up after the VM starts, the
VM cannot effectively communicate using that network interface.
Does anybody has a "clean" solution for it, I mean: without employing
some external "dirty" script or so?
Thanks
--
Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:rgomes@ippi.fr
10 years, 9 months
[libvirt-users] Trouble configuring with macvtap passthrough on Debian Wheezy / Jessie
by Richard Gomes
( Posting again. Correct subject line now! )
Hello,
I'm trying to use macvtap on Debian Wheezy.
Actually, I've installed a recent version of libvirt and qemu from
Jessie, using wheezy-backports.
$ virsh version
Compiled against library: libvirt 1.2.1
Using library: libvirt 1.2.1
Using API: QEMU 1.2.1
Running hypervisor: QEMU 1.7.0
I'm trying to configure a macvtap interface like this:
<interface type='direct'>
<mac address='52:54:00:7b:05:cd'/>
<source dev='eth1' mode='passthrough'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08'
function='0x0'/>
</interface>
The interface eth1 is used exclusively by this VM, so as far as I
understand, mode 'passthrough' is enough since I'd like to "plug" the VM
straight onto a public static IP.
On my /etc/networks/interfaces, I have this:
# start :: define eth1
iface eth1 inet manual
# end :: define eth1
It does not matter whether eth1 is up or down, when I try to start the
VM, I get the following error:
Error starting domain: Cannot create macvlan devices on this
platform: Function not implemented
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45,
in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66,
in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1114,
in startup
self._backend.create()
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 866, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed',
dom=self)
libvirtError: Cannot create macvlan devices on this platform:
Function not implemented
Trying to solve the issue, I found this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737097
I've tried to rebuild the package from Debian sources, but apparently,
macvtap is already defined, as I've reported to another mailing list.
For your information:
> I'm new to building packages from Debian sources, so I followed
> instructions from
>
> https://wiki.debian.org/HowToPackageForDebian#Building_Debian_packages
>
> $ apt-get -t wheezy-backports source libvirt
> $ cd libvirt-0.9.12.3/
> $ sudo apt-get build-dep libvirt
> $ debuild -i -us -uc -b
>
> So... yes, it works and builds without any errors.
>
> Next step now is applying the changes mentioned.
> But I'm confused because /apparently/ debian/rules is already the way
> it should be.
>
> ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
> WITH_STORAGE_LVM = --with-storage-lvm
> WITH_STORAGE_ISCSI = --with-storage-iscsi
> WITH_STORAGE_DISK = --with-storage-disk
> WITH_UDEV = --with-udev --without-hal
> WITH_CAPNG = --with-capng
> WITH_POLKIT = --with-polkit
> * WITH_MACVTAP = --with-macvtap**
> ** WITH_NETWORK = --with-network**
> * WITH_QEMU = --with-qemu
> WITH_OPENVZ = --with-openvz
> WITH_NETCF = --with-netcf
> ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc))
> WITH_NUMA = --with-numactl
> else
> WITH_NUMA = --without-numactl
> endif
> ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
> WITH_LXC = --without-lxc
> else
> WITH_LXC = --with-lxc
> endif
> else
> WITH_STORAGE_LVM = --without-storage-lvm
> WITH_STORAGE_ISCSI = --without-storage-iscsi
> WITH_STORAGE_DISK = --without-storage-disk
> WITH_UDEV = --without-udev --with-hal
> WITH_CAPNG = --without-capng
> WITH_POLKIT = --without-polkit
> * WITH_MACVTAP = --without-macvtap**
> ** WITH_NETWORK = --without-network**
> * WITH_QEMU = --without-qemu
> WITH_LXC = --without-lxc
> WITH_NUMA = --without-numactl
> WITH_NETCF = --without-netcf
> endif
>
>
> I suppose that nothing has to be changed, correct? ... since the
> _/then/_ branch already has the change mentioned and the _/else/_
> branch probably means that nothing related to networking would be
> enabled anyway.
>
> Am I missing something ?
Thoughts?
Thanks a lot :)
--
Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:rgomes@ippi.fr
10 years, 9 months