[libvirt-users] ceph rbd pool and libvirt manageability (virt-install)
by Jelle de Jong
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello everybody,
I created a rbd pool and activated it, but I can't seem to create
volumes in it with virsh or virt-install?
# virsh pool-dumpxml myrbdpool
<pool type='rbd'>
<name>myrbdpool</name>
<uuid>2d786f7a-2df3-4d79-ae60-1535bcf1c6b5</uuid>
<capacity unit='bytes'>6997998301184</capacity>
<allocation unit='bytes'>10309227031</allocation>
<available unit='bytes'>6977204658176</available>
<source>
<host name='ceph01.powercraft.nl' port='6789'/>
<host name='ceph02.powercraft.nl' port='6789'/>
<host name='ceph03.powercraft.nl' port='6789'/>
<name>libvirt-pool</name>
<auth type='ceph' username='libvirt'>
<secret uuid='029a334e-ed57-4293-bb99-ffafa8867122'/>
</auth>
</source>
</pool>
# virt-install --version
1.0.1
# virsh --version
1.2.9
I ended using virsh edit ceph-test.powercraft.nl and making creating
the disk manually.
<disk type='network' device='disk'>
<auth username='libvirt'>
<secret type='ceph' uuid='029a334e-ed57-4293-bb99-ffafa8867122'/>
</auth>
<source protocol='rbd' name='libvirt-pool/kvm01-storage'>
<host name='ceph01.powercraft.nl' port='6789'/>
<host name='ceph02.powercraft.nl' port='6789'/>
<host name='ceph03.powercraft.nl' port='6789'/>
</source>
<target dev='vdc' bus='virtio'/>
</disk>
I use virt-install a lot to define, import and undefine domains, how
can I use virt-install to manage my rdb disks?
Kind regards,
Jelle de Jong
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iJwEAQECAAYFAlV1xlQACgkQ1WclBW9j5HkbPQP+PjNrzvlqysslOp2Yk7wH4Mxy
2sh2dn96G0KOAHEeEn3BN6IWlnD1TADZbHdpTtMwkdv48Xwn0sP1s+3QDM4pb3gP
n+z+dVxS8FouDIy/eiso3IBCj3g4TWbEX8ZHqs3jKqe0lZgAXBzB9xYSUowcEBrZ
ddkPbr8p8ozWyOG+9V8=
=lkK7
-----END PGP SIGNATURE-----
6 years, 3 months
[libvirt-users] virRandomBits - not very random
by Brian Rak
I just ran into an issue where I had about 30 guests get duplicate mac
addresses assigned. These were scattered across 30 different machines.
Some debugging revealed that:
1) All the host machines were restarted within a couple seconds of each
other
2) All the host machines had fairly similar libvirtd pids (within ~100
PIDs of each other)
3) Libvirt seeds the RNG using 'time(NULL) ^ getpid()'
This perfectly explains why I saw so many duplicate mac addresses.
Why is the RNG seed such a predictable value? Surely there has to be a
better source of a random seed then the timestamp and the pid?
The PID seems to me to be a very bad source of any randomness. I just
ran a test across 60 of our hosts. 43 of them shared their PID with at
least one other machine.
6 years, 6 months
[libvirt-users] unhelpful error message on failed "virsh migrate"
by Andreas Buschmann
Hello,
I have two servers where I can push VMs from one to the other by issuing
the command
virsh migrate --live --persistent --copy-storage-all --verbose \
test6 qemu+ssh://kvmhost2/system
on kvmhost1. I can get the VM back by issuing the equivalent command on
kvmhost2:
virsh migrate --live --persistent --copy-storage-all --verbose \
test6 qemu+ssh://kvmhost1/system
After an update (on behalf of the glibc bug) it only works for some VMs
and fails for others. The error message is unhelpful:
virsh --debug 4 migrate --live --persistent --copy-storage-all --verbose \
vmware-mgmt qemu+ssh://kvmhost1/system
error: internal error: info migration reply was missing return status
Is there a way to get a more helpful error message?
migrating VMs only works for a very limited subset of the VMs on the
system in the direction kvmhost2 --> kvmhost2
Stopping the VMs, copying them over to kvmhost1 and restarting still
works, and I can even migrate them back.
How do I debug this problem?
One possible way would be to stop all VMs on kvmhost2, manually copy
them to kvmhost1 and start them
and afterwards reinstall all packages
(or the whole Server if that doesn't help)
But that would be a workaround, and I still would not know what the
problem is.
The system is CentOS 7.2 now and was CentOS 7.1 before the upgrade, with
the qemu-kvm-rhev repo added for qemu.
Mit freundlichen Gruessen
Andreas Buschmann
--
Andreas Buschmann
[Senior Systems Engineer]
net.DE AG
8 years, 6 months
[libvirt-users] Networking issues with lxc containers in AWS EC2
by Peter Steele
I've created an EC2 AMI for AWS that essentially represents a CentOS 7
"hypervisor" image. I deploy instances of these in AWS and create an
number of libvirt based lxc containers on each of these instances. The
containers run fine within a single host and have no problem
communicating with themselves as well as with their host, and vice
versa. However, containers hosted in one EC2 instance cannot communicate
with containers hosted in another EC2 instance.
We've tried various tweaks with our Amazon VPC but have been unable to
find a way to solve this networking issue. If I use something like
VMware or KVM and create VMs using this same hypervisor image, the
containers running under these VMs can communicate with with each other,
even across different hosts.
My real question is has anyone tried deploying EC2 images that host
containers and have figured out how to successfully communicate between
containers on different hosts?
Peter
8 years, 8 months
[libvirt-users] /proc/meminfo
by Peter Steele
Has anyone seen this issue? We're running containers under CentOS 7.2
and some of these containers are reporting incorrect memory allocation
in /proc/meminfo. The output below comes from a system with 32G of
memory and 84GB of swap. The values reported are completely wrong.
# cat /proc/meminfo
MemTotal: 9007199254740991 kB
MemFree: 9007199224543267 kB
MemAvailable: 12985680 kB
Buffers: 0 kB
Cached: 119744 kB
SwapCached: 10804 kB
Active: 110228 kB
Inactive: 111716 kB
Active(anon): 53840 kB
Inactive(anon): 57568 kB
Active(file): 56388 kB
Inactive(file): 54148 kB
Unevictable: 0 kB
Mlocked: 15347728 kB
SwapTotal: 0 kB
SwapFree: 18446744073709524600 kB
Dirty: 20304 kB
Writeback: 99596 kB
AnonPages: 18963368 kB
Mapped: 231472 kB
Shmem: 51852 kB
Slab: 1891324 kB
SReclaimable: 1805244 kB
SUnreclaim: 86080 kB
KernelStack: 60656 kB
PageTables: 81948 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 104487760 kB
Committed_AS: 31507444 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 354796 kB
VmallocChunk: 34359380456 kAnonHugePages: 15630336 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 81684 kB
DirectMap2M: 3031040 kB
DirectMap1G: 32505856 kB
8 years, 8 months
[libvirt-users] uefi built from tiancore via edk2 can't persist boot changes
by jsl6uy js16uy
Apologies if this has been gone over, but I believe I have checked the
intertubes more than a bit.....
I am using libvirt and have vms booting under an OVMF.fd to use an efi
firmware. I can create vms, linux ubuntu, and they will boot up. However,
everytime I reboot am I dropped into the default efi shell provide by the
tianocore build.
Then I must walk the FS to the booting efi app and run, in this case
grubx64.efi, to actually finish booting the host.
I had tried adding boot entries with efibootmgr within the OS and also bcfg
with the efi shell. I get no errors when adding an entry, and the new entry
shows up and I can manipulate the entry i.e. set it to next boot and the
like. Soon as I reboot I get dumped back to efi shell.
Am I missing something? Are the var changes not being stored? Is there
someplace to look for an error perhaps?
I also can use the same efi bootloader under libvirt to boot a hybrid iso.
location of the efi application on the hybrid iso is /EFI/boot/bootx64.efi.
Drops me right into my grub menu, after falling thru from EFI FLOPPY1 and
EFI FLOPPY2 to EFI DVD
So since that was/is working, tried adding that to my efi partition so it
has /EFI/boot/bootx64.efi. The thinking being that since I can't add an
entry, I will setup for the "known" efi boot path. Of course that didn't
work either
I am on arch linux:
Linux X 4.4.5-1-ARCH #1 SMP PREEMPT Thu Mar 10 07:38:19 CET 2016 x86_64
GNU/Linux
local/libvirt 1.3.2-3
API for controlling virtualization engines
(openvz,kvm,qemu,virtualbox,xen,etc)
local/libvirt-python 1.3.1-1
libvirt python binding
UEFI:
Shell> ver
UEFI Interactive Shell v2.1
EDK II
UEFI v2.50 (EDK II, 0x00010000)
for this host....my nvram setting look like
<os>
<type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
<loader readonly='yes' type='pflash'>/home/xyz/OVMF.fd</loader>
<nvram
template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/X_VARS.fd</nvram>
<boot dev='hd'/>
</os>
8 years, 8 months
[libvirt-users] libvirtd vs XDG_RUNTIME_DIR
by Lars Kellogg-Stedman
I ran into an odd problem today. I wanted to share it here in the
hopes of maybe saving someone else some lost time.
When you run libvirtd as an unprivileged user (e.g., if you target
qemu:///session from a non-root account), then libvirt will open a
unix domain socket in one of two places:
- If XDG_RUNTIME_DIR is defined, then inside
$XDG_RUNTIME_DIR/libvirt/libvirt-sock
- If XDG_RUNTIME_DIR is *not* defined, then inside
$HOME/.cache/libvirt/libvirt-sock
With a CentOS 7 system, at least, if you ssh directly into an
account, XDG_RUNTIME_DIR is set. But! If you `su -` to the account
from root, e.g:
# su - stack
Then XDG_RUNTIME_DIR is *not* set. The problem is a little subtle,
because most operations you will perform will work just fine in both
cases: you can query for defined but not active guests, storagep
pools, volumes, and so forth without a problem and you'll get the same
answer.
The problem crops up when you start a guest, which results in a
persistent libvirtd process. Now, depending on how you got to your
account, you will either (a) talk to the persistent process, and
you'll be able to see the running guests, or (b) you'll end up
spawning a new ephemeral libvirtd process listening in the *other*
location, and you won't see anything, and you will wonder why there is
a qemu process running for your guest but it's not showing up in
"virsh list" and what the heck is going on here.
I don't know if there's a good solution to this, but the failure mode
is really non-obvious.
Cheers,
--
Lars Kellogg-Stedman <lars(a)redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack | http://blog.oddbit.com/
8 years, 8 months
[libvirt-users] (no subject)
by nidhi d
How is tunnelled option specified during migratiion different than an
ordinary ssh connection specified as:- virsh migrate vmName
qemu+ssh://user@remotesys/system?
8 years, 8 months
[libvirt-users] How is calculate the lock with lockd_manager
by villeneu@kassis.univ-brest.fr
Hello
I use lock_manager with libvirt 1.3 and
I would like to know how is exactly calculate the hash SHA256. I would
create a table
to retreive the name with the hash in case of crash to release manualy the
lock.
I do an sha256 hash from /var/lib/libvirt/images/lock/MyVM.img but I
don't get the same hash code
form virtlockd ?
Any Ideas ?
Best regards
-----
PS:
sorry for my previous mail it was in a wrong thread
8 years, 8 months
[libvirt-users] Accessing xenstore from libvirt
by Marin Bek
Hi,
is it possible to access xenstore through libvirt? Or at least any other
programatic means other than calling xenstore-read/write through shell?
I understand it is somewhat of a security risk but still...
Thanks,
Marin
8 years, 8 months