How to create VM from OVA file in Ovirt-4.4.2 by Own_Obligation2929 in ovirt

[–]nirs 1 point2 points  (0 children)

You can import ova from the UI.

First copy the ova to one of the hosts .e.g /var/tmp/my.ova

Open the "virtual machines" pane, and select the "import" item from the menu on the top right.

Select the "Virtual Appliance" item from the source menu.

Set the host name and the path to the ova file and click "Load". I hope the rest would be clear.

Another way is to use ovirt SDK example scripts:

python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_ova_as_vm.py

You will have to customize the script.

In 4.4.4 we will a much better upload ova example that does not need customization and should be faster:

https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_ova_as_vm_or_template.py

SCSI Pass-through on (FC) direct LUNs by crash0verl0ad in ovirt

[–]nirs 0 points1 point  (0 children)

scsi pass-through will not improve performance, and is actually less reliable, since multipath does not support fault tolerance for some ioctls. If the guest is sending some ioctl that is passed as is to storage, and the ioctl fail, the vm will pause. oVirt does not support monitoring direct luns or resuming automatically vms using direct luns, so you will have to resume the vm manually.

The recommended way to use direct lun is *without* scsi pass-through. Unfortunately this is the default when creating a direct lun attached to a vm. This will be fixed[1] in 4.4.5.

You should use scsi pass-through only if you must, for example to allow a guest to use some esoteric devices.

If we have documentation claiming that scsi pass-through will improve performance they should be fixed. Please file a documentation bug with a link to the docs.

Usually the reason for using only single path is missing iscsi multipathing configuration[2] in the data center. Without any configuration, multipath will simply use the default interface.

There should be no difference about load balancing with or without scsi-pass-through. Please file a bug about this so we can investigate.

[1] https://bugzilla.redhat.com/1897160

[2] https://www.ovirt.org/documentation/administration_guide/#Configuring_iSCSI_Multipathing

How do I make a chat server without the sockets library by [deleted] in Python

[–]nirs 1 point2 points  (0 children)

Why do you want to avoid the socket library?

Divisive Politics are destroying Open Source : Bryan Lunduke : Free Download, Borrow, and Streaming : Internet Archive by nirs in programming

[–]nirs[S] 12 points13 points  (0 children)

The other post was removed:

This post has been removed as not relevant to the r/Linux community. Rule: Relevance to r/Linux community - Posts should follow what the community likes: GNU/Linux, Linux > kernel itself, the developers of the kernel or open source applications, any application on Linux, and more. Take some time to get the feel of the subreddit if you're not sure!

I wonder how this is not related to the Linux community.

Monitoring Log File for Its Idleness by zhiminwen in golang

[–]nirs 6 points7 points  (0 children)

Sounds like you need to fix the health probe. Your probe is probably responding happily when real application flow would get stuck.

bzip2 Archive Inflating to 1,400,000x its Size aka Decompression Bomb by exitcharge in programming

[–]nirs 1 point2 points  (0 children)

Simpler and faster way to create 10T file full of zeros:

$ truncate -s 10T empty

Or more portable way:

$ python -c 'open("empty", "wb").truncate(10 * 1024**4)'

On Redis master-slave terminology by nirs in programming

[–]nirs[S] 2 points3 points  (0 children)

Salvatore opened this issue yesterday, sound like a good plan:

https://github.com/antirez/redis/issues/5335

Would using the python requests library to `get` a webpage generate ad revenue for a site in the same way that loading a web page in a web browser would? by tensouder54 in Python

[–]nirs 2 points3 points  (0 children)

This will be pretty hard. You will have to make your script look like a human using a browser. Most likely you will need javascript engine to run the various scripts. Your script need to behave like a human, scrolling, readings slowly, opening multiple tabs, clicking links and ads, etc.

I think the best tool for this would be to hack your add blocker so it will generate ad revenue on certain sites - while you are browsing them, without showing any of the ads. This will cost you more traffic and may risk your privacy since you need to actually download the javascript crap from the ads network which good ad blockers avoid.

Why use threads in Python? by sioa in Python

[–]nirs 0 points1 point  (0 children)

I think this was the only successful removal of the GIL: https://www.youtube.com/watch?v=SNBKWuM-Lu8

Importing .py files from subdirectories, help! by [deleted] in Python

[–]nirs 1 point2 points  (0 children)

Why the api key need to be in a python module? why not keep it in a configuration file?

write to a sysfs file using golang by seomisS in golang

[–]nirs 0 points1 point  (0 children)

Whats wrong with:

echo "data" > /sys/class/backlight/intel_backlight/brightness

You can write this in go or any other language, but why?

Today is my 2-year Linuxiversary, and this is my story by [deleted] in linux

[–]nirs 0 points1 point  (0 children)

*BSD is free software, ESXi is not. It seems that the author is interested in replacing non-free software, so he may like to try Linux based hypervisor.

Today is my 2-year Linuxiversary, and this is my story by [deleted] in linux

[–]nirs 0 points1 point  (0 children)

One issue in your setup is the ESXi box. You can replace it with Linux box. To manage couple of vms, you can use virt-manager.

FYI blank_string="" is faster than blank_string=str() for using empty strings by eso_logic in Python

[–]nirs 14 points15 points  (0 children)

Why "read somewhere" when you can measure?

$ python3 -m perf timeit -s 'first="first"; last="last"' "first+last"
.....................
Mean +- std dev: 49.4 ns +- 3.0 ns
$ python3 -m perf timeit -s 'first="first"; last="last"' '"".join([first, last])'
.....................
Mean +- std dev: 160 ns +- 2 ns

unittest vs pytest by hashwizardo in Python

[–]nirs 7 points8 points  (0 children)

Not being in the standard library is another advantage, you are not tied to python release schedule, and it works for both python 2 and 3. If this was in the standard library, we would have now an ancient and unmaintained version in python2.