[libvirt-users] "failed to connect to the hypervisor"
by Ken D'Ambrosio
Hi, all. Ubuntu host, attempting to get virsh working with
VirtualBox... and failing. Here's what happens:
root@foobox:~# virsh -c vbox:///session list
error: failed to connect to the hypervisor
error: internal error: unable to initialize VirtualBox driver API
------------------------------------------------------
Now, most of the docs I read about "failed to connect to the hypervisor"
have other errors that happen *before* the "failed to connect" one, that
are the root cause (e.g., unable to open socket, or bad cert, or
whatever). But that's not the case, here. And what puzzles me more is
that -- while I don't know what the output *should* look like -- to my
eye, strace seems to say that we're getting information back:
1940 read(5, "Node 1 MemTotal: 33011680 kB\nNode 1 MemFree:
32565612 kB\nNode 1 MemUsed: 446068 kB\nNode 1 Active:
57948 kB\nNode 1 Inactive: 77036 kB\nNode 1 Active(anon):
27688 kB\nNode 1 Inactive(anon): 84 kB\nNode 1 Active(file):
30260 kB\nNode 1 Inactive(file): 76952 kB\nNode 1 Unevictable:
52 kB\nNode 1
[...]
------------------------------------------------------
In my googling, I see mention of per-VM XML files that... do something.
But what they do, and how they're generated, doesn't seem clear. (E.g.,
XML mentioned here: http://libvirt.org/drvvbox.html -- it just sort of
sits there, with no context.) Is that something I need?
Thanks for any enlightenment you might be able to offer me,
-Ken
8 years, 10 months
[libvirt-users] enable aes for guest
by Parvathi
Hi,
How do I enable aes for guest VM? Host CPU supports aes (cat /proc/cpuinfo
has aes in its flags and virsh capabilities also displays aes as a
feature). When I add
<features> <aes/> </features>
to the xml file, I am unable to create the VM. It complains with the below
error:
virsh create /tmp/tmp.xml
error: Failed to create domain from /tmp/tmp.xml
error: internal error: unexpected feature aes
Best!
8 years, 10 months
[libvirt-users] selective virsh host permissions
by Jamie Fargen
As a Systems Administrator, I would like to grant permissions to a certain
VM using unix groups. In this example there is a hypervisor with VMs
A,B,C,D and there is a group called fortadmins. The solution I am searching
forI would just allow fortadmins to use libvirt/virsh commands on VM D.
Does libvirt/virsh provide any way to easily accomplish this goal?
Regards,
Jamie Ian Fargen
8 years, 10 months
[libvirt-users] virsh blockcopy without undefine
by Nathan Shearer
I have a script that performs a backup with the following steps:
virsh dumpxml --inactive "$DOMAIN" > "$TMP/${DOMAIN}.xml" && \
virsh dumpxml --inactive "$DOMAIN" > "$DESTINATION_XML" && \
virsh undefine "$DOMAIN" && \
virsh blockcopy "$DOMAIN" "$SOURCE_DISK" "$DESTINATION_DISK"
--wait --verbose --finish && \
virsh define "$TMP/${DOMAIN}.xml"
It's basic and did work for creating basic backups. Is there a way to do
this without undefining the domain? I recently had to redefine the VM
from a backup XML because this script failed during the block copy step.
Why can't I blockcopy a domain that is defined? Why does it need to be
undefined first?
8 years, 11 months
[libvirt-users] virsh can't support VM offline blockcommit
by 陈明
Hi everyone!
I use the libvirt(version: 1.2.2) and QEMU(version: 2.2.1) to test
qemu snapshot features:
I tried virsh blockcommit when VM offline, the virsh blockcommit
failed: the error messase as below:
* error: Requested operation is not valid: domain
is not running*
when I start the VM, the virsh blockcommit work fine!
my question is : we need virsh support blockcommit when
VM offline。how do?
we test qemu snapshot as follows:
we need create snapshot of the cycle,and by virsh blockcommit
merge snapshot chain,but whenVM offline, the virsh blockcommit will
fail, someone suggest me:when VM offline,may use qemu-img commit to
submit snapshot turn,but qemu-img can't modify snapshot chain backing
relation,it need
we use qemu-img rebase amend snapshot‘s backingfile,* the main
question* is when we use qemu-img rebase modify snapshot's
backingfile, if someone start the VM, it will may lead to VM filesystem
readonly。
we should how to solve the question? thanks!
8 years, 11 months
[libvirt-users] Creating external snapshots.
by Dominique Ramaekers
Hi,
I'm trying to create an external snapshot for backup purposes. Only I get an error after the command:
virsh snapshot-create-as --domain PCVIRT1 PCVIRT1-SN1 --diskspec vda,file=/var/lib/libvirt/images/VIRT1-SN1.qcow2 --disk-only --atomic --quiesce
fout: internal error: kan AppArmor profiel 'libvirt-2c9c04d7-f86d-df12-da9f-9847ac8b994f' niet vernieuwen
(Sorry about the dutch... it means: error: internal error: can not renew AppArmor profile 'libvirt-....')
I can't find anything about this error... Anybody got an idea how to resolve this problem?
Greetings,
Dominique.
8 years, 11 months
[libvirt-users] virsh can't support VM offline blockcommit
by 陈明
Hi everyone!
I use the libvirt(version: 1.2.2) and QEMU(version: 2.2.1) to test
qemu snapshot features:
I tried virsh blockcommit when VM offline, the virsh blockcommit
failed: the error messase as below:
* error: Requested operation is not valid: domain
is not running*
when I start the VM, the virsh blockcommit work fine!
my question is : we need virsh support blockcommit when
VM offline。how do?
we test qemu snapshot as follows:
we need create snapshot of the cycle,and by virsh blockcommit
merge snapshot chain,but whenVM offline, the virsh blockcommit will
fail, someone suggest me:when VM offline,may use qemu-img commit to
submit snapshot turn,but qemu-img can't modify snapshot chain backing
relation,it need
we use qemu-img rebase amend snapshot‘s backingfile,* the main
question* is when we use qemu-img rebase modify snapshot's
backingfile, if someone start the VM, it will may lead to VM filesystem
readonly。
we should how to solve the question? thanks!
8 years, 11 months
[libvirt-users] OPW 2015 application
by Ishani
Sir,
I am Ishani Chugh, a third year undergraduate student of Electronics and Communications Engineering at International Institute of Information Technology, Hyderabad. I am passionate about Open Source Development. I also have some experience working with git, I aspire to contribute to QEMU as Open source Developer under OPW and I am interested in working on the project 'Enhancing libvirt-designer', since I feel, I have the enthusiasm and skills required. I will appreciate any assistance with regards to beginner contribution on this project.
Sincerely,
Ishani
8 years, 11 months
[libvirt-users] virsh can't support VM offline blockcommit
by justlibvirt
Hi everyone!
I use the libvirt(version: 1.2.2) and QEMU(version: 2.2.1) to test qemu snapshot features:
I tried virsh blockcommit when VM offline, the virsh blockcommit failed: the error messase as below:
error: Requested operation is not valid: domain is not running
when I start the VM, the virsh blockcommit work fine!
my question is : we need virsh support blockcommit when VM offline。how do?
we test qemu snapshot as follows:
we need create snapshot of the cycle,and by virsh blockcommit merge snapshot chain,but whenVM offline, the virsh blockcommit will fail, someone suggest me:when VM offline,may use qemu-img commit to submit snapshot turn,but qemu-img can't modify snapshot chain backing relation,it need we use qemu-img rebase amend snapshot‘s backingfile, the main question is when we use qemu-img rebase modify snapshot's backingfile, if someone start the VM, it will may lead to VM filesystem readonly。
we shoule solve the question? thanks!
8 years, 11 months
[libvirt-users] qemu:///session and network-mounted home directories
by Spencer Baugh
Dear libvirt-users,
Suppose my home directory is network mounted on to several different
machines. And suppose I defined some VMs in qemu:///session. The
configuration files and disk images for qemu:///session are stored in my
home directory.
Now suppose I log in to some machine and use virsh. The qemu:///session
VMs that are marked autostart are started. Now if I log into another
machine and use virsh, it will presumably try to start my autostart VMs
again, since the same configuration is present in both homedirs.
Is there anything libvirt does that might prevent it from starting the
same VM multiple times on different machines? Or might allow
machine-specific autostart configuration? Maybe something could be done
with /etc/machine-id!
In terms of qemu:///system, this is like having /var/lib/libvirt/images/
live on a network-mounted filesystem (fairly normal I assume) and also
having /etc/libvirt/qemu live on a network-mounted filesystem (not as
normal). Not sure how you would deal with the issue there either but I
can see why you might want to have your same VM configuration available
on all hosts, so it would be cool to figure out that problem as
well.
The answer may be the VM configuration is host-specific, so sharing VM
configuration between hosts is not a good idea. In that case, any other
recommendations on how to deal with the networked homedir case?
Thanks!
8 years, 11 months