[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, 4 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] virDomainCoreDumpWithFormat files created as root
by NoxDaFox
Greetings,
I am dumping a guest VM memory for inspection using the command
"virDomainCoreDumpWithFormat" and the created files appear to belong to
root (both user and group).
I have searched around but didn't find any answer. Is there a way to
instruct QEMU to create those files under a different user?
Thank you.
9 years, 1 month
[libvirt-users] How to run libvirtd as non root user
by Anshul Arora (akarora)
Team,
I note that libvertd runs as root user that is against the least privilege security model.
root 307278 1 0 Jun20 ? 04:16:46 /usr/sbin/libvirtd -listen
Appreciate pointers to alternate options that user could configure as a potential mitigation plan?
Thanks,
-Anshul
9 years, 5 months
[libvirt-users] libvirt-1.2.17 I can't define lxc container
by Marcin Mirosław
Hello!
I'd like to set up my first lxc container using libvirt. I'd like to
start using the simplest configuration and next add things I need. So
I've got xml as below:
<domain type='lxc'>
<name>vm1</name>
<memory>32768</memory>
<os>
<type>exe</type>
<init>/init</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<features>
<capabilities policy='on'>
</capabilities>
</features>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/opt/vm-1-root'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
<source network='default'/>
</interface>
<console type='pty' />
</devices>
</domain>
When I try to define container I'm getting:
virsh # define /tmp/vm1.xml
error: Failed to define domain from /tmp/vm1.xml
error: invalid argument: could not find capabilities for ostype=exe
domaintype=lxc
I can't also find similar problem using web search engine. Maybe someone
here can give me advice?
Marcin
# virsh -V
Virsh command line tool of libvirt 1.2.17
See web site at http://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC VMWare ESX Test
Networking: Remote Bridging Interface udev Nwfilter
Storage: Dir Filesystem SCSI LVM
Miscellaneous: Daemon Nodedev Secrets Debug Readline Modular
9 years, 5 months
[libvirt-users] Custom bios image for qemu
by Phil Tooley
Hello all,
So I am trying to get a qemu guest to use a custom patched seabios image
rather than the default /usr/share/qemu/bios.bin
I have tried changing the domain config file to include either:
<os>
--SNIP--
<loader readonly='yes'
type='rom'>/home/telemin/qemu/seabios_patched.bin</loader>
</os>
OR
domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'
--SNIP--
<qemu:commandline>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/home/telemin/qemu/seabios_patched.bin'/>
</qemu:commandline>
--SNIP--
And neither of these approaches result in the new seabios_patched.bin
being used.
I am clearly missing something here, can anyone with some more
experience tell me what it is please?
Many Thanks
Phil Tooley
9 years, 5 months
Re: [libvirt-users] Migrate Win2k3 to KVM
by Pierre Schweitzer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Regarding product activation, there's nothing I can do.
You've to call Microsoft to re-activate your W2k3 licence.
This is due to hardware change on virtualization.
Regards,
On 25/07/2015 20:54, Ruzsinszky Attila wrote:
> Hi Pierre,
>
> I think the boot is working! ;-) I changed my image to IDE disk and
> W2k3 started booting but wants Product Activation ... What can I do
> with this? I can't login. I think it is a loop when I click on OK
> button in the warning window.
>
> TIA, Ruzsi
>
- --
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJVtLm1AAoJEHVFVWw9WFsLyUsQAKv0EnHnYZ+PkWMuRPvCS4xa
WnvnEkwIBxqrSXIG/b8mZ676mb+3ba9nZO22HZTKqqAndCrxQ46vsC87YSw9akcX
+Dt1EC+BWMwclG4x/LSFM44uN6ZuqRqXNWIHL1B/fZ4DUO41RQDzX0yokc16+lxE
OwzQQ5Rf8gYqHRBP/CdbrrPbgVnoa08ejRt0uwWhrMJtWwcFYz4YmPHBDSJV+GM7
lp6uU835mWDRR2DzIQ7gpDAAu3f1O2TPy15wFlidVn6XqjIcxIF9QqDj+ktQmyk+
im+PeVeqTGL75H2hyQMcx8z/kJm3ZktuqlTWbY4JvpNqBSodTYjVM9QnDsGf9JR7
Wvb6iEvxkLzGODXQ+YS2NOF4NJfTV0Wg1aodx5y+seMVlmAmFapq9QgNU39JTjg/
reMcVqjj3Es3DrQWWTZw0Mcvg2E/zxM3I58zg4Flylfxb/Krd3W4GRchwSx+/3u5
pA2Xb+Qq6Db/rWljVKHjN+LYW9llhr+/yu/W9+FYv2qJl0zZnHui+uDgljx1Byax
urjYE2XCfSzDXvayVo7xTbSzpBi7MX0NlJZoK7kY7i4f7IV4ZSQZ+7owa05pH05v
KQwjZzuSClFItIKARQ3JqXhi1ybmCH3jsoRbls6grX/tfkpzBrn1KspCFGMq7Fl/
LmU5uWVuO0o5YmQppckz
=VNFx
-----END PGP SIGNATURE-----
9 years, 5 months
Re: [libvirt-users] Migrate Win2k3 to KVM
by Pierre Schweitzer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 25/07/2015 13:55, Ruzsinszky Attila wrote:
> Hi Pierre,
>
> I got enough inspiration typing in the needed reg. keys.
>
> Here is a difference: What you wrote me:
>
> intelide
>> { ErrorControl(REG_DWORD): 00000001 Group(REG_SZ): System Bus
>> Extender Start(REG_DWORD): 00000000 Tag(REG_DWORD): 00000004
>> Type(REG_DWORD): 00000001 ImagePath(REG_SZ):
>> system32\drivers\intelide.sys }
>>
>
> My reg. keys:
>
> \ControlSet001\Services\IntelIde> ls Node has 0 subkeys and 5
> values size type value name [value if
> type DWORD] 4 REG_DWORD <ErrorControl> 1
> [0x1] 40 REG_SZ <Group> 4 REG_DWORD <Start>
> 4 [0x4] 4 REG_DWORD <Tag> 4 [0x4] 4
> REG_DWORD <Type> 1 [0x1]
>
> \ControlSet001\Services\IntelIde> cat Group Value <Group> of type
> REG_SZ, data length 40 [0x28] System Bus Extender
>
> Do I have to change? Start and ImagePath are different.
Let ImagePath, it should match your system more closely (and
differences might be just in case, so no real matter). But you
absolutely have to change Start. If Start isn't at 0x0, then, the
driver will not be loaded at boot, and you won't be able to boot your
Win2k3.
- --
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJVs6/oAAoJEHVFVWw9WFsL8vcQAMd0C5zPHdwzoANR5peBl9mJ
Z/9jY9/mF7E29yAmwKm0d3vXKgtja7v5vWar5rbyvSDpNKnUjQlwVdJEiGWwpcko
21xP7dC/IGGeEtn38wtfKOVZ0OQOAE1zs6YqbTDYSm1WgtTKNHvWjYQiPCwPmIYi
cWqmXxF0SF2ADEiRjYlqZT2cd5Ersu+hy+bRlYGUxi4t2KhQf5vnz3kqZeY2BbDZ
pG6xKRTvMDRqKiFdd3arUQ8ewJGjKvmKnGWz1ZgCvo75uzGoiuGmKDkIF6FJb3/+
+8nnFdYjd5b2NhryhIawxeZphAyMfIgt6Le1mFGgg2EBOD6xhFWv3WOLGSV775uu
29Q0+tPTE1+o8Ed1mtgaS1mRB/huPCMOMJtJS4sZ70wRdCz6i1pcYhQgXr44O1lz
JzZxhnl79Zz0v/rlRIX2EF7t41rvIf//wgoA6jIhI7B15eGPlfGUaU2tMGGf8yGu
yTcmuPKzfR1g8GJzYpNT8wFawEFOe3x2dRjA2kUdvUR1FziNdrUNxwpVOOBuOlX5
efVLf2ms+OOyIOnbSyzMOXL55K7a4HnHacCEjEvzvt60m4ZM7hcRGEE5L8Hi9LGP
z2eDwRtefK6bL4Pg3hjkpBtsG42Pr6y5904MRGtLqwvmtWlTF+txafwahXQALpSi
5QEdWTWMQdI/LBZ/1LWz
=tFUM
-----END PGP SIGNATURE-----
9 years, 5 months
[libvirt-users] libvirt events and Ruby's EventMachine
by Jonathan Barber
Hello,
I'm trying to adopt the Ruby event example from here
https://www.libvirt.org/ruby/examples/event_test.rb to use EventMachine (a
library for writing event driven programs).
I have attached my attempt, which appears subscribe to events but never
executes the callbacks I provide. I know this because when I reset domains
(virsh reset VM) I see messages appear from the
Handlers::notify_readable(), which should then invoke
Libvirt::event_invoke_handle_callback() - but the output from the callbacks
never appears. Typical output from the program looks like:
add_handle fd=11 events=1
add_timer interval=-1
:notify_readable id=0 fd=11 events=1
update_timer id=0 interval=0
:notify_readable id=0 fd=11 events=1
:notify_readable id=0 fd=11 events=1
...
When I enabled debugging by setting LIBVIRT_DEBUG to 1 the output from
libvirt appears to be the same as event_test.rb (excluding memory
addresses). Can anyone see where I'm going wrong?
Many thanks
--
Jonathan Barber <jonathan.barber(a)gmail.com>
9 years, 5 months