[libvirt-users] VLANs with Open vSwitch in libvirt 0.10.1
by Scott Lowe
Hello all, I'm trying to take advantage of libvirt's VLAN and OVS support in the 0.10.1 release and consistently getting an "error: internal error corrupted profileid string" when starting a guest.
I've defined a network using virsh; the configuration looks like this:
<network>
<name>ovs-network</name>
<uuid>40c32a20-9eed-238c-895c-b9af7eaf72f1</uuid>
<forward mode='bridge'/>
<bridge name='ovsbr0' />
<virtualport type='openvswitch'/>
<portgroup name='green' default='yes'>
<virtualport>
<parameters profileid='green-profile'/>
</virtualport>
</portgroup>
<portgroup name='blue'>
<vlan>
<tag id='2'/>
</vlan>
<virtualport>
<parameters profileid='blue-profile'/>
</virtualport>
</portgroup>
</network>
This network is listed when I run "virsh net-list --all" and is listed as active.
In a guest, the network is defined like this:
<interface type='network'>
<mac address='52:54:00:a8:bf:8f'/>
<source network='ovs-network'/>
<virtualport type='openvswitch'>
<parameters interfaceid='2913d936-6771-4983-1cdf-753c45ac24d2' profileid='green-profile'/>
</virtualport>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
This is running on Ubuntu 12.04.1 (and QEMU-KVM) with manually compiled libvirt 0.10.1 and OVS version 1.4.0+build0.
For troubleshooting, I've undefined/re-define both the network and the guest, and restarted libvirtd in between. I've also tried different network names, different portgroup names, and different profileid's.
I'm sure I'm missing something obvious but I can't seem to find it--any suggestions? Any and all help is appreciated.
--
Scott
12 years, 2 months
[libvirt-users] prefer_msi=on in xml file
by klak2
Hello,
here is a problem with KVM passthrough of TechnoTrend S2-6400.
Bug report is done.
The last answer of the debian maintainer:
--> Please check with lspci -vv whenever your device is MSI-capable,
--> and if yes, try to add prefer_msi=on to the pci-assign device
--> argument -- like, from your original report,
-->
--> -device pci-
assign,host=08:00.0,id=hostdev0,configfd=23,bus=pci.0,addr=0xa,prefer_msi=on
-->
--> I don't know how to add this to libvirt however, maybe they have
--> some knobs for that nowadays.
and now my question:
How do I add the parameter "prefer_msi=on" to the xml file?
Thank and greets klak2
12 years, 2 months
[libvirt-users] sharing read-only LOCAL disks among KVM guests
by Amos Shapira
Hello,
Is it possible to share a single host's Logical Volume among multiple local
KVM guests which mount it read-only?
I'm asking this because I have an idea to run multiple idential KVM guests
(they all have exactly the same software installed on them), booting them
from a shared local Logical Volume read-only root file system, or
alternatively let them share the bulk of the software (/usr, /opt, /lib)
from a common KVM host Logical volume.
Is this possible? All my searches so far failed to turn up anything like
this.
Would it be possible using qcow2 instead of raw LV? If so - would it be
worth the performance hit of switching from LV to qcow2?
The motivation for this is two-fold:
1. Speed-up - I suspect that sharing the same disk block among all KVM
agents (we currently have 14 KVM guests on each server) should lead to
better cache utilisation and reduce disk access. Also the cost of
maintaining the mutiple identical servers and keeping them up to date could
be eating into our server's resource usage.
2. Maintenance - if I get to share the common disk image among all of them
then I only need to install/update it once instead of once for each KVM
guest (we already use Puppet but it doesn't mean it comes for free).
Thanks,
--Amos
12 years, 2 months
[libvirt-users] picking a NUMA cell for pinning using virsh freecell
by Edoardo Comar
Hi
I'd want to pin the vcpu of a guest to a pcpu.
the docs clearly say
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6...
"Locking a guest to a particular NUMA node offers no benefit if that node
does not have sufficient free memory for that guest. libvirt stores
information on the free memory available on each node. Use the virsh
freecell --all command to display the free memory on all NUMA nodes "
I have tried to look at what freecell returns and heuristically its total
across cells looks roughly the same value returned by the 'free' command
but without discounting buffers and cache.
While free is able to show the value when buffers/cache are taken into
account, free is not able to apportion that to NUMA cells.
So is it really a valid strategy to choose the NUMA cell for pinning vcpus
looking at virsh freecell
or ideally we'd need those values adjusted with buffers+cache ?
And if so how could one do that ?
--------------------------------------------------
regards,
Edoardo Comar
IBM SWG UK - Hursley JTC
ecomar(a)uk.ibm.com
Tel +44 (0)1962 81 5576 (external) 245576 (internal)
IBM UK Ltd, Hursley, SO21 2JN
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
12 years, 2 months
[libvirt-users] virsh list not working with xen 4
by Rogério Vinhal Nunes
Hi, I'm having some trouble to get libvirt to show the correct power state
of my virtual machines. I'm using Ubuntu 10.04 + Xen 4.1.1 + libvirt 0.8.8.
virsh list --all only shows turned off machines registered in xend. If I
turn them on, they just "disappear", and when I start machines directly from
xml, they just doesn't appear at all.
Libvirt is correctly connecting to xen as I can use the other commands fine,
just the list option doesn't seem to work at all. What can I do to change
that?
# virsh version
Compiled against library: libvir 0.8.8
Using library: libvir 0.8.8
Using API: Xen 3.0.1
Running hypervisor: Xen 4.1.0
12 years, 2 months
[libvirt-users] Xen domains appear randomly
by Mathias Gaunard
Hi,
I have a problem with libvirt or at least with virt-manager and virsh.
I have created Xen domains with them, and they do exist and are running
without problems, which I can attest by using Xen native tools.
However, depending on how I can connect to the machine (direct xen,
xen+ssh), and depending on the user I log in as, I may or may not see
the domains, or I may or may not be able to configure storage.
I am running Debian Wheezy and using the libvirt version from the
repositories.
Any idea of how I could try to troubleshoot this problem?
12 years, 2 months
[libvirt-users] Network inoperable with QEMU arm example image
by Larry Brown
Is this thing on? I posted the message below twice now with no response
by anyone. Can someone tell me what I'm doing wrong or at least let me know
this is not something they've ever seen so I know my posts are being viewed by
those in the know? I'll try replicating the install process on another machine
with hopes it will work there, but this is my desktop and I'd really like to
have it run here rather than running a separate machine just to run the VM in.
(That is provided it will run anywhere using these installation mechanisms)
"I am running Fedora 16 64bit and installed libvirt. I have the VM
running with arm emulation with this one issue I can't figure out. I
used Virtual Machine Manager to manage the VM and can access its console
there. The Ethernet appears to be eth1 and the guest can set an IP on
it etc. However, I cannot see any traffic from the Host when dumping
any of the interfaces. I've tried several combinations of network
setups using the GUI and none appear to work. Optimally I'd like to
bridge to my primary interface (em1) and be able to pull an address and
talk directly to my network so I can download packages etc while in the
VM. I tried setting up networking in that fashion with:
Source Device : em1 with macvtap
Device Model: Hypervisor Default
Source Mode: Bridge
but alas I cannot pull dhcp nor can I set a static address and ping
other interfaces on the network.
It also appears that every time I start the VM it creates another vnetX
interface.
One of the troubleshooting pages I came across listed all the tools but
nothing about what to look for:
1) virsh net-list --all
Name State Autostart
-----------------------------------------
default active yes
2) brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.52540029e6c7 yes virbr0-nic
vnet0
vnet1
vnet2
vnet3
vnet4
3) sysctl net.bridge.bridge-nf-call-iptables
sysctl net.bridge.bridge-nf-call-iptables = 1
4) iptables -L -v -n
Chain INPUT (policy ACCEPT 767K packets, 189M bytes)
pkts bytes target prot opt in out source
destination
0 0 ACCEPT udp -- virbr0 * 0.0.0.0/0
0.0.0.0/0 udp dpt:53
0 0 ACCEPT tcp -- virbr0 * 0.0.0.0/0
0.0.0.0/0 tcp dpt:53
0 0 ACCEPT udp -- virbr0 * 0.0.0.0/0
0.0.0.0/0 udp dpt:67
0 0 ACCEPT tcp -- virbr0 * 0.0.0.0/0
0.0.0.0/0 tcp dpt:67
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 ACCEPT all -- * virbr0 0.0.0.0/0
192.168.122.0/24 state RELATED,ESTABLISHED
0 0 ACCEPT all -- virbr0 * 192.168.122.0/24
0.0.0.0/0
0 0 ACCEPT all -- virbr0 virbr0 0.0.0.0/0
0.0.0.0/0
0 0 REJECT all -- * virbr0 0.0.0.0/0
0.0.0.0/0 reject-with icmp-port-unreachable
0 0 REJECT all -- virbr0 * 0.0.0.0/0
0.0.0.0/0 reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT 532K packets, 79M bytes)
pkts bytes target prot opt in out source
destination
5) ps -ef | grep dnsmasq
nobody 12382 1 0 Sep11 ? 00:00:00 /usr/sbin/dnsmasq
--strict-order --bind-interfaces
--pid-file=/var/run/libvirt/network/default.pid --conf-file=
--except-interface lo --listen-address 192.168.122.1 --dhcp-range
192.168.122.2,192.168.122.254
--dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases
--dhcp-lease-max=253 --dhcp-no-override
6) ifconfig -a
em1 Link encap:Ethernet HWaddr 00:19:B9:48:2B:BA
inet addr:10.45.212.46 Bcast:10.45.212.255
Mask:255.255.255.0
inet6 addr: fe80::219:b9ff:fe48:2bba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19048593 errors:95686 dropped:154 overruns:0
frame:98437
TX packets:10619346 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12559170813 (11.6 GiB) TX bytes:1700214519 (1.5 GiB)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2978074 errors:0 dropped:0 overruns:0 frame:0
TX packets:2978074 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:847201395 (807.9 MiB) TX bytes:847201395 (807.9 MiB)
macvtap0 Link encap:Ethernet HWaddr 52:54:00:AC:7F:0C
inet6 addr: fe80::5054:ff:feac:7f0c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:294814 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:42804350 (40.8 MiB) TX bytes:468 (468.0 b)
virbr0 Link encap:Ethernet HWaddr 52:54:00:29:E6:C7
inet addr:192.168.122.1 Bcast:192.168.122.255
Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:621 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:43217 (42.2 KiB)
virbr0-nic Link encap:Ethernet HWaddr 52:54:00:29:E6:C7
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vnet0 Link encap:Ethernet HWaddr FE:54:00:AC:7F:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:38159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:1995337 (1.9 MiB)
vnet1 Link encap:Ethernet HWaddr FE:54:00:AC:7F:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:37299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:1949439 (1.8 MiB)
vnet2 Link encap:Ethernet HWaddr FE:54:00:AC:7F:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:36154 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:1888745 (1.8 MiB)
vnet3 Link encap:Ethernet HWaddr FE:54:00:AC:7F:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:35068 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:1832375 (1.7 MiB)
vnet4 Link encap:Ethernet HWaddr FE:54:00:AC:7F:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:10896 (10.6 KiB)
7) cat /proc/sys/net/ipv4/ip_forward
1
Any help I can get to resolve this would be greatly appreciated. Very
frustrating...
Larry
12 years, 2 months
Re: [libvirt-users] How to pass info to a guest?
by Renich Bon Ciric
On Thu, Sep 20, 2012 at 12:09 PM, Andrew Cathrow <acathrow(a)redhat.com> wrote:
> So you really want to run apt commands on fedora ;-)
>
> ssh stuff should work fine for you.
LOL, ok, you're right.
Anyway, thinking it over, I need to apply these injections every time
I boot. If the user updates his/her VNC password or rsa-id.pub file on
the outside, I need it synced on the inside.
12 years, 2 months
[libvirt-users] How to pass info to a guest?
by Renich Bon Ciric
Hello,
I would love to be able to pass information to a Guest. For example:
- I'd love to sync the root password with the VNC/Spice one
- I'd like to be able to inject stuff to /root/.ssh/authorized_keys
All of these at boot time.
How would I do it? I'd make these files/strings available in the BIOS
or something; maybe some kind of storage local to the host and guest
as well. Then, I'd create a systemd script that checks these and syncs
stuff @ reboot time.
I don't know how to make this local storage available or if it is
doable to insert this info into some BIOS string; obtainable with
dmidecode or something. It would be awesome if this could be dynamic
as well.
Any feedback is appreciated!
--
It's hard to be free... but I love to struggle. Love isn't asked for;
it's just given. Respect isn't asked for; it's earned!
Renich Bon Ciric
http://www.woralelandia.com/
http://www.introbella.com/
12 years, 2 months