[libvirt-users] Set IP for LXC-container through libvirt XML
by Timothy Klim
Hi!
How I can set IP to container without using dhcp?
From http://libvirt.org/formatnetwork.html I have:
<network>
<mac address='00:16:3E:5D:C7:9E'/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.100" end="192.168.122.254" />
<host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10" />
<host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11" />
</dhcp>
</ip>
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
</network>
Can I just set IP for domain(lxc-container)?
Thank you.
12 years, 2 months
[libvirt-users] qemu-ga : windows 2008 64bit not working.
by desi babu
Qemu Guest Agent on Windows 2008 is not able to connect to virtio-serial socket.
Windows Version : 2008 64 Bit
Version : qemu-ga -V
QEMU Guest Agent 1.1.0
VIRT-IO Serial Driver installed in windows.
Driver Provider : Redhat Inc.
Driver Date : 61.63.103.2200
Libvirt Settings.
<channel type='unix'>
<source mode='bind' path='/tmp/qemu-ga.w2008.0.sock'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
qemu-ga.exe
critical : error opening path
critical : error opening channel
critical : failed to create guest agent channel
critical : failed to initialize guest agent channel.
Any recommendations or debugging methods to verify vertio-serial ?
Thanks in advance.
/Suresh
12 years, 2 months
[libvirt-users] ubuntu 12.04 x64 virt-manager 0.9.1
by Kobi Biton
dear experts,
I have a clean kvm installation on ubuntu 12.04 x64 , when trying to
create my first guest I get the following error:
Unable to complete install: 'internal error cannot load AppArmor profile
'libvirt-ac760227-6849-b81e-15f6-a7eae418225f''
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/create.py", line 1909, in
do_install
guest.start_install(False, meter=meter)
File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1236, in
start_install
noboot)
File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1304, in
_create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2166, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error cannot load AppArmor profile
'libvirt-ac760227-6849-b81e-15f6-a7eae418225f'
some details:
- the user used on the virt-manager connection is a memeber of the
libvirtd group
- using ssh key auth from the virt-manager
Any Ideas?
Thanks!
12 years, 2 months
[libvirt-users] PCI passthrough troubles
by mike allison
Hello,
I have been struggling as of late to successfully configure a pci
passthrough using libvirt with kvm. Hoping someone can shed some light on
the problem. Overall my experience with virtualization limited is so please
forgive. The guest runs fine till passthrough is configured. I am using
virt-manager. This has been tried on both a Fedora17 x86_64 and Arch Linux
x86_64 build with pretty much identical errors.
I have carefully reviewed my hardware and purchased vt-d enabled parts
where needed. vt-d is enabled for my chipset, cpu and in it's enabled in
the bios.
on both systems I complied a custom kernel to enable DMA Remapping,
PCI-stub and set CONFIG_INTEL_IOMMU_DEFAULT_ON=y
using kernel boot param: intel_iommu=on (not sure if overkill)
have kvm module option allow_unsafe_assigned_interrupts=1
selinux set to permissive mode in fedora. not used in arch
when launching I 1) modprobe pci_stub, 2) virsh nodedev-dettach pci device,
3) load guest using virtmanager... it get the following
the log outputs
*
libvirt error window*
> Error starting domain: Unable to read from monitor: Connection reset by
> peer
>
> 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/site-packages/libvirt.py", line 620, in create
> if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
> libvirtError: Unable to read from monitor: Connection reset by peer
>
*/var/log/libvirt/qemu/AED-VM.log*
> char device redirected to /dev/pts/3
> Failed to assign irq for "hostdev0": Input/output error
> Perhaps you are assigning a device that shares an IRQ with another device?
>
*/var/log/libvirt/libvirtd.log*
> 2012-07-08 22:45:11.403+0000: 3773: warning : ebiptablesDriverInit:4157 :
> Could not find 'ebtables' executable
> 2012-07-08 22:45:11.442+0000: 3773: error : virSysinfoRead:767 : internal
> error Failed to find path for dmidecode binary
> 2012-07-08 22:45:17.710+0000: 3764: error :
> virConnectNumOfInterfaces:10466 : this function is not supported by the
> connection driver: virConnectNumOfInterfaces
> 2012-07-08 22:46:13.494+0000: 3764: warning : qemuDomainObjTaint:1371 :
> Domain id=1 name='AED-VM' uuid=8f2892d8-df3c-6e75-0fe5-42c1ecd7835d is
> tainted: high-privileges
> 2012-07-08 22:46:13.725+0000: 3762: error : qemuMonitorIORead:526 : Unable
> to read from monitor: Connection reset by peer
> 2012-07-08 22:46:13.725+0000: 3762: error : qemuMonitorIO:582 : internal
> error event from unexpected fd -1!=21 / watch 9!=9
> 2012-07-08 22:48:51.281+0000: 4097: info : libvirt version: 0.9.13
>
*
dmesg*
> [ 158.017387] virbr0: port 1(vnet0) entered forwarding state
> [ 158.017395] virbr0: port 1(vnet0) entered forwarding state
> [ 158.017615] ADDRCONF(NETDEV_CHANGE): virbr0: link becomes ready
> [ 158.476879] assign device 0:3:2.0
> [ 158.477080] deassign device 0:3:2.0
> [ 158.719521] virbr0: port 1(vnet0) entered disabled state
> [ 158.719673] device vnet0 left promiscuous mode
>
any help would be greatly appreciated.
mike allison
12 years, 2 months
Re: [libvirt-users] [ovs-discuss] OpenVswitch with KVM virtual machines
by Neha Jatav
I am running NOX controller with a python script that prints out the
destination mac and the source mac for each packet arriving at the now
controller and then floods it out. So here's what happening:
With em1 connected, all the packets that arrive at em1 are coming to the
controller and printing out the details. However, without em1 connected to
the OVS, when I have the following setup:
____ ____
/ VM1\______br0_______/ VM3\
\____/ | \____/
|
_|_
/VM2\
\___/
VM1 & VM2 are of the same subnet. They can ping each other. The ping
packets aren't seen at the controller probably because they are in the
same subnet and they don't need a flow table entry.
VM3 is in a different subnet. So, when I ping from VM1 to VM3 or
viceversa, they aren't reachable to each other. However, the packets do
not arrive at the controller at all. Could you suggest me what might
possibly be wrong.
This is how the bridge looks:
$sudo ovs-vsctl br0 show
Bridge "br0"
Port "vnet1"
Interface "vnet1"
Port "br0"
Interface "br0"
type: internal
Port "vnet0"
Interface "vnet0"
Port "vnet2"
Interface "vnet2"
ovs_version: "1.4.0"
Thanks and Regards,
Neha
On 7/9/12 11:48 PM, "Neha Jatav" <jneha(a)yahoo-inc.com> wrote:
>
>
>On 7/9/12 10:25 PM, "Ben Pfaff" <blp(a)nicira.com> wrote:
>
>>On Tue, Jul 10, 2012 at 01:46:07AM +0900, Neha Jatav wrote:
>>> I have KVM installed on my Fedora 17 box. I added the network
>>>interfaces of the virtual machines to the openvswitch bridge as follows:
>>>
>>> ____ ____
>>> / VM1\______br0_______/ em1\
>>> \____/ | \____/
>>> |
>>> _|_
>>> /VM2\
>>> \____/
>>>
>>> virbr0 is the virtual network switch
>>> VM1 and VM2 are on the same subnet having tap interfaces vnet0 and
>>>vnet1 respectively.
>>> em1 is the default network interface.
>>>
>>> $sudo ovs-vsctl add-br br0
>>> $sudo ovs-vsctl add-port br0 em1
>>> $sudo ifconfig br0 <ip address of em1>
>>> $sudo ip route del default dev em1
>>> $sudo ip route add default dev br0
>>> (Using the above commands, I was able to connect to the internet)
>>>
>>> $sudo brctl delif virbr0 vnet0
>>> $sudo ovs-vsctl add-port br0 vnet0
>>> $sudo brctl delif virbr0 vnet1
>>> $sudo ovs-vsctl add-port br0 vnet1
>>>
>>> $brctl show
>>> bridge name bridge id STP enabled interfaces
>>> virbr0 8000.52540094e45e yes virbr0-nic
>>> vnet0
>>> vnet2
>>>
>>> $sudo ovs-vsctl show
>>> Bridge "br0"
>>> Port "vnet1"
>>> Interface "vnet1"
>>> Port "br0"
>>> Interface "br0"
>>> type: internal
>>> Port "vnet0"
>>> Interface "vnet0"
>>> Port "em1"
>>> Interface "em1"
>>> ovs_version: "1.4.0"
>>>
>>> $ifconfig em1
>>> em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>>> inet 10.66.97.253 netmask 255.255.254.0 broadcast
>>>10.66.97.255
>>> inet6 fe80::226:55ff:fe3e:971c prefixlen 64 scopeid
>>>0x20<link>
>>> ether 00:26:55:3e:97:1c txqueuelen 1000 (Ethernet)
>>> RX packets 194955 bytes 81216930 (77.4 MiB)
>>> RX errors 0 dropped 0 overruns 0 frame 0
>>> TX packets 53004 bytes 9477482 (9.0 MiB)
>>> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>>> device interrupt 19 memory 0xf0200000-f0220000
>>>
>>> $ifconfig br0
>>> br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>>> inet 10.66.97.253 netmask 255.0.0.0 broadcast 10.255.255.255
>>> inet6 fe80::226:55ff:fe3e:971c prefixlen 64 scopeid
>>>0x20<link>
>>> ether 00:26:55:3e:97:1c txqueuelen 0 (Ethernet)
>>> RX packets 84745 bytes 60302978 (57.5 MiB)
>>> RX errors 0 dropped 0 overruns 0 frame 0
>>> TX packets 44528 bytes 7732040 (7.3 MiB)
>>> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>>>
>>> By default, the OVS should act as a MAC-layer learning switch. However,
>>>the VMs which are in the same subnet can ping each other but the VMs
>>>can't ping the host machine (10.66.97.253) & viceversa.
>>> Can you tell me where am I wrong in my approach?
>>
>>You appear to have both OVS bridges and Linux bridges. Why? And at
>>least interface vnet0 is configured to be on both the Linux bridge and
>>the OVS bridge. That can't work.
>
>$sudo brctl delif virbr0 vnet0
>I deleted this interface from virbr0 using the above command and only then
>I connected it to br0. So, vnet0 is only configured on the OVS bridge.
>Same is true with the vnet1.
>
>
>
>>
>>Also you appear to have the same IP address 10.66.97.253 configured on
>>both em1 and br0 (with different netmasks). That won't work properly
>>either.
>
>I did the following:
>$sudo ifconfig br0 10.66.97.253 netmask 255.255.254.0
>It resulted in losing connection to the internet.
>
>>
>>Did you read the FAQ? http://openvswitch.org/faq/
>
12 years, 2 months
[libvirt-users] Different SAS controller IDs
by Anton Nikiforov
Dear All,
I have problem with setting up migration on Intel Multi-Flex server. The
problem is that SAS controller IDs (and volume ids in /dev/disk/by-path
directory) are different between nodes.
For example on node0 i have:
lrwxrwxrwx 1 root root 9 Jun 29 07:20
pci-0000:04:00.0-sas-0x500015500002040a-lun-0 -> ../../sda
lrwxrwxrwx 1 root root 10 May 27 09:17
pci-0000:04:00.0-sas-0x500015500002040a-lun-0-part1 -> ../../sda1
.......
On node1 i have:
lrwxrwxrwx 1 root root 9 Jul 12 21:19
/dev/disk/by-path/pci-0000:04:00.0-sas-0x5000155000020409-lun-0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 12 21:19
/dev/disk/by-path/pci-0000:04:00.0-sas-0x5000155000020409-lun-0-part1 ->
../../sda1
........
Difference is in 0x500015500002040a and 0x5000155000020409
But this is the matter of migration falure because migration script
cannot find needed volume.
Is there any chance to fix it somehow?
Best regards,
Anton Nikiforov
12 years, 2 months
[libvirt-users] Starting a program inside VM through libvirt
by Jørgen Nordmoen
Hi again.
I was just wondering if there are any support for running programs inside a
VM through libvirt. From what I can see in the API the only solution I
found was connecting to the VM with openConsole and running the program I
want. This however seems a bit tricky through Python and I was just
wondering if there are any simpler solutions.
Best regards.
Jørgen
12 years, 2 months
[libvirt-users] PCI-Passthrough suddenly stopped working
by Rouven Sacha
Hi everybody!
On a Centos 5.8 with libvirt qemu-0.10.5-1.el5.2, libvirt-0.8.2-22.el5 and 2.6.18-308.11.1.el5 I have a Windows machine that used to have pci-passthrough for a device enabled and working.
After an update (kernel, libvirt afaik) and a reboot, pci-passthrough stopped working. Intel IOMMU is enabled (can see that from the dmesg output). All i get on the console when i try to start the vm is the following:
Fehler: internal error process exited while connecting to monitor: char device redirected to /dev/pts/3
Failed to assign device "14:00.2" : Invalid argument
Failed to deassign device "14:00.2" : Invalid argument
Failed to initialize assigned device host=14:00.2
SELinux ist disabled.
Does anyone have any hint what could have possibly gone wrong?
As an additional info: "virsh nodeddev-list" also doesn't work. I don't know if I mix that up, but i seem to remember that that used to work on that machine.
root@kvm ~]# virsh nodedev-list --tree
Fehler: Failed to count node devices
Fehler: this function is not supported by the connection driver: virNodeNumOfDevices
Any hints are greatly appreciated!
Thanks & Cheers,
Rouven
--
Blinkenlichten Open Source Solutions
Maass Sacha GbR | Weigandufer 45 | 12059 Berlin
tel: +493013896247 | fax: +493013896249 | mob: +491744220127
Web: http://www.blinkenlichten.de/ G+: http://gplus.to/blinkenlichten
Blinkenlichten Zarafa Hosted Tweets: http://twitter.com/zarafamail/
12 years, 2 months
[libvirt-users] compiling docs from git
by Arindam Choudhury
Hi,
I am unable to compile documents obtained from the git source.
I am getting this error:
Brand 'libvirt' had no content to copy. at /usr/bin/publican line 763
Thanks
12 years, 2 months