[libvirt-users] changue bridge name, libvirt refuses to take new name
by Sergio A. Kessler
hi all,
(this events ocurred before my previous mail about the uuid incident)
so, I installed a vm
host: rhel6
guest: centos6
network: bridge (br0, eth1 as slave)
but then, I changed the name of the bridge from br0 to br1
(because br1<->eth1 seems pretty than br0<->eth1)
so:
- mv /etc/sysconfig/network-scripts/ifcfg-br0
/etc/sysconfig/network-scripts/ifcfg-br1
- edited /etc/sysconfig/network-scripts/ifcfg-br1
change DEVICE=br0 by DEVICE=br1
- edited /etc/sysconfig/network-scripts/ifcfg-eth1 and
changed the line BRIDGE=br0 to BRIDGE=br1
- edited /etc/libvirt/qemu/rmdev2.xml and changed the line <source
bridge='br0'/> to <source bridge='br1'/>
- service network restart
<aside note>
boom! lost connection to the server
I had to go to server location (a few miles) by car
because the network restart didn't stop br0 because thera was no script br0
and when br1 started produced a collision
</aside note>
- service libvirtd restart
# brctl show
bridge name bridge id STP enabled interfaces
br1 8000.e41f13ba6e1a no eth1
virbr0 8000.5254003a3124 yes virbr0-nic
# virsh -c qemu:///system start rmdev2
error: Failed to start domain rmdev2
error: Failed to add tap interface to bridge 'br0': No such device
there *nothing* 'br0' in /etc in the system (I grepped it),
why is looking for br0 instead of br1 ?
I ended up undefining rmdev2, installing a new guest called rmdev2
using br1, and that was when I got the
error: operation failed: cannot restore domain 'rmdev2' uuid
9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to
domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d
yes, I was ready to fire the house and leaving for better places...
thanks,
/sergio
12 years, 11 months
[libvirt-users] new guest with same name as undefined one
by Sergio A. Kessler
hi,
- host: rhel6
- I created a guest rmdev2 (centos6)
- undefined it
- again created rmdev2 guest (centos6)
now I get:
[root@rmdev1 var]# virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # list --all
Id Name State
----------------------------------
- rmdev2 shut off
virsh # start rmdev2
error: Failed to start domain rmdev2
error: operation failed: cannot restore domain 'rmdev2' uuid
9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to
domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d
why ?
it seems the ghost of the old guest is causing problems...
all the files used by the first guest are deleted...
thanks.
/sergio
12 years, 11 months
[libvirt-users] ANNOUNCE: oz 0.7.0 release
by Chris Lalancette
All,
I'm pleased to announce release 0.7.0 of Oz. Oz is a program for doing
automated installation of guest operating systems with limited input from
the user.
Release 0.7.0 is a bugfix and feature release for Oz. Some of the
highlights between Oz 0.6.0 and 0.7.0 are:
- Ability to use the "direct initrd injection" method to install Fedora/RHEL
guests. This is an internal implementation detail, but can significantly speed
up installs for Fedora or RHEL guests. (thanks for the tip from
Kashyap Chamarthy)
- Support for Fedora-16 (thanks to Steve Dake for help in making this work)
- Use the serial port to announce guest boot, rather than a network port. This
makes it so we no longer have to manipulate iptables, and gets us one step
closer to having Oz run as non-root
- (for developers) Re-written unittests in python for speedier execution
- (for developers) Additional methods in the TDL class to merge in external
package lists (thanks to Ian McLeod)
A tarball of this release is available, as well as packages for Fedora-14,
Fedora-15, and RHEL-6. Note that to install the RHEL-6 packages, you must be
running RHEL-6.1 or later. Instructions on how to get and use Oz are available
at http://aeolusproject.org/oz.html
If you have any questions or comments about Oz, please feel free to contact
aeolus-devel(a)lists.fedorahosted.org or me (clalance(a)redhat.com) directly.
Thanks to everyone who contributed to this release through bug reports,
patches, and suggestions for improvement.
--
Chris Lalancette
12 years, 11 months
[libvirt-users] virDomainDefineXml Issue
by Kiran Javaid
Hello Everyone,
I am facing a problem in defining the xml for domain creation using libvirt. I am using Xen hypervisor.
domPtr = lib.virDomainDefineXML(conPtr, domainXML);
I get the following error:
"libvir: Xen Daemon error : XML error: failed to parse domain description"
Any suggestions are welcome.
Regards.
12 years, 11 months
[libvirt-users] Hot cloning & P2V
by smain kahlouch
Hi all,
I guess my question is stupid and has been asked a thousand times but i was
wondering if it's possible to do the following things:
- Cloning of a running virtual machine (hot copy)
- Migrate a physical server to a virtual one.
I googled a bit and am not able to find the answers.
Thanks.
Regards,
Sam
12 years, 11 months
[libvirt-users] random "monitor socket did not show up"
by Gian Uberto Lauri
Hello gentlemen!
I just experienced this weird thing:
I have 2 machines (one is a Dell Pe1950 with 2 Xeon 5130, the other is
a Fujitsu RX200S6 with 2 Xeon E5645), both run CentoOS 5.6, the DELL
has the 2.6.18-238.9.1.el5 while the Fujitsu runs the
2.6.18-238.12.1.el5 kernel.
But when I try to do a virsh create with this script
<domain type='kvm'>
<name>one-292</name>
<memory>1894400</memory>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/one/292/images/disk.0'/>
<target dev='hda'/>
<driver name='qemu' type='qcow2'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/one/292/images/disk.1'/>
<target dev='hdb'/>
<readonly/>
<driver name='qemu' type='raw'/>
</disk>
<interface type='bridge'>
<source bridge='br0:0'/>
<mac address='20:00:ac:14:fe:06'/>
</interface>
<graphics type='vnc' listen='0.0.0.0' port='6192'/>
</devices>
</domain>
it works perfectly on the Dell. On the Fujitsu it failed repeatedly
and then worked.
Any explainations and some hint on getting it work always ?
--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area
GianUberto.Lauri(a)eng.it
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
Skype: gian.uberto.lauri | David Korn, AT&T Bell Labs
http://www.eng.it | ioccc best One Liner, 1987
12 years, 11 months
[libvirt-users] Problem with allocation of big files
by Nikita A Menkovich
Hello,
I found a strange problem with allocationg big files on drive.
For example in guestfish I allocate large disk image
for example:
$ guestfish
><fs> allocate test.img 20G
When an image allocating, there is a big slowdown of guest OSes,
launched on host machine, and on different drives.
For Linux guests with virtio drivers, there is no so big performance
penalty, but for FreeBSD guests with ide it seems like the OS locked.
Manipulating with ionice and niceness do not affect at all.
Manipulating with cfq, deadline schedulers also do not have any results.
OS Debian Squeeze
libvirtd (libvirt) 0.9.2
QEMU emulator version 0.14.0 (Debian 0.14.0+dfsg-5.1), Copyright (c)
2003-2008 Fabrice Bellard
guestfish 1.10.3 with some local patches, backported from main tree
Does anyone have ideas how to fix it?
--
Nikita A Menkovich
http://libc6.org/
JID: menkovich(a)gmail.com
12 years, 11 months
[libvirt-users] Remote connect using virsh qemu+ssh hangs / PolicyKit issue
by Trey Dockendorf
I'm attempting to remote connect to my KVM instance using virsh, but all the
commands hang.
When issuing the below command, nothing on the remote system happens, and no
errors are displayed, (hostname changed)
$ virsh --debug 5 --log /var/lib/foreman/virsh.log -c
qemu+ssh://foreman@kvmhost.tld:16509/system?no_tty=1
This is the uncommented lines in /etc/libvirt/libvirtd.conf
----------
listen_tls = 0
listen_tcp = 1
listen_addr = "<omitted, set to management NIC>"
log_level = 1
log_filters="1:remote 1:event 1:qemu"
log_outputs="1:syslog:libvirtd 1:file:/var/log/libvirt/libvirtd.log"
This is the only debug output I get in /var/log/libvirt/libvirtd.log during
the remote connection attempt
-----------
17:56:04.579: debug : virEventRunOnce:595 : Poll got 1 event
17:56:04.580: debug : virEventDispatchTimeouts:405 : Dispatch 3
17:56:04.580: debug : virEventDispatchHandles:450 : Dispatch 10
17:56:04.580: debug : virEventDispatchHandles:464 : i=0 w=1
17:56:04.580: debug : virEventDispatchHandles:464 : i=1 w=2
17:56:04.580: debug : virEventDispatchHandles:464 : i=2 w=3
17:56:04.580: debug : virEventDispatchHandles:464 : i=3 w=4
17:56:04.580: debug : virEventDispatchHandles:464 : i=4 w=5
17:56:04.580: debug : virEventDispatchHandles:464 : i=5 w=6
17:56:04.580: debug : virEventDispatchHandles:464 : i=6 w=7
17:56:04.580: debug : virEventDispatchHandles:464 : i=7 w=8
17:56:04.580: debug : virEventDispatchHandles:477 : Dispatch n=7 f=13 w=8
e=1 0x1629640
17:56:04.580: debug : virEventAddHandleImpl:113 : Add handle fd=20 events=1
cb=0x4196e0 opaque=0x1629640
17:56:04.580: debug : virEventInterruptLocked:664 : Skip interrupt, 1
-1447459072
17:56:04.580: debug : virEventDispatchHandles:464 : i=8 w=9
17:56:04.580: debug : virEventDispatchHandles:464 : i=9 w=10
17:56:04.580: debug : virEventCleanupTimeouts:495 : Cleanup 3
17:56:04.580: debug : virEventCleanupHandles:536 : Cleanupo 11
17:56:04.580: debug : virEventCleanupTimeouts:495 : Cleanup 3
17:56:04.580: debug : virEventCleanupHandles:536 : Cleanupo 11
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=0 w=1, f=5 e=1
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=1 w=2, f=7 e=1
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=2 w=3, f=14 e=1
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=3 w=4, f=15 e=1
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=4 w=5, f=17 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=5 w=6, f=18 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=6 w=7, f=19 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=7 w=8, f=13 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=8 w=9, f=12 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=9 w=10, f=11 e=25
17:56:04.580: debug : virEventMakePollFDs:373 : Prepare n=10 w=15, f=20 e=1
17:56:04.580: debug : virEventCalculateTimeout:314 : Calculate expiry of 3
timers
17:56:04.580: debug : virEventCalculateTimeout:344 : Timeout at 0 due in -1
ms
17:56:04.580: debug : virEventRunOnce:593 : Poll on 11 handles
0x7f35a4001240 timeout -1
I've already opened up the firewall for port 16509, and allowed the user
foreman (member of libvirt_admin) to manage libvirt via PolicyKit
Relevant line in iptables,
5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp
dpt:16509
/etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
-----------
[libvirt Remote Access]
Identity=unix-group:libvirt_admin
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Originally I had created the
file /etc/polkit-1/localauthority/50-local.d/51-libvirt-foreman-remote-access.pkla
with contents below, and had the file 50-libvirt-remote-access.pkla only
allowing a single user.
/etc/polkit-1/localauthority/50-local.d/51-libvirt-foreman-remote-access.pkla
----------
[libvirt Foreman Remote Access]
Identity=unix-user:foreman
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
However I wasn't able to connect to libvirt on the host itself, and the logs
indicated it was a PolicyKit block, so my second problem/question...Is it
possible to have multiple local PolicyKit *.pkla files or can only one
exist? From the documentation here,
http://wiki.libvirt.org/page/SSHPolicyKitSetup, it seems like so long as the
names are unique then multiple would be allowed. Reason that's key is I'm
using Puppet and will have multiple servers/applications needing access and
being restricted to a single file to manage will be a problem.
Connecting locally with a specific pkla for "foreman"...
-----------
$ virsh -c qemu:///system
error: authentication failed
error: failed to connect to the hypervisor
/var/log/libvirt/libvirtd.log
---------
17:50:06.102: debug : virRunWithHook:914 : Command stderr: Not authorized.
17:50:06.103: error : remoteDispatchAuthPolkit:3810 : Policy kit denied
action org.libvirt.unix.manage from pid 29640, uid 503, result: 256
Thanks
- Trey
12 years, 11 months
[libvirt-users] libvirt does not recognize all devices in iscsi and mpath pools in a predictable manner
by Guido Winkelmann
Hi,
I'm using libvirt 0.8.3 on Fedora 14 (as I wrote earlier, I'm having some
trouble updating to the newest version), and I'm having problems getting iscsi
and mpath storage pools to work in a usable and consistent manner.
I have two storage pools defined on the host machine, one for raw iscsi-
devices and one for those same iscsi devices device-mapped by multipath. They
look like this:
<pool type='iscsi'>
<name>iscsi01</name>
<source>
<host name='10.3.1.15'/>
<device
path='iqn.1984-05.com.dell:powervault.md3200i.6782bcb0000859f3000000004d3eec7d'/>
</source>
<target>
<path>/dev/disk/by-id</path>
</target>
</pool>
and:
<pool type="mpath">
<name>mpath01</name>
<target>
<path>/dev/mapper</path>
</target>
</pool>
I chose <path>/dev/disk/by-id</path> over /dev/disk/by-path for the iscsi pool
because I need to be able to migrate running virtual machines to other hosts,
so the actual device paths for the disks need to be the same on all hosts in
the cluster.
I have two LUNs configured in the iSCSI array, and when I list the volumes in
the iscsi pool, I get this:
virsh # vol-list iscsi01
Name Pfad
-----------------------------------------
23.0.0.1 /dev/disk/by-id/wwn-0x6782bcb0000859f3000007004e680190
23.0.0.2 /dev/disk/by-id/scsi-36782bcb0000859f3000007294e6e73f2
Apparently, for some weird reason, libvirt chooses one naming scheme for one
of the volumes and another for the other one. This a problem for me for two
reasons.
1 - Once I create a new lun for a new VM, rescan the iscsi bus and refresh
libvirt's pool (see my mail from 24th of August on this list), I need to be
able to automatically and reliably identify the corresponding new volumes in
libvirt's volume list, so I can initialize them by copying an OS image onto
them and then assign them to the new virtual machine. This is made a lot
harder if libvirt randomly switches between naming schemes - though still
feasible if I'm aware of the problem.
2 - I need to be able to migrate running VMs to a different host machine, in
case the current one is overloaded or in need of maintenance. This is bound to
be problematic if the storage volumes go by different path names on the
different hosts.
Both LUNs do appear under both naming schemes under /dev/disk/by-id:
ls /dev/disk/by-id/
[...]
scsi-36782bcb0000859f3000007004e680190
[...]
scsi-36782bcb0000859f3000007294e6e73f2
scsi-36a4badb00b0f910012e0fccb07606fe6
[...]
wwn-0x6782bcb0000859f3000007004e680190
[...]
wwn-0x6782bcb0000859f3000007294e6e73f2
wwn-0x6a4badb00b0f910012e0fccb07606fe6
[...]
(snipped some irrelevant parts)
With the mpath pool, it's even worse: One of the two volumes is completely
missing:
virsh # vol-list mpath01
Name Pfad
-----------------------------------------
dm-3 /dev/mapper/36782bcb0000859f3000007004e680190
Both iscsi volumes have in fact been picked up by multipathd and do appear in
/dev/mapper/, too, but no matter how often I say refresh-pool mpath01, it will
always only show the one volume.
Does anybody know of these problems or how to work around them? Are these
problems solved in newer versions? (I could not find anyhting in the
bugtracker...)
Guido
12 years, 11 months