[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, 1 month
[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, 4 months
[libvirt-users] unable to dissect libvirt rpc packets using wireshark plugin
by gowrishankar
Hi,
I am trying libvirt plugin in wireshark to dissect RPC payload in TCP, but
finding dissector code not really working.
My env is Fedora core 21 (x86_64) and installed packages are as follow:
wireshark-1.12.6-1.fc21.x86_64
libvirt-wireshark-1.2.9.3-2.fc21.x86_64
Earlier, just after installation, I noticed libvirt.so available only in
/usr/lib64/wireshark/plugins/1.12.5/ . Wireshark could not load libvirt
plugin.
So, I copied above .so into 1.12.6/ under same plugins folder, following it
wireshark could list libvirt as supported protocol.
tshark -G protocols | grep libvirt
Libvirt libvirt libvirt
However, on checking with some pcaps which has libvirt RPC calls captured on
wire, wireshark does not list libvirt RPC packets, as I search for "libvirt"
protocol in pcap.
Have anyone experienced this before or if you have any pointer that I could
check in my env, that would be very helpful.
--
Regards,
Gowrishankar M
8 years, 8 months
[libvirt-users] Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied
by Keyur Bhalerao
Hi ,
Working on the simple POC : Advanced snapshot using libvirt and qemu .
Following are the exact steps which are followed .
1. Created as base VM - Ubuntu 15.10 with following libvirt and qemu
versions
Using library: libvirt 1.2.16
Using API: QEMU 1.2.16
Running hypervisor: QEMU 2.3.0
QEMU emulator version 2.3.0 (Debian 1:2.3+dfsg-5ubuntu9.1), Copyright
(c) 2003-2008 Fabrice
Bellard
2.Created nested VM (vm-01) using VirtManager on base VM.
3.Used following commands to take the multiple snapshots -
virsh # list
Id Name State
----------------------------------------------------
7 vm-01 running
virsh # domblklist vm-01
Target Source
------------------------------------------------
vda /home/ubuntu/vm-01.img
hda /dev/sr0
snapshot-create-as --domain vm-01 snap1 --diskspec
vda,file=/var/lib/libvirt/sn1.qcow2 --disk-only --atomic
snapshot-create-as --domain vm-01 snap2 --diskspec
vda,file=/var/lib/libvirt/sn2.qcow2 --disk-only --atomic
virsh #snapshot-list vm-01
------------------------------------------------------------
snap1 2015-12-07 11:51:51 -0800 disk-snapshot
snap2 2015-12-07 11:52:28 -0800 disk-snapshot
virsh # snapshot-list vm-01 --tree
snap1
|
+- snap2
List the current block device in use, again. It can be noticed, the new
overlay 'sn2.qcow2' is the current disk in use:
virsh # domblklist vm-01
Target Source
------------------------------------------------
vda /var/lib/libvirt/sn2.qcow2
hda /dev/sr0
Now that the backup is finished, perform active blockcommit by live
mergning contents of sn2 into base:
ubuntu@keyurubuntu:~$ virsh blockcommit vm-01 vda --active --verbose --pivot
error: internal error: unable to execute QEMU command 'block-commit': Could
not reopen file: Permission denied
I am not sure why this is getting as permission denied. I have tried couple
of times reinstalling and creating new VMs . Every time when i have tried
to block-commit getting landed into same error.
Is there any troubleshooting or solution to this issue. Stuck on this issue
for last 2 days.
Quick help much appreciated.
Thanks,
Keyur Bhalerao
Reference used -
http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
-
http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/
8 years, 9 months
[libvirt-users] Hypervisor loses network connectivity
by Phill Edwards
I have been running KVM on a CentOS 7.1 host for a few months. I have one
"main" host server plus a "backup" host server. Some time ago everything
was running fine on "main", but all of a sudden the server became
non-contactable on it's network interface. I could no longer SSH in and
therefore couldn't run virt-manager. I don't know what caused this and I
had to bring all the VMs up on "backup" and they've been running OK there
ever since.
Over the last few days I've rebuilt "main" and again all was going well and
I migrated 4 of the 5 VMs back onto it. Then this morning I came to set up
the final VM on "main" which is a Sophos firewall machine with 3 NICs (I
have 3 physical NICs). Nothing uses 2 of the 3 NICs except the Sophos VM. I
unplugged one of the ethernet cables from "backup" and plugged it into the
3rd NIC on "main" and all of a sudden "main" froze and again all network
connectivity was lost. I rebooted it but the problem still remains that
it's not contactable over the network and is therefore totally
non-functional. When I log in at the console and run "ip a" I can see
various network interfaces including br0 with the expected IP address - so
it looks like it's got network connectivity but it hasn't.
Has anyone else experienced this and know why it happens and how to fix it?
I don't think I fancy rebuilding everything a 3rd time as it seems likely
to happen again. Depending on why it's happening I'm thinking of moving off
CentOS onto Ubuntu as the host OS, or moving away from KVM altogether.
Thanks in advance for any help you can give.
8 years, 9 months
[libvirt-users] QXL-driver for Windows 10
by Dominique Ramaekers
Hi,
I can't seem to find a QXL-driver for Windows 10. The qxl-0.1-21 won't install due to being incompatible to Windows 10.
Am I missing something?
Thanks in advance,
Dominique.
8 years, 9 months
[libvirt-users] double nat - common setup
by lejeczek
hi everybody
my mind must have gone blank & eyes blind, I'm hoping it's
simple and somebody can shed the light on bit I cannot see.
a regular default net:
<network>
<name>default</name>
<uuid>4c0a0c44-7e8a-493b-a57c-87cd38eaa0f7</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
...
a winbox on that net and I cannot access it from/via Internet,
port forwarding fixed on the default gw/internet interface
(or rather firewalld's zone), it forwards to winbox.
what is it?
8 years, 9 months
[libvirt-users] Setting environment variables for LXC Containers
by Harish Vishwanath
Hello
Is there a way to set custom environment variables for LXC containers so
that it is available for all processes within the container?
The libvirt-lxc driver seems to be setting up only the below variables (as
per the docs), but there doesn't seem to be a way customize it.
containerThe fixed string libvirt-lxc to identify libvirt as the creator
container_uuidThe UUID assigned to the container by libvirtPATHThe fixed
string /bin:/usr/binTERMThe fixed string linuxHOMEThe fixed string /
In addition to the standard variables, the following libvirt specific
environment variables are also provided
LIBVIRT_LXC_NAMEThe name assigned to the container by libvirt
LIBVIRT_LXC_UUIDThe UUID assigned to the container by libvirt
LIBVIRT_LXC_CMDLINEThe unparsed command line arguments specified in the
container configuration. Use of this is discouraged, in favour of passing
arguments directly to the container init process via the initarg config
element.
I am looking for something similar to this:
https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html
(lxc.environment)
Regards,
Harish
8 years, 9 months
[libvirt-users] centos6.5 libvirt 1.2.14 virsh hang
by 王李明
hi all:
my environment is centos6.5
libvirt version is 1.2.14-1
qemu version is 1.7.0-1
I use openstack create a windows guest
about two days later I run virsh list but the the process is hang
virsh list can not return any thing
it hang
then I run /etc/init.d/libvirtd restart
it show libivrtd stop faild and start failed
I run /etc/init.d/libvirtd status it show libvired dead but subsys locked
who can help me ?
thans
8 years, 9 months