Ok I have 2 KVM servers: server_1 and server_2.
server_1 is in production and can not talk to server_2, server_2 is in my test environment getting ready for production.
From server_1 I have copies 2 cloned VM's (I can't put the running ones off now) and moved them to server_2.
On server_2 using the gui interface I select Import existing disk image > Storage path: /home/vmpools/example.img, OS type: Linux, Version: CentOS 7.0 > RAM: 1024, CPU's 1 > Name: example and leave the rest default
Upon finish I get the following error:
Unable to complete install: 'internal error: process exited while connecting to monitor: 2016-08-18T09:29:23.423006Z qemu-kvm: -drive file=/home/vmpools/SureCollectGateway.img,if=none,id=drive-virtio-disk0,format=qed: could not open disk image /home/vmpools/SureCollectGateway.img: Driver 'qed' is not whitelisted
'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2277, in _do_async_install
guest.start_install(meter=meter)
File "/usr/share/virt-manager/virtinst/guest.py", line 501, in start_install
noboot)
File "/usr/share/virt-manager/virtinst/guest.py", line 416, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3606, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: 2016-08-18T09:29:23.423006Z qemu-kvm: -drive file=/home/vmpools/SureCollectGateway.img,if=none,id=drive-virtio-disk0,format=qed: could not open disk image /home/vmpools/SureCollectGateway.img: Driver 'qed' is not whitelisted
However I can create new VM's from ISO's.
How would I go about white listing qed or what am I missing to make this work?
CentOS dose not supprt the qed disk format, use qcow2 instead.
https://bugs.centos.org/view.php?id=8986
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.0_Release_Notes/Known-Issues-Virtualization.html
qemu-kvm component, BZ#731570
The QEMU Enhanced Disk format (QED) for KVM guest virtual machines is not supported in Red Hat Enterprise Linux 7. Use the qcow2 image
format instead.
Related
I am trying to build with Koji a disk image for CentOS7 that supports both BIOS and UEFI. My problem is that while the following partitioning works during the build (even if it does not work when booting on a UEFI node):
# Partition clearing information
clearpart --all --disklabel gpt
# Disk partitioning information
part / --fstype="xfs" --size=1 --grow --asprimary
part biosboot --fstype=biosboot --size=1
# This is how upstream centos does it
part /boot/efi --fstype=vfat --grow --maxsize=200 --size=20
# Both UEFI AND BIOS cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
The following doesn't, and all my partitioning changes end up with the bottom error.
# Disk partitioning information
part / --fstype="xfs" --ondisk=vda --size=3000 --mkfsoptions="-n ftype=1"
part biosboot --fstype=biosboot --size=1
# This is how upstream centos does it
part /boot/efi --fstype=vfat --grow --maxsize=200 --size=20
Error when building fails
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/imgfac/Builder.py", line 132, in _build_image_from_template
self.os_plugin.create_base_image(self, template, parameters)
File "/usr/lib/python2.7/site-packages/imagefactory_plugins/TinMan/TinMan.py", line 346, in create_base_image
libvirt_xml = self.guest.install(self.app_config["timeout"])
File "/usr/lib/python2.7/site-packages/oz/RedHat.py", line 703, in install
self.virtio_channel_name)
File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 1576, in _do_install
self._wait_for_install_finish(xml, timeout)
File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 827, in _wait_for_install_finish
raise oz.OzException.OzException("Timed out waiting for install to finish. %s" % (screenshot_text))
OzException: Timed out waiting for install to finish. Check screenshot at /var/builder/builder/tasks/2080/1692080/oz_screenshots/factory-build-51bd5b7d-4463-4bf9-9069-2f4b109a0165-1580480811.51.ppm for more detail
Is there any way I can check where it acutally times out? Any debugging with Koji? How would I test this ppm screenshot?
Background: I am trying to install the cling c++ interpreter here. I am on a Windows and have had Anaconda running well, Jupyter notebook also working fine with the existing Python kernels. The installation process was smooth on the surface but there is Kernel error once I try to open Jupyter notebook on the installed Kernel.
(In the end I would hope to be able to use c++ with Jupyter notebook so if anyone has had any success please could you share your experience. On that, while the xeus-cling is not usable for Windows as many say, this cling appears to be a separate thing)
The installation: Here is what I have done:
Download the binary cling_2019-11-28_arm64.tar.bz2 (is this correct for Windows?) from
https://root.cern.ch/download/cling/
Extract and place in Program Files folder
Following the instruction in here, add C:\Program Files\cling_2019-11-28_arm64\bin to the PATH variable
Activate base Anaconda environment
cd .../share/cling/Jupyter/kernel
pip install -e .
jupyter-kernelspec install --user cling-cpp11
Every thing seems to be fine up to here, no warning/error.
The error: Then I load up my Jupyter notebook and try to run the cpp11 kernel, but it is unable to start with a long error traceback, the first/last items of which read:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 736, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 73, in post
type=mtype))
... (omitted) ...
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 138, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
And on the cmd the following:
[E 14:39:14.265 NotebookApp] Failed to run command:
['jupyter-cling-kernel', '-f', 'path\\to\\jupyter\\runtime\\kernel-..(random string here)..json', '--std=c++11']
The troubleshooting (1): ... appearing to suggest that it is unable to locate a jupyter-cling-kernel. But I do have file named jupyter-cling-kernel in the .../Anaconda3/Scripts folder, and this folder is also in my PATH variable. After opening it, I discovered it is a python file with only a few lines. Looks like it corresponds to the command above.
#!C:\ProgramData\Anaconda3\python.exe
# EASY-INSTALL-DEV-SCRIPT: 'clingkernel==0.0.2','jupyter-cling-kernel'
__requires__ = 'clingkernel==0.0.2'
__import__('pkg_resources').require('clingkernel==0.0.2')
__file__ = 'C:\\Program Files\\cling_2019-11-28_arm64\\share\\cling\\Jupyter\\kernel\\scripts\\jupyter-cling-kernel'
with open(__file__) as f:
exec(compile(f.read(), __file__, 'exec'))
so then I modified my kernel.json file, adding the absolute python path (so that it knows to run it with python) and the absolute path of the jupyter-cling-kernel. (originally it was just "argv:["jupyter-cling-kernel", "-f", ...)
{
"display_name": "C++11",
"argv": [
**"C:\\ProgramData\\Anaconda3\\python.exe",
"C:\\ProgramData\\Anaconda3\\Scripts\\jupyter-cling-kernel",**
"-f",
"{connection_file}",
"--std=c++11"
],
"language": "C++"
}
The troubleshooting (2):... which indeed appears to be the right direction, at least it is running sth but now another error:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\jupyter-cling-kernel", line 7, in <modu
le>
exec(compile(f.read(), __file__, 'exec'))
File "C:\Program Files\cling_2019-11-28_arm64\share\cling\Jupyter\kernel\scrip
ts\jupyter-cling-kernel", line 3, in <module>
from clingkernel import main
File "c:\program files\cling_2019-11-28_arm64\share\cling\jupyter\kernel\cling
kernel.py", line 24, in <module>
from fcntl import fcntl, F_GETFL, F_SETFL
ModuleNotFoundError: No module named 'fcntl'
Now with some googling this fcntl appears to be sth not for Windows. So at this point I am wondering have I downloaded the wrong binary or should I modify this clingkernel.py file or do I need to do some compilation myself?
Again, if any of you knows of how to get the c++ run of Jupyter (on windows), appreciate if you could share your experience. Thanks.
With Windows 10 + WSL, we can install xeus-cling for C++ on Windows
Steps includes
Enable Ubuntu on WSL
Install Miniconda
Setup Conda, Jupyter Notebook, Xeus-Cling
This cling notebook with the cpp environment can be made to run from a desktop shortcut. Steps are documented on C/C++ Jupyter Notebook using xeus-cling - Windows WSL Setup
The cling interpreter has been packaged for conda-forge.
You can simply run
conda install cling -c conda-forge
and then run cling. However, unfortunately, the Jupyter kernel is not included with that build, and the windows build has some issues with IO operations which I am currently investigating.
Maybe try restarting the kernel by pressing o(not 0) twice.
I'm tring to port Driveboardapp from kernel 3.8 to kernel 4.14.
Driveboardapp is an app written in python and designed to run a lasersaur laser cutting machine.It make use of UART1, WiFi, and GPIOs.
Developers recomend running the app into a beaglebone black board using an image based in Ubuntu 14.04 LTS with kernel 3.8
With this image I experience network stability problems and I found the more recent official beaglebone image based in debian 9.5 with kernel 4.14 much more reliable.
Unfortunately I can't get the gpio functionality to work as expected with this new OS.
This is the python code to set gpio pins:
try:
fw = file("/sys/class/gpio/export", "w")
fw.write("%d" % (71))
fw.close()
except IOError:
# probably already exported
pass
# set the gpio pin to output
# echo out > /sys/class/gpio/gpio71/direction
fw = file("/sys/class/gpio/gpio71/direction", "w")
fw.write("out")
fw.close()
# set the gpio pin high
# echo 1 > /sys/class/gpio/gpio71/value
fw = file("/sys/class/gpio/gpio71/value", "w")
fw.write("1")
fw.flush()
fw.close()
When I run the app in debian9.5 sometimes it breaks with this message:
root#beaglebone:~/driveboardapp# python backend/app.py
Traceback (most recent call last):
File "backend/app.py", line 7, in <module>
import config
File "/root/driveboardapp/backend/config.py", line 194, in <module>
fw = file("/sys/class/gpio/gpio71/direction", "w")
IOError: [Errno 2] No such file or directory: '/sys/class/gpio/gpio71/direction'
If i rerun the app it may break at the same point or it may succeed and eventually break at the next point in the code that make use of the gpio.
So far I tried to add a small sleep before the file write attempt but it still fail.
Driveboard app repo https://github.com/nortd/driveboardapp
My edits at the code so far https://github.com/luky83/driveboardapp/blob/debian9.5/backend/config.py
Thanks for any advice.
Switching to Adafruit's BeagleBone IO Python Library seems to be the way to do it:
import Adafruit_BBIO.GPIO as GPIO
GPIO.setup("P8_46", GPIO.OUT)
GPIO.output("P8_46", GPIO.HIGH)
I am trying to train fastrCNN module from CNTK library. I have made necessary changes in PARAMETERS.py file. When I ran A1_GenerateROI.py, It generated ROIs but I got following message.
Number of images in set train = 73
Processing image set 'train', image 0 of 73
wrote gt roidb to C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/train.cache_gt_roidb.pkl
Only keeping the first 100 ROIs..
wrote ss roidb to C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/train.cache_selective_search_roidb.pkl
Processing image set 'train', image 50 of 73
Number of images in set test = 18
Processing image set 'test', image 0 of 18
wrote gt roidb to C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/test.cache_gt_roidb.pkl
Only keeping the first 100 ROIs..
wrote ss roidb to C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/test.cache_selective_search_roidb.pkl
DONE.
Now when I try run A2_RunCntk.py I am gettting following error msg.
(cntk-py35) C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN>python A2_RunCntk.py
--------------------------------------------------------------
2017-05-19 09:53:31
PARAMETERS: datasetName = KYC
PARAMETERS: cntk_nrRois = 100
cntk.exe configFile=C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/fastrcnn.cntk currentDirectory=C:\local\CNTK-2-0-beta15-0-Windows-64bit-CPU-Only\cntk\Examples\Image\Detection\FastRCNN/proc/KYC_100/cntkFiles/ NumLabels=4 NumTrainROIs=100 TrainROIDim=400 TrainROILabelDim=400 NumTestROIs=100 TestROIDim=400 TestROILabelDim=400
Traceback (most recent call last):
File "A2_RunCntk.py", line 41, in <module>
pid = subprocess.Popen(cmdStr, cwd = cntkFilesDir)
File "c:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "c:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 955, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Which file is mentioned here, I am not able to figure it out and what should I do. I do not see same error when I try to run Grocery image data set.
Thanks for help in advance.
Set the path to CNTK.exe following this guide: https://learn.microsoft.com/en-us/cognitive-toolkit/Object-Detection-using-Fast-R-CNN#quick-guide
The tutorial further assumes that the folder where cntk.exe resides is in your PATH environment variable. (To add the folder to your PATH you can run the following command from a command line (assuming the folder where cntk.exe is on your machine is C:\src\CNTK\x64\Release): set PATH=C:\src\CNTK\x64\Release;%PATH%.)
Make sure that CNTK is properly installed in your environment.
Run pip list in your Python environment and check if you have CNTK module properly installed.
It should look similar to this:
pip list in Python console
For more instructions follow this: https://learn.microsoft.com/en-us/cognitive-toolkit/setup-cntk-on-your-machine
Trying to install uwsgi according to documentation. I'm getting the below error on Windows 7.
What should I do?
(uwsgi-tutorial) C:\Users\Home\Videos\uwsgi-tutorial\mysite>pip install uwsgi
Collecting uwsgi
Using cached uwsgi-2.0.11.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "c:\users\home\appdata\local\temp\pip-build-04g1m6\uwsgi\setup.py", line 3, in <module>
import uwsgiconfig as uc
File "uwsgiconfig.py", line 8, in <module>
uwsgi_os = os.uname()[0]
AttributeError: 'module' object has no attribute 'uname'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\home\appdata\local\temp\pip-build-04g1m6\uwsgi
uWSGI can be compiled on Windows only using cygwin. There is no such thing as uname in normal Windows console, but it exists inside cygwin. If you're already in cygwin console, try to run uname command, if that exists, check if os.uname() in python inside cygwin is also working.
Latest news from the front, uWSGI perfectly works on Windows 10 in bash on Ubuntu on Windows
As Linux subsystem still in beta, i'd not recommend for production usage, however this will cover all dev needs.
P.S. i know that op ask about Windows 7, however as Windows 10 and Linux subsystem come to Windows world later, i think i can leave this here.
uWSGI can be compiled on Windows using Cygwin. But unfortunately, I was getting the same message with the Cygwin.
Here I am sharing the other way to install uWSGI on windows.
Step 1: Download the stable release and extract the tar file
Step 2: Open uwsgiconfig.py and import platform then replace os.uname()[index] with platform.uname()[index]
Change
uwsgi_os = os.uname()[0]
uwsgi_os_k = re.split('[-+_]', os.uname()[2])[0]
uwsgi_os_v = os.uname()[3]
uwsgi_cpu = os.uname()[4]
To
import platform
uwsgi_os = platform.uname()[0]
uwsgi_os_k = re.split('[-+_]', platform.uname()[2])[0]
uwsgi_os_v = platform.uname()[3]
uwsgi_cpu = platform.uname()[4]
Step 3: Run python setup.py install
Note: You may need to install GCC and configure it.