guest failed to start: Failure in libvirt_lxc startup: Failed to bind mount directory /.oldroot/bootflash/a1 to /bootflash/a1: No such file o - libvirt

I am using Linux Linux with libvirt 5.5.0
I have two volumes to be mounted in guest one from usb(in ext4) and one from bootflash(in ext2)
Snippets from my XML looks like this
<emulator>/usr/sbin/libvirt_lxc</emulator>
<filesystem type="mount">
<source dir="/vol/usb1/c1/rootfs_mnt"/>
<target dir="/"/>
</filesystem>
<filesystem type="mount">
<source dir="/bootflash/a1"/>
<target dir="/bootflash/a1"/>
</filesystem>
virsh -c lxc:/// start try
error: Failed to start domain try
error: internal error: guest failed to start: Failure in libvirt_lxc startup: Failed to bind mount directory /.oldroot/bootflash/a1 to /bootflash/a1: No such file o
Could someone pls help me here?

Related

Error creating libvirt KVM domain: invalid argument: could not get preferred machine for /usr/libexec/qemu-kvm type=kvm

I'm trying to create the following domain on a host running oVirt Node in nested virtualization (it won't be nested forever, just for now):
<domain type="kvm">
<name>clara</name>
<memory unit="MiB">4096</memory>
<vcpu>2</vcpu>
<os>
<type>hvm</type>
<boot dev="hd"></boot>
</os>
<features>
<pae></pae>
<acpi></acpi>
<apic></apic>
</features>
<cpu></cpu>
<devices>
<disk type="volume" device="disk">
<driver name="qemu" type="qcow2"></driver>
<source pool="default" volume="clara-rootfs"></source>
<target dev="vda" bus="scsi"></target>
<wwn>05abcd62857fe8f1</wwn>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"></driver>
<source file="/var/lib/libvirt/images/cloudinit.clara.iso"></source>
<target dev="hdd" bus="ide"></target>
</disk>
<controller type="scsi" model="virtio-scsi"></controller>
<interface type="bridge">
<mac address="E2:F5:2A:A9:4A:42"></mac>
<source bridge="bridge0"></source>
<model type="virtio"></model>
</interface>
<channel type="unix">
<target type="virtio" name="org.qemu.guest_agent.0"></target>
</channel>
<graphics type="spice" autoport="yes"></graphics>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
</rng>
</devices>
</domain>
When I do, I get this error:
# virsh define clara.xml
error: Failed to define domain from clara.xml
error: invalid argument: could not get preferred machine for /usr/libexec/qemu-kvm type=kvm
What does this error mean, and how do I fix it?
Figured it out. This error happened because of a combination of two problems:
The machine type was not specified in <type>hvm</type>, and an error happened when trying to discover the "preferred" default value. Setting the arch and machine fields revealed the real problem:
kvm is not available in my setup because the host is running in nested virtualization. Changing <domain type="kvm"> to <domain type="qemu"> made it work.

How do I reference environment variables in Wildfly's standalone.xml config file?

I'm using Wildfly 11 on Mac OS X. In my ~/.profile file, I defined a couple of environment variables, which I can see on my console ...
localhost:bin davea$ echo $DB_USERNAME
user1
localhost:bin davea$ echo $DB_PASSWORD
pwd1
In my $WILDFLY_HOME/standalone/configuration/standalone.xml file, I attempt to reference these variables ...
<datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/my_db?serverTimezone=CST&autoReconnect=true&useSSL=false</connection-url>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>${env.DB_USERNAME}</user-name>
<password>${env.DB_PASSWORD}</password>
</security>
but when I start my Wildfly instance, I get this error ...
14:35:16,817 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path '/opt/wildfly-10.0.0.CR2/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
14:35:16,846 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "MySqlDS")
]) - failure description: "WFLYCTL0211: Cannot resolve expression '${env.DB_USERNAME}'"
14:35:16,855 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0012: Started server default-server.
What's the right way to reference environment variables in Wildfly?
There are two ways to refer to environment variables in your Wildfly configuration and I think the second option will resolve your issue.
You can export the variable and pass it at command line while starting wildfly server.
$ export LOGPATH=/home/jboss/log
$ ./standalone.sh -DlogPath=LOGPATH
<appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
<param name="File" value="${logPath}/server.log"/>
. . . .
</appender>
Another way is to directly access them using env. prefix.
<appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
<param name="File" value="${env.LOGPATH}/server.log"/>
. . . .
</appender>
Please note you will need to edit the following file "$WILDFLY_HOME/bin/jboss-cli.xml" and will need to set the following property to "true" (by default that is false)
<!-- whether to resolve system properties specified as command argument or operation parameter values
in the CLI VM before sending the operation requests to the controller -->
<resolve-parameter-values>true</resolve-parameter-values>
Try adding these properties to your standalone.xml file.
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
</subsystem>
The following worked for me on Fedora:
In ~/.bashrc added line with export DB_USERNAME=user1
An alternative could be to specify a properties file when you launch wildfly.
./standalone.sh --properties=mypropertiesfile.properties
But then you have to remove env from standalone.xml: ${DB_USERNAME}

Oozie 4.3.0 build failed on Hadoop 2.9.0

I ran the build with commands like this:
./mkdistro.sh -DskipTests
and this:
./mkdistro.sh -DskipTests -D hadoop.version=2.3.0 -P uber -P hadoop-2
But all failed with error messages:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[31,49] error: cannot find symbol
[ERROR] package org.apache.hadoop.yarn.api.protocolrecords
/root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[70,21] error: cannot find symbol
[ERROR] class LauncherMainHadoopUtils
/root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[71,11] error: cannot find symbol
[INFO] 3 errors
...
I also tried to export HADOOP_CLASSPATH and CLASSPATH variables to point to the Hadoop libraries but all failed with same error. I am not sure if it is failed because the build command can't find hadoop libraries or it does not support Hadoop version 2.9.0.
Any idea?
watch it my newly created blog to install oozie-4.3.0 on combination of hadoop-2.9.0 step by step,
Installing apache oozie-4.3.0 on existing apache hadoop-2.9.0
hope this will help you.

Android: requires unavailable shared library com.google.android.maps; failing

First of all, I set the Project Build Target in project\properties\android.
I created AVD with Level 7 and 8 with Google APIs, set each AVD only the SD card size 4Gb, set the min version of SDK to 7 the target SDK to 8 in Manifest file. Without success.
I delete all AVD and recreate those.
After I reinstall Eclipse Rcp, Installed ADT in Eclipse, and Installed Android SDK, and create AVDs again.
My GPS application is worked fine without Google APIs, in the earlier version I currently implemented a view for display tracklog on MapView my app does not work.
The DDMS did not show never the eclipse.
How can I resolve this error?
[2012-03-26 09:27:50 - GPS] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2012-03-26 09:27:50 - GPS] Please check logcat output for more details.
[2012-03-26 09:27:51 - GPS] Launch canceled!
Here is the LogCat error log:
03-26 07:26:22.220: E/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
03-26 07:26:22.220: E/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
03-26 07:26:22.220: E/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
03-26 07:26:22.220: E/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
03-26 07:27:03.399: E/BatteryService(66): usbOnlinePath not found
03-26 07:27:03.399: E/BatteryService(66): batteryVoltagePath not found
03-26 07:27:03.399: E/BatteryService(66): batteryTemperaturePath not found
03-26 07:27:03.420: E/SurfaceFlinger(66): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
03-26 07:27:27.730: E/EventHub(66): could not get driver version for /dev/input/mouse0, Not a typewriter
03-26 07:27:27.730: E/EventHub(66): could not get driver version for /dev/input/mice, Not a typewriter
03-26 07:27:28.440: E/System(66): Failure starting core service
03-26 07:27:28.440: E/System(66): java.lang.SecurityException
03-26 07:27:28.440: E/System(66): at android.os.BinderProxy.transact(Native Method)
03-26 07:27:28.440: E/System(66): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
03-26 07:27:28.440: E/System(66): at android.os.ServiceManager.addService(ServiceManager.java:72)
03-26 07:27:28.440: E/System(66): at com.android.server.ServerThread.run(SystemServer.java:176)
03-26 07:27:28.440: E/AndroidRuntime(66): Crash logging skipped, no checkin service
03-26 07:27:39.779: E/ActivityThread(120): Failed to find provider info for android.server.checkin
03-26 07:27:41.341: E/ActivityThread(120): Failed to find provider info for android.server.checkin
03-26 07:27:41.530: E/ActivityThread(120): Failed to find provider info for android.server.checkin
03-26 07:27:42.060: E/ActivityThread(120): Failed to find provider info for android.server.checkin
03-26 07:27:42.140: E/ActivityThread(120): Failed to find provider info for android.server.checkin
03-26 07:27:49.890: E/PackageManager(66): Package com.lkv.mobile.apps.gps requires unavailable shared library com.google.android.maps; failing!
03-26 07:27:50.331: E/AndroidRuntime(163): ERROR: thread attach failed
Check your Manifest.xml. In my case there was:
<uses-library android:name="com.google.android.maps" />
which I had to remove.
On a real device to fix the fixing missing shared library, on some roms the comp.google.android.map is not present.
download googleapps
extract two files
system/etc/permissions/com.google.android.maps.xml
system/framework/com.google.android.maps.jar
remount the /system filesystem rw (mount -o rw,remount /system)
copy the files in
do a chmod 644 on them
reboot
All credits to #Nys
mine WORKED on emulator in debug when I move uses-library tag out from "application" element.
uses-library android:name=com.google.android.maps
In release mode its asking to be inside "application", dont know why.
Simply there is a two way
If your project using Google Maps in your project, your test device (or virtual machine) need to google play services installed ( If virtual machine, you can install it via https://opengapps.org/ )
If your project not using it, just remove <uses-library android:name="com.google.android.maps" /> from AndroidManifes.xml

How do I configure CI hudson with PHPunit and how do I run phpunit using hudson?

I am getting following error mentioned below. Help is much needed for this...
kindly go through the errors.
Started by an SCM change
Updating https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src
U sites\all\modules\print\print_pdf\print_pdf.pages.inc
At revision 1134
[workspace] $ sh -xe C:\WINDOWS\TEMP\hudson6292587174545072503.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson\.hudson\jobs\TSG\workspace"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:149)
at hudson.Proc$LocalProc.<init>(Proc.java:121)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:636)
at hudson.Launcher$ProcStarter.start(Launcher.java:271)
at hudson.Launcher$ProcStarter.join(Launcher.java:278)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.build(Build.java:174)
at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
at hudson.model.Run.run(Run.java:1244)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 17 more
Publishing Javadoc
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure
[xUnit] Starting to record.
[xUnit] [PHPUnit] - Use the embedded style sheet.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson\.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'PHPUnit'?
[xUnit] Stopping recording.
Finished: FAILURE
It looks like you are using the "Execute shell" build step on a windows system instead of the "Execute Windows batch command" build step. Windows doesn't normally have 'sh', so the former won't work.
Looks like you have a couple of problems:
FATAL: command execution failed java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson.hudson\jobs\TSG\workspace"):
The user that's running the Hudson job doesn't have the "sh" command in its path, so it can't run shell scripts. Adding /bin to the $PATH of the Hudson user should fix this.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'.
This is probably a result of the previous error; the build just didn't get far enough to run the PHPUnit tests.
'sh' is for linux implementations. Both '.exe' and 'bat' files are used in windows. Are you trying to setup and run Hudson on windows or linux?