[libvirt-users] can virsh set the cpuset attribute of <vcpu ..> (CPU Allocation) ?
by Edoardo Comar
Is it possible to use virsh to set the cpuset attribute of the CPU
Allocation element in a domain ?
<domain>
...
<vcpu placement='static' cpuset="1-4,^3,6" current="1">2</vcpu>
...
</domain>
I have seen that virsh vcpupin and virsh emulatorpin can be used to query
and set
the cpusets of the <vcpupin> and <emulatorpin> children elements of
<cputune>
which override the cpuset of <vcpu>.
If i did not have to pin to different PCPUs, I would execute just one
command for the whole domain
rather than one command per VCPU + one per the emulator threads.
Thanks!
--------------------------------------------------
regards,
Edoardo Comar
WebSphere Application Service Platform for Networks (ASPN)
ecomar(a)uk.ibm.com
IBM UK Ltd, Hursley Park, SO21 2JN
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
11 years, 6 months
Re: [libvirt-users] How to mount / use a hard disk partition for libvirt instead of created a new virtual disk
by Roland Giesler
I change the topic to be more descriptive. I hope this doesn't break
the message threading of this list!
On Thu, Jun 13, 2013 at 8:48 PM, Roland Giesler <roland(a)giesler.za.net> wrote:
> Surely there must be someone here that knows how to do this? Maybe
> someone that has used some other partition type in this way?
>
> On Mon, Jun 10, 2013 at 10:06 PM, Roland Giesler <roland(a)giesler.za.net> wrote:
>> I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui).
>>
>> I have been led to believe that it is possible to use and existing partition
>> as the disk storage volume for a virtual machine.
>>
>> The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block
>> Device I can select the partion. What I can't figure out is how to tell the
>> vitual machine to use this volume.
>>
>> I tried with virt-manager, but the only options I have are
>>
>> * Local media
>> * Network install
>> * Network Boot
>> * Import Existing Disk Image
>>
>> How can I do this?
>>
>> regards
>>
>> Roland Giesler
>>
11 years, 6 months
[libvirt-users] Starting libvirt management daemon: failed!
by Евгений Суворов
Hello all,
I had Debian 6.0.6 and libvirt 0.8.3 but it is was default installed
without ESXi support (sudo apt-get install libvirt-bin). And it was
working. I downloaded libvirt 0.9.12 and and have result:
$ ./configure --with-exsi
$ make
$ sudo make install
oneadmin@debian:~$ virsh
virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.12' not
found (required by virsh)
oneadmin@debian:~$ /etc/init.d/libvirt-bin start
Starting libvirt management daemon: libvirtd/usr/sbin/libvirtd:
/usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.12' not found
(required by /usr/sbin/libvirtd)
failed!
What me do?
--
С уважением, Евгений.
Тел: +79060665574
ICQ: 380264507
11 years, 6 months
[libvirt-users] virsh snapshot-create and blockcopy
by Thomas Stein
Hello.
I just tried the following:
virsh dumpxml --security-info gentoo-template > gentoo-template.xml
virsh snapshot-create gentoo-template
virsh undefine gentoo-template
virsh blockcopy gentoo-template vda
/opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 --wait
--verbose --finish
virsh define gentoo-template.xml
virsh snapshot-delete gentoo-template --current
But if i restore the
/opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 the
snapshot is gone.
Someone has an idea what i'm missing? I suppose i'm just
missunderstandig the snapshot mechanism.
thanks an best regards
t.
11 years, 6 months
[libvirt-users] Pools are not persistent
by Daniel Bareiro
Hi all!
I'm trying virt-manager on Debian Wheezy and I noticed that it has
already defined a "default" pool. But if I run:
# /etc/init.d/libvirt-bin restart
I lose the definition of the pools. Actually, there are the definitions
of the pools; but these are not read after restarting libvirt.
ss01:/etc/libvirt/storage# ls -l
total 8
drwxr-xr-x 2 root root 4096 jun 1 09:36 autostart
-rw------- 1 root root 664 jun 1 13:46 default.xml
ss01:/etc/libvirt/storage/autostart# ls -l
total 0
lrwxrwxrwx 1 root root 32 may 24 07:24 default.xml -> /etc/libvirt/storage/default.xml
After restart libvirt:
virsh # pool-list
Name State Autostart
-----------------------------------------
This is what I see in libvirtd.log:
2013-06-02 01:05:29.709+0000: 19289: info : libvirt version: 0.9.12
2013-06-02 01:05:29.709+0000: 19289: error : virStorageDefParsePerms:613 : XML error: malformed owner element
2013-06-02 01:05:30.210+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:30.211+0000: 19289: warning : qemuCapsInit:949 : Failed to get host power management capabilities
2013-06-02 01:05:33.014+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:33.014+0000: 19289: warning : lxcCapsInit:77 : Failed to get host power management capabilities
2013-06-02 01:05:33.025+0000: 19289: error : virExecWithHook:424 : Cannot find 'pm-is-supported' in path: No existe el fichero o el directorio
2013-06-02 01:05:33.025+0000: 19289: warning : umlCapsInit:87 : Failed to get host power management capabilities
could this be due to some type of error in the XML file that defines the
pool?
ss01:/etc/libvirt/storage# cat default.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made
using:
virsh pool-edit default
or other application using the libvirt API.
-->
<pool type='dir'>
<name>default</name>
<uuid>3174232f-3d63-3167-aa25-3949671bf4c2</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
</source>
<target>
<path>/var/lib/libvirt/images</path>
<permissions>
<mode>0700</mode>
<owner>4294967295</owner>
<group>4294967295</group>
</permissions>
</target>
</pool>
These are the versions of the packages I'm using:
libvirt-bin: 0.9.12-11 (Architecture: i386)
virt-manager: 0.9.1-4 (Architecture: all)
Thanks in advance for your reply.
Regards,
Daniel
--
Daniel Bareiro - GNU/Linux registered user #188.598
Proudly running Debian GNU/Linux with uptime:
21:50:39 up 17 days, 8:14, 12 users, load average: 0.00, 0.04, 0.00
11 years, 6 months
[libvirt-users] libvirt_lxc and sysfs
by pr.G
Hello.
Is it possible to start container via libvirt_lxc without mounting /sys
inside container?
When I start container via lxc-start and do not add mount point to config,
then /sys inside container is empty.
When I do it via virsh -c lxc:// container.xml, then
/sys contains sysfs of the host and /sys on host becomes remounting read-only.
Am I doing something wrong or is this feature of libvirt_lxc?
Thanks.
root@host:~# uname -a
Linux host 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux
root@host:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 7.0 (wheezy)"
...
root@host:~# dpkg -l | grep libvirt
ii libvirt-bin 0.9.12-11 amd64 programs for the libvirt library
ii libvirt0 0.9.12-11 amd64 library for interfacing with different virtualization systems
container.xml:
<domain type='lxc'>
<name>ns1</name>
<memory>524288</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/var/lxc/ns1/rootfs'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='52:54:00:de:74:06'/>
</interface>
<console type='pty' />
</devices>
</domain>
11 years, 6 months
[libvirt-users] transient domains with saved state of persistent doamin
by Alexandr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good day, i writing testing system and want to use libvirt for it, now i
reading libvirt development guide and found info about transient domains
which looks like what i need, but it's still unclear for me if it
possible to implement what i want using libvirt.
my idea is to make persistent domain, prepare it for testing (install
os, needed software, drivers, e.t.c.), save it's state when system are
running (for quick start later) and after this use this saved state with
new transient domain which use new hard drive image with backing store
instead of snapshot (qcow2 allow this)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRtMPuAAoJEH3ap8veG8EH6B4IAKpRbXjphIYEhD5achPTyu/T
vIN7SPV1NaYhZpdwmQmspcOLXgawHuCP2gMYgJkXhH+/p1d/MXQXXWX77a/8WS9t
Lajuin3yG9F1Bq/1EoCNFZtARMtWvimAXeq4KMUKeNrVqrU+WPZ5/a0m6kN7xAOe
wErFMnvpiefIysOb3Z0WWvwMuyPfjzZKehkYM03NyVec/1K//jXzNNvjBFUylvXX
Sz5EcNGr6/SN23uS218GVPJzb+uM6ZlmIvxsxs30+AWK+r8DW/9imvhTXqnbLiJV
TaTAwMekCwqs0xqRf9yk8mTI6dXt5nfnMAAUpMcinaIGMn9/oZFpDq0K2L6C5L8=
=bWmZ
-----END PGP SIGNATURE-----
11 years, 6 months
[libvirt-users] Setting RBD cache parameters for libvirt+qemu
by John Nielsen
I am running some qemu-kvm virtual machines via libvirt using Ceph RBD as the back-end storage. Today I was testing an update to libvirt-1.0.6 on one of my hosts and discovered that it includes this change:
[libvirt] [PATCH] Forbid use of ':' in RBD pool names
...People are known to be abusing the lack of escaping in current libvirt to pass arbitrary args to QEMU.
I am one of those people--I have been storing colon-separated arguments in my disk source 'name' attribute to control the RBD cache settings on a per-volume basis. Under libvirt-1.0.6 such VM's refuse to start:
error: Failed to start domain foo
error: unsupported configuration: ':' not allowed in RBD source volume name 'mypool/foo:rbd_cache_size=268435456:rbd_cache_max_dirty=134217728:rbd_cache_target_dirty=33554432:rbd_cache_max_dirty_age=5'
So my question is how do I control the cache settings now?
Thanks,
JN
11 years, 6 months