[libvirt-users] Virtual machine removal through command line.
by Le Bris Gilles
Hi,
Until today, I hadn't found a way to cleanly remove a KVM virtual machine
through command line on CentOS 6 or 7! I had to run 'systemctl restart
libvirtd' or 'service libvirtd restart'
After several months (!!!), I found this thread:
https://github.com/pradels/vagrant-libvirt/issues/107
Now, I know how to cleanly remove a KVM virtual machine (with default file
location):
virsh destroy vm.example.com
virsh undefine vm.example.com --managed-save
/bin/rm /var/lib/libvirt/images/vm.example.com.img
/bin/rm /var/log/libvirt/qemu/vm.example.com.log
virsh vol-delete /var/lib/libvirt/images/vm.example.com.img --pool default
I don't know if the last command ('virsh vol-delete' avoiding the libvirtd
restart) is a bug or a feature but it must be documented! Only a libvirt
developer can guess something like this.
Feel free to change my instructions in any way you think it's better but at
least document this in a public place (http://wiki.libvirt.org for example).
Regards.
9 years, 9 months
[libvirt-users] LVM storage
by Boylan, Ross
Hi. I have some narrow questions and a larger one.
If I make an existinig LVM VG a storage pool, can I use some of the LV's for libvirt and some for the host? Or does the VG needed to be completely dedicated to virtualization?
Assuming mixed use is possible, is it possible to do an LVM snapshot of an LV in use for a VM? The snapshot would have to be initiated and used on the host, I assume.
How dynamic is this? If I create a new LV, is it possible to see that immediately from, e.g., virt-manager and add it as a virtual disk to a running VM? If I resize the LV, will the VM know so that, e.g., I could do an online resize of the filesystem?
My larger question is what the recommendations are for managing disks or LV's with libvirt and KVM on Linux. In particular, I'd like to be able to grow storage space as the the VM needs grow, and snapshot (in the LVM sense) some of the block devices behind filesystems for backup. Although it would be nice to grow space while the VM's are running, it's not a requirement.
Following advice on the KVM list, I have been using raw LV's as virtual disks for the VM's. The host is currently running with a large, encrypted LVM VG. It would be convenient to use it for the VM's.
9 years, 9 months
[libvirt-users] virsh list shows no vm after downgrade
by Chengyuan Li
Hi,
I was running libvirt 1.2.2 and qemu 2.0 which are from icehouse cloud
archive repo on ubuntu 12.04, "virsh list --all" showed correct instances
after launching several VMs,
Then I just downgraded libvirt to 0.9.13 and qemu to 1.0, but kept the VMs
running. However, when I run "virsh list --all" after downgrade, I can't
see any VMs. Seems that the old version libvirt 0.9.13 doesn't know the
instances created by libvirt 1.2.2.
Does anyone know how to solve this problem?
Regards,
Chengyuan.
9 years, 9 months
[libvirt-users] virsh list shows no vm after downgrade
by Chengyuan Li
Hi,
I was running libvirt 1.2.2 and qemu 2.0 which are from icehouse cloud archive repo on ubuntu 12.04, "virsh list --all" showed correct instances after launching several VMs, Then I just downgraded libvirt to 0.9.13 and qemu to 1.0, but kept the VMs running. However, when I run "virsh list --all" after downgrade, I can't see any VMs. Seems that the old version libvirt 0.9.13 doesn't know the instances created by libvirt 1.2.2.
Does anyone know how to solve this problem?
Regards,Chengyuan.
9 years, 9 months
[libvirt-users] detachFlags permissions and ownership
by Martin Polednik
Hello everyone,
I would like to ask why detachFlags doesn't change the ownership/permissions
of /dev/vfio/XX in order to be readable (possibly writable, is that
required?). Is there any way to accomplish this without custom udev rules/scripts
or is it handled only when using "managed=yes" mode for 'hostdev' type devices?
Regards,
mpolednik
9 years, 9 months
[libvirt-users] Again with same Cgroup issue :)
by mad Engineer
Hello All,
From the last couple of days i have been spamming this
mailing list with request for configuring Cgroup with libvirtd on
Centos systems.
I still can not find a permanent solution to limit host
RAM to particular value,tried creating a separate hierarchy "mykvm"
and changed in sysconfig/libvirtd after that vm's memory cgroup
reflects this.But it is not obeying "memory.limit_in_bytes" set in
"mykvm" group,i als specified it in cgrules.conf and restarted it.If i
change that in "/cgconfig/memory/mykvm/libvirt/qemu/memory.limit_in_bytes
" its working.But that is dynamic as i am not able to find a way to
mention that in "cgconfig.conf".
How can i make sub hierarchies follow what is set in parent cgroup?
eg: if change variables in "/cgconfig/memory/mykvm"
then all instances coming under "/cgconfig/memory/mykvm/libvirt/qemu/"
should follow that value..How is it possible.Can you please help
9 years, 9 months
[libvirt-users] C group hierarchy and libvirtd
by mad Engineer
On Centos 6.4 x64,with libvirt-0.10.2-18.el6.x86_64 i am trying to
set "memory.limit_in_bytes" for all qemu process.
changed "cgconfig.conf"
group mygroup{
perm {
admin {
uid = root;
gid = root;
}
task {
uid = qemu;
gid = kvm;
}
}
memory {
memory.limit_in_bytes = 61G;
}
}
and also added "CGROUP_DAEMON=memory:/mygroup" in sysconfig/libvirtd
and in cgrules.conf and then restarted services.
Now i can see created virtual machines use cgroup hierarchy
"/cgroup/memory/mygroup/libvirt/qemu/virtualmachine1/" instead of
"/cgroup/memory/libvirt/qemu/virtualmachine1/".
The issue is "memory.limit_in_bytes" set to "mygroup" is getting
applied only to libvirtd process.VM are not following
memory.limit_in_bytes set to "mygroup".
1. how can i set this globally so that all virtual machines follow
that, i dont want to create a new group for that if libvirt supports
it.
2.Is there any way i can avoid extra hierarchy and create virtual
machines memory cgroup under "/cgroup/memory/kvm/" instead of
"/cgroup/memory/mygroup/libvirt/qemu/" ?
please help me fix this issue.I have this working on ubuntu servers
where i specified "libvirt-qemu" user and VMs follow that cgroup for
memory.
Regards,
9 years, 9 months
[libvirt-users] Difficulty configuring Cgroups on redhat/centos
by mad Engineer
Hello All,
i am trying to set "memory.limit_in_bytes" for all process
created by libvirt.But i am not able to achieve this on RHEL systems
in Ubuntu servers creating memory cgroup for "libvirt-qemu" user
solves the issue.But in case of RHEL system i tried to create a group
by editing "cgconfig.conf" and then changing cgrules.conf and
restarted cgconfig and libvirtd but still virtual machines are not
following what is mentioned in config,instead they follow cgroup
libvirt/qemu/virtualmachine-name ,is there any way i can set global
cgroup values for all process rather editing each process
configuration or how can i configure libvirt to use new configuration
file and use that group instead of default libvirt/qemu/ cgroup.
/etc/cgconfig.conf
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpuacct;
memory = /cgroup/memory;
devices = /cgroup/devices;
freezer = /cgroup/freezer;
net_cls = /cgroup/net_cls;
blkio = /cgroup/blkio;
}
group kvm {
perm {
admin {
uid = root;
gid = root;
}
task {
uid = qemu;
gid = kvm;
}
}
memory {
memory.limit_in_bytes = 61G;
}
}
and this on cgrules.conf
qemu memory kvm
Thanks for your help
9 years, 9 months
[libvirt-users] Does libvirt support HyperV Server 2012?
by Pillai, Padmakumar
Hi,
I wanted to know whether libvirt-1.2.10 supports HyperV Server 2012 and/or SCVMM Server 2012.
There is a requirement for us to deploy a VHD image to the HyperV Server 2012 SP2. We are planning to do this using libvirt-1.2.10.
Thanks
Paddy
9 years, 9 months