[libvirt-users] Can I update the DNS configuration of an existing network?
by Kees van Reeuwijk
Hello,
As part of a research project on cloud management, I am developing
software to create on-demand networks between VMs on different hosts.
The deployment of the VMs themselves is done by OpenNebula, but for the
management of the networks I have to bypass OpenNebula, and I talk
directly with libvirt.
One of the features of our network management is that we allow network
connections to be created and destroyed at any moment in the life of a
VM. This means that we use hotplugging. It also means that we want a VM
to discover its network parameters for a particular NIC using DHCP and DNS.
I have something that mostly works now: I create an XML for each
network, I can hot-plug new NICs in the VM using libvirt, and DHCP on
the new interface works. However, DNS does not work properly. I have to
create a mapping between the MAC, IP address, and the name of a VM at
the moment I create the network XML. Setting the MAC <-> IP mapping at
that time is fine, but fixing the mapping between IP address and name at
that time is not reasonable. I do not know what name will be used before
I add a new machine, and during the lifetime of the network there may
even be different names associated with a particular IP address.
Is there a way I can change/update the DNS configuration of a network
after it has been created? I could simply create a new network XML file
and stop/start the network, but I suspect that is too disruptive. Is
there a less intrusive way to do this?
Another thing I would very much like to do is to talk to libvirt
directly from my management software (written in Java), rather than
through the command line. I know there is a Java API for libvirt, but I
have not been able to find any up-to-date documentation on it. Is the
functionality that I need accessible through the Java API? Is there
enough documentation of the API for this, and where is it?
--
Dr. Ir. Kees van Reeuwijk, Vrije Universiteit Amsterdam
12 years, 6 months
[libvirt-users] USB Host Controllers
by Michael Hierweck
Hi,
it is possible to define a domain along with several usb host
controllers, e.g.
<controller type='usb' index='0' model='ich9-ehci' />
<controller type='usb' index='1' model='ich9-uhci' />
How to distinguish between those controllers/busses when adding input or
host devices such as
<input type='tablet' bus='usb'/>
<hostdev mode='subsystem' type='usb' managed='no'>
<source>
<vendor id='...'/>
<product id='...'/>
</source>
</hostdev>
Without explicit assignment either every device seems to be attached to
the uhci controller or the domain refuses to start because the tablet is
attached to the ehci controller implicitly, depending on the order of
the controller definition (index).
Thanks in advance
Michael
--
EDV-Serviceteam Annika & Michael Hierweck GbR
Egerstraße 53, 44225 Dortmund (Germany)
http://www.edv-serviceteam.net
12 years, 6 months
[libvirt-users] Is it possible to in live migration?
by GaoYi
Hi all,
In live migration using shared memory, there would be a following step
to input the password after typing:
migrate --live vm_name qemu+ssh://Destination_IP/system.
. I wonder if it is possible to include the password in the URI so that the
password procedure can be avoided?
Thanks,
Yi
12 years, 6 months
[libvirt-users] editing pools
by Dave Allan
On Fedora 17 I used virsh pool-edit to change the directory of the
default pool that virt-manager creates, and I noticed that my changes
were discarded unless I made the changes with the pool stopped. Is
that expected behavior?
Dave
12 years, 6 months
[libvirt-users] PCI Passthrough
by Michael Hierweck
Hi,
I'm trying to passthrough legacy PCI ISDN controller to a KVM based
virtual machine:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</hostdev>
This only worked once. (The device disappeared from the lspci autoput
the host and was listed on the guest.)
After shutting down the virtual maschine it refused to start again. Even
rebooting the host did not help:
Failed to assign irq for "hostdev0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?
lspci -t
-[0000:00]-+-00.0
+-19.0
+-1a.0
+-1c.0-[01]----00.0
+-1c.4-[02]----00.0
+-1c.5-[03]----00.0
+-1d.0
+-1e.0-[04]----00.0
+-1f.0
+-1f.2
\-1f.3
lspci -vv |grep IRQ
Interrupt: pin A routed to IRQ 44
Interrupt: pin B routed to IRQ 22
Interrupt: pin A routed to IRQ 20
Interrupt: pin B routed to IRQ 48
Interrupt: pin D routed to IRQ 22
Interrupt: pin A routed to IRQ 16
Interrupt: pin A routed to IRQ 16
Interrupt: pin A routed to IRQ 3
Interrupt: pin A routed to IRQ 16
The last line "pin A routed to IRQ 16" belongs to my device:
04:00.0 Communication controller: Tiger Jet Network Inc. Tiger100APC
ISDN chipset
Subsystem: Device 0054:0001
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 16
Region 0: I/O ports at 2000 [size=256]
Region 1: Memory at e2600000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 1
Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA
PME(D0+,D1-,D2+,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Note: After rebooting the host lscpi claims that "pin A is routed to
interrupt 255" for that device. The invocation to virsh start <vm>
changes that to 16.
Nearly every document about PCI passthrough claims that unshared
interrupts are required. But how can this be achieved? (My BIOS supports
interrupt remapping for VT-d. This setting is enabled.)
Thanks in advance
Michael
--
EDV-Serviceteam Annika & Michael Hierweck GbR
Egerstraße 53, 44225 Dortmund (Germany)
http://www.edv-serviceteam.net
12 years, 6 months
[libvirt-users] unable to creating/list storage pools using non-root user
by mallapadi niranjan
Hi all
I have a Fedora release 17 (Beefy Miracle) with libvirt versions:
libvirt-0.9.11.3-1.fc17.x86_64
virt-manager-0.9.1-3.fc17.noarch
I have allowed non-root user to user libvirt by allowing the user through
polkit
cat /etc/polkit-1/localauthority/50-local.d/cat
50-org.example-libvirt-remote-access.pkla
[Remote libvirt SSH access]
Identity=unix-group:virt
Action=org.libvirt.unix.manage;org.libvirt.unix.monitor
ResultAny=yes
ResultInactive=yes
ResultActive=yes
After doing the above i am able to connect to virt-manager as non-root user
but unable to create storage pools.
[juno@reserved ~]$ id
uid=1001(juno) gid=1001(juno) groups=1001(juno),1002(virt)
context=staff_u:staff_r:staff_t:s0
[juno@reserved ~]$ virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # pool-list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '@/home/juno/.libvirt/libvirt-sock':
Connection refused
virsh # list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '@/home/juno/.libvirt/libvirt-sock':
Connection refused
I have defined pool called virt-images (/virt-images) which the non-root
(in this case the username is Juno) user has the read/write permissions
Also tried adding the permissions to unix socket in
/etc/libvirt/libvirtd.conf as below:
cat /etc/libvirt/libvirtd.conf | grep -v ^$ | grep -v ^#
unix_sock_group = "virt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
unix_sock_dir = "/var/run/libvirt"
But the unix socket are created in /var/run/libvirt and not in users home
directory, So how do we make a non-root user virsh commands check the
socket created in /var/run/libvirt. It always checks for the socket in
user's home directory ?
Any pointers on above would be helpfu.
Regards
Niranjan
12 years, 6 months
[libvirt-users] virtio_rng in a KVM VM
by Marc Haber
Hi,
I am virtualizing with KVM via libvirt and virt-manager. To have
decent amounts of Entropy in the guest, I tried loading virtio_rng in
a running VM. Despite the module being loaded, I didn't get any log
entries, and also no /dev/hwrng.
Do I need to enable the virtualized random generator in
libvirt/virt-manager? If so, how do I do that? Is the support for this
rather recent feature already implemented in qemu-kvm 1.0, libvirt
0.9.12 and virt-manager 0.9.1?
Any hints will be appreciated.
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
12 years, 6 months
[libvirt-users] Remote virtualization with Xen, feasibility
by Jørgen Nordmoen
Hello.
I'm wondering if a scenario which I'm tasked to setup would be feasible to
create with libvirt.
The scenario is; we want to have one computer running ns-3[1] which will
simulate a MANET[2] this computer will be connected to a second
computer(how is not quite clear to me yet) this second computer will be
running several Xen or LXC domains where each domain is connected to a node
in the ns-3 simulation. Inside each domain we will run an program which
will use service-discovery to interact with all the other domains which
from the point of view of a specific domain will look like wireless nodes
in a network(accomplished with the ns-3 simulation, connecting the ns-3
nodes to taps[3] outside the simulation and then connecting these taps to
the remote computer running libvirt and Xen or LXC). What I'm wondering is
if the libvirt side of this is feasible, namely creating several domains
remotely, on one or hopefully more computers, having the domains on the
same computer share a storage area where we can place shared programs and
where programs running inside the domains can log output to. Then after the
program is done retrieve these output logs and shutdown all of the domains.
When it comes to Xen, we will most likely crate a snapshot of a running
Linux distribution that we can quickly start so we don't need to do a full
boot process every time.
Below is a very simple illustration of what we want to accomplish. Each Xen
domain is connected to a specific tap device in the ns-3 server.
ns-3 server libvirt server
+----------------------+
+-----------------------------+
| | | +-----+
+------+ |
| +-------------+ | | |Xen1| ...
|XenX| |
| | ns-3 | | | +-----+
+------+ |
| +-------------+ |
| |
| tap-1 ... tap-X |
| |
+----------------------+
+-----------------------------+
| |
| |
------------------------------------------------------------------------------------
LAN
Is this possible to create with the help of libvirt?
Ps.
My reasoning to want to do this with libvirt is that we get support for
both Xen, QEMU/KVM and LXC and libvirt has, from my first impressions, good
support for Python which means quicker prototyping and better looking code.
Best regards
Jørgen Nordmoen
[1] http://www.nsnam.org
[2] https://en.wikipedia.org/wiki/MANET
[3] https://en.wikipedia.org/wiki/TUN/TAP
12 years, 6 months
[libvirt-users] Libvert live migration problem!
by GaoYi
Hi all,
I've succeed to do live migration between two PCs. However, I found I
could not connect the VM by host IP from a remote PC before migration and
can only connect it from host PC. If I appended the VM with the following
line at the end of the xml file:
<listen type='address' address=host_IP port='PORT'>
I can connect the VM via VNCVIEWER with host_IP:PORT. However, the libvirt
reported: error: failed to bind the <host_IP, PORT>...It seems that the
IP:port is already bound. Can someone show how to do live migration using
NFS?
Thanks,
Yi
12 years, 6 months
[libvirt-users] Cannot create macvlan devices on this platform
by Michael Hierweck
Hi,
libvirt (0.9.11) refuses to start KVM based virtual machines on my
system when changing the network connection from "host bridge" to
"direct" (macvtap/macvlan), neither in "bridge" nor in "vepa" mode:
"Cannot create macvlan devices on this platform"
That's astonishing because I can easily setup working macvlan devices
using the "ip" command: "ip link add link eth0 type macvlan".
Would someone help me figure out the reason?
Thanks in advance
Michael
--
EDV-Serviceteam Annika & Michael Hierweck GbR
Egerstraße 53, 44225 Dortmund (Germany)
http://www.edv-serviceteam.net
12 years, 6 months