[libvirt-users] oddity with lxc-enter-namespace
by Thierry Parmentelat
Hi folks
I have a question about lxc-enter-namespace
I am migrating lxc containers from a host running libvirt-1.2.5 on f20 to another one running libvirt-1.2.9 on f21
and now I can't seem to use lxc-enter-namespace for entering in a container any more
I would do
virsh -c lxc:/// lxc-enter-namespace --noseclabel container /bin/bash
but when I try the same now I am getting this:
# virsh -c lxc:/// lxc-enter-namespace --noseclabel nagios /bin/bash
setlocale: No such file or directory
libvirt: error : Expected at least one file descriptor
error: internal error: Child process (137198) unexpected exit status 125
I tried to google that but nothing too relevant showed up..
are there known regressions to lxc-enter-namespace, or what else do I seem to do wrong here?
thanks
9 years, 7 months
[libvirt-users] One issue for help, Thanks
by Guozhonghua
Hi, All
As we execute the virsh command and get the return code in my shell script, the code is 141.
virsh blockcommit $VM_NAME --path $vm_data_file --base $backing_file --wait
rtn_code=$?
We get the return code with 141 in script accidentally.
And most time we get the code with zero or one.
We don't know the reason that the command "virsh blockcommit" return with 141(May be 128 + 13(SIGPIPE)).
We refer to http://unix.stackexchange.com/questions/99112/default-exit-code-when-proc....
Can we change some code of libvirt to avoid the 141 code?
Thanks.
-------------------------------------------------------------------------------------------------------------------------------------
????????????????????????????????????????
????????????????????????????????????????
????????????????????????????????????????
???
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
9 years, 7 months
[libvirt-users] Update on-disk XML after virsh snapshot-create-as
by Andrew Martin
Hello,
I am using "virsh snapshot-create-as" to create external snapshots of running
VMs using libvirt 1.0.2 on Ubuntu 12.04 and libvirt 1.2.2 on Ubuntu 14.04. This
works well for creating the snapshots, but I notice that the on-disk XML file
in /etc/libvirt/qemu is not updated with the new disk image file after the
snapshot is created. This appears to be very similar to
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1403841, but occurs on
both 12.04 and 14.04 so I am not sure it is the same bug.
This presents a problem if the virtual machine host is suddenly powered off
since a subsequent boot will find the VM using an older image file to boot
rather than the most recent snapshot. Is it safe for me to use an external
wrapper script that does the following to ensure the on-disk XML is up-to-date:
virsh snapshot-create-as ....
virsh dumpxml > /etc/libvirt/qemu/<domain>.xml
Is it safe for me to overwrite the contents of /etc/libvirt/qemu/<domain>.xml
manually while the VM is running?
Thanks,
Andrew Martin
9 years, 7 months
[libvirt-users] How to burn a CD using libvirt?
by Steve Ross
Hi,
My first e-mail... my apologies if this is not the appropriate e-mail list.
My goal is to *write* from the guest OS to a CD or DVD reader/writer on
my host system. Currently, the write operation is failing. I believe
it is because the virtual CD-ROM device is set to be "readonly". Is it
possible to write to a QEMU CDROM device and, if so, how? (The host
machine's CD-ROM drive does support writing/burning.)
I'm using the "virt-manager" GUI to start the virtual machine. Once
started, the "qemu" command line from my virtual machine process
includes the following, where the host's built-in CD reader/writer is
"/dev/sr0".
/usr/bin/qemu-system-x86_64 ... -drive
file=/dev/sr0,if=none,id=drive-ide0-0-1,readonly=on,format=raw
This obviously says that the device is "readonly".
A snippet of XML from my virtual machine from the CDROM is:
<domain type='kvm'>
...
<devices>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sr0'/>
<target dev='hdb' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
I've tried removing the <readonly/> tag from the above VM definition,
and then running the VM, but the tag magically reappears in the VM
definition when it runs.
Also, the "virt-manager" GUI shows the CDROM device as having the option
of "Readonly" being checked (and the GUI does not allow me to uncheck it.)
Other details:
* qemu version 2.1.3 on Fedora 21.
* libvirt version 1.2.0.2
Thanks for any help or pointers you can provide,
-- Steve
9 years, 7 months
[libvirt-users] XML Parser failing due to cryptic Serial Number.
by Roz Fx
I set virt-manager in qemu:///system space and tried to add new VM but it didn't proceed. Found out serial in crypic form.
# cat /sys/devices/virtual/dmi/id/product_serial
ÿÿÿÿÿÿÿ
#virt-manager --debugTraceback (most recent call last):
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 225, in _reparse_xml
self._xmlobj = self._build_xmlobj(self._get_raw_xml())
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 228, in _build_xmlobj
return self._parseclass(self.conn.get_backend(), parsexml=xml)
File "/usr/share/virt-manager/virtManager/nodedev.py", line 27, in _parse_convert
return NodeDevice.parse(conn, parsexml)
File "/usr/share/virt-manager/virtinst/nodedev.py", line 95, in parse
tmpdev = NodeDevice(conn, parsexml=xml, allow_node_instantiate=True)
File "/usr/share/virt-manager/virtinst/nodedev.py", line 106, in __init__
XMLBuilder.__init__(self, *args, **kwargs)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 777, in __init__
parent_xpath, relative_object_xpath)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 679, in __init__
self._parse(parsexml, parsexmlnode)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 692, in _parse
doc = libxml2.parseDoc(xml)
File "/usr/lib/python2.7/site-packages/libxml2.py", line 1327, in parseDoc
if ret is None:raise parserError('xmlParseDoc() failed')
libxml2.parserError: xmlParseDoc() failed
[Sun, 12 Apr 2015 06:06:16 virt-manager 4241] DEBUG (create:165) Showing new vm wizard
[Sun, 12 Apr 2015 06:06:16 virt-manager 4241] DEBUG (create:892) Guest type set to os_type=hvm, arch=x86_64, dom_type=kvm
[Sun, 12 Apr 2015 06:06:16 virt-manager 4241] DEBUG (xmlbuilder:694) Error parsing xml=
<device>
<name>computer</name>
<capability type='system'>
<product>Vostro</product>
<hardware>
<vendor>Dell Inc.</vendor>
<version>A10</version>
<serial>ÿÿÿÿÿÿÿ</serial>
<uuid>REMOVED</uuid>
</hardware>
<firmware>
<vendor>Dell Inc.</vendor>
<version>A10</version>
<release_date>05/18/2013</release_date>
</firmware>
</capability>
</device>
[Sun, 12 Apr 2015 06:06:16 virt-manager 4241] ERROR (create:346) Error setting create wizard conn state.
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 344, in reset_state
self.set_conn(activeconn, force_validate=True)
File "/usr/share/virt-manager/virtManager/create.py", line 225, in set_conn
self.set_conn_state()
File "/usr/share/virt-manager/virtManager/create.py", line 626, in set_conn_state
self.netlist.reset_state()
File "/usr/share/virt-manager/virtManager/netlist.py", line 405, in reset_state
self._populate_network_list()
File "/usr/share/virt-manager/virtManager/netlist.py", line 253, in _populate_network_list
vnet_bridges)
File "/usr/share/virt-manager/virtManager/netlist.py", line 185, in _find_physical_devices
for nodedev in self.conn.get_nodedevs("net"):
File "/usr/share/virt-manager/virtManager/connection.py", line 648, in get_nodedevs
xmlobj = dev.get_xmlobj()
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 160, in get_xmlobj
self._reparse_xml()
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 225, in _reparse_xml
self._xmlobj = self._build_xmlobj(self._get_raw_xml())
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 228, in _build_xmlobj
return self._parseclass(self.conn.get_backend(), parsexml=xml)
File "/usr/share/virt-manager/virtManager/nodedev.py", line 27, in _parse_convert
return NodeDevice.parse(conn, parsexml)
File "/usr/share/virt-manager/virtinst/nodedev.py", line 95, in parse
tmpdev = NodeDevice(conn, parsexml=xml, allow_node_instantiate=True)
File "/usr/share/virt-manager/virtinst/nodedev.py", line 106, in __init__
XMLBuilder.__init__(self, *args, **kwargs)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 777, in __init__
parent_xpath, relative_object_xpath)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 679, in __init__
self._parse(parsexml, parsexmlnode)
File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 692, in _parse
doc = libxml2.parseDoc(xml)
File "/usr/lib/python2.7/site-packages/libxml2.py", line 1327, in parseDoc
if ret is None:raise parserError('xmlParseDoc() failed')
parserError: xmlParseDoc() failed
Any help will appreciate.
RegardsRox
9 years, 7 months
[libvirt-users] libvirt vs PCI virtio
by Pavel Fedin
Hello!
I am working on vhost-net support for ARM and want to try to set up
complete configuration with irqfds. For this purpose i need to change
address type specification for this device from "virtio-mmio" to "PCI". But,
when i attempt to do so, i get error message "No PCI buses available". Can
anybody explain me what i am doing wrong ?
The most confusing part is that i use 'virt' machine which actually has
generic PCI host, and for test purposes i even set up SATA controller for my
virtual machine which perfectly appears on the emulated bus. And
specification for SATA is simply:
--- cut ---
<controller type='sata' index='0'/>
--- cut ---
without any explicit PCI location specifiers.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
9 years, 7 months
[libvirt-users] CPU Resource Reservation using KVM
by Jatin Davey
Hi All
I am new to KVM world. I have been using VMware for about a year.
In VMware world we can reserve cpu resources for a VM. Say for instance
if we need 4 vCPUs with a total of 8000 GHz then we can mention this
configuration in vCenter while creating a VM. This guarantees 8000 GHz
of cpu resources for the deployed VM.
How can i achieve the same thing using KVM ?
Please provide as much details as possible. Any pointers for reading
this would also be helpful.
Appreciate your responses in this regard.
Thanks
Jatin
9 years, 7 months