<virtualport type='openvswitch'/> is NOT recognized - libvirt

In order to make my vm use the openvswitch interface I have to add the following lines to a vm xml config file:
I edit the file, anyway while the first line is corrctly saved, the second one is not. It simply disappears, so I think the virtualport tag is not recognized...but this leads to an error when I start the virtual machine.

it requires libvirt 0.10.0+ to use <virtualport type='openvswitch'/>. check your libvirt version first.

Related

Goland showing Unresolved type (Instance, in GCE library specifically), but core/tests run fine ("invalidate and restart" solution not working here)

I'm using the GCE library in Go, along with go modules.
I'm finding that, while it happily compiles and runs unit tests, it's not resolving those types (e.g. compute.Instance) in the Goland IDE. I'm using 2020.2.
I first added this dependency by hand-coding (adding "google.golang.org/api/compute/v1" to my imports, and letting the module handler load whatever it needs). It added google.golang.org/api v0.50.0 to my go.mod file.
I've tried the old "Invalidate and Restart" approach, and it didn't do anything. I have another project where a different version of that module happens to be loaded, and it works fine on that one.
I've even tried a more nuclear version (Invalidate (no restart), close project, close IDE, delete the .idea directory, and delete the contents of ~/.cache/JetBrains). Still no dice.
FWIW my go module's version is go 1.15
You can navigate to the package sources by pressing Command/CTRL+Click on the import statement (or via External Libraries menu in Project View) and find compute-gen.go file and size limit warning. The IDE behaves as expected.
As a workaround, you can invoke Help | Edit Custom Properties... and add the following line idea.max.intellisense.filesize=8500000 (depends on the original file size), restart GoLand. Please, keep in mind that the IDE can be slow when dealing with large files even if they are not open in the editor.
You can read more about the idea.properties file here.

yii2: model relations error can't find another class in ubuntu server 16.04

I have upload my YII2 project to ubuntu 16.04.
My source is no problem when run on localhost on my computer, but when I run it on the server ubuntu 16.04 with network, it has a problem.
The model source can't find another relation model
public function getLokasiAwal()
{
return $this->hasOne(KotaBandara::className(), ['id_kota' => 'lokasi_awal']);
}
and i have error
Class 'backend\models\TypeNonstaf' not found
I have found the solution, I added the following code:
use backend\models\Kotabandara;
On top in model file but, in my source in localhost,
I do not need to add that code
Can someone explain that issue??
As #rob006 pointed out, it appears that you had been working/running your app on a Windows local file system, which is case-preserving, but not case-sensitive.
When you first call upon a namespaced class directly or via the use operator, it passes this full class name as $className into yii\BaseYii\autoload::($className) (Yii2's global class autoloading handler), which in turn attempts to include the corresponding class file, if found.
So, on your Windows local machine, when you use backend\models\KotaBandara, it will find and include any file associated with the corresponding path alias in a case-insensitive manner, thus it will find any of:
#backend/models/KotaBandara.php
#backend/models/Kotabandara.php
#backend/models/kotabandara.php
#backend/models/KoTaBaNdArA.php
There can be only 1 target file with this sequence of paths/characters anyway.
However, when you migrate this code to a Ubuntu system, which is both case-preserving and case-sensitive, there is a distinct difference between KotaBandara.php and kotabandara.php and in fact both files can exist side by side, unlike on Windows.
So, you have to be precise here - on Ubuntu, use backend\models\KotaBandara will trigger the autoloader to find only the file whose path AND case matches, i.e. KotaBandara.php. If you named the file kotabandara.php, it will be found on Windows, but not on Ubuntu!

Adding interface to wildfly

By changing the management and public interface to the host name in standalone.xml , we can allow remote access to wildfly. Want to do this directly without touching the standalone xml file.
Using wildfly cli interactive mode, added the following and it works well.
/interface=localHostName/:add(inet-address= "${jboss.bind.address.management:<hostname of target box>}")
Now, i want to add the same in cli non-interactive mode using the --command/--commands option
Tried this, but getting stuck at the syntax thing,
./jboss-cli.sh --connect command="/interface=localHostName/:add(inet-address="${jboss.bind.address.management:<hostname of target box>}")"
Please let me know the correct syntax of adding an inet-address to wildfly through command option.
actually this should work:
./jboss-cli.sh -c --command="/interface=localHostName:add(inet-address=${jboss.bind.address.management:<hostname of target box>})"
but I also get an error with the variable replacement. I checked it with this command and it worked:
./jboss-cli.sh -c --command="/interface=localHostName:add(inet-address=<hostname of target box>)"
I also had a glance at the jboss-cli.xml configuration file but the resolve-parameter-values property was already set to false so I don't know why the CLI is trying to replace this property.
The question is if you really need this property. I think you won't since you are setting it to the same property as the management-interface. So passing this property at startup will change both interfaces' inet-address values. I'm also setting the address using a CLI script and also omit the property since this interface's inet-address binding won't be changed for productional setup.

PackageMaker command line option for requires restart

Im creating a build script to automate PackageMaker to install a kext, however I cant see the command line option for requires restart. Anyone know how to do it?
You need to provide the following attribute in the Distribution file of your package.
<pkg-ref ...... onConclusion="RequireRestart"> ...... </pkg-ref>
More details about that attribute :onConclusion
Optional Attribute. Specifies the action to take after the installation
has finished. Values, from lowest to highest:
None (default), RequireLogout, RequireRestart, or RequireShutdown.
The Installer takes the highest value from all enabled
packages and requires the associated action.

SQL Server Agent Adding a Parameter for a CmdExec

I want to add a parameter to a step that runs an operating system (CmdExec) in SQL Server Agent. I have searched everywhere and asked my coworkers and none of them had tried it before. I have attached a picture of the screen. I was thinking that I might be able to add the parameter (file path) after the .exe statement, but wasn't sure.
I thought the following might work:
Executable Path Parameter Path
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
This is on a production server and I didn't want to break anything if this isn't correct.
Thanks!
Yes You can use parameters, so your command would be:
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
If there is a space in the name don't forget to use quotes as specified in tip in screenshot:
"C:\My Program\MyApp.exe" "E:\App Info\Client\Config.txt"
Since You want to try it on production server, consider testing your configuration and software on test environment first. If You doubt that this will work, You can set job to execute only this single step to make sure it will work as expected.