Genymotion black screen (virtualbox 5.1.24) - virtualbox

Genymotion do not start and show black screen with virtualbox 5.1.24. Log messages from genymotion-player.log:
...
[Genymotion Player] [critical] [AdbReconnect] [error] `adb shell` returns 1
[Genymotion Player] [critical] [AdbReconnect] [error] `adb shell` returns 1
...

First of all this answer is for virtualbox 5.1.24 only. If you have different version than this answer is not for you.
Regression was introduced in virtualbox 5.1.24 https://www.virtualbox.org/ticket/16911
It will be fixed in next version but before you can use quick workaround.
You need to have 2 virtual devices minimum
Start first virtual device
Execute sudo ip link set dev vboxnet0 up (or ifconfig vboxnet0 up)
Start second virtual device
Second virtual device should work fine

You don't actually need w virtual machines:
Start the corresponding virtual machine in VirtualBox. You can start it headless.
In host OS, run
sudo ifconfig vboxnet0 up
Start your virtual device in Genymotion.

Related

HTCondor - Partitionable slot not working

I am following the tutorial on
Center for High Throughput Computing and Introduction to Configuration in the HTCondor website to set up a Partitionable slot. Before any configuration I run
condor_status
and get the following output.
I update the file 00-minicondor in /etc/condor/config.d by adding the following lines at the end of the file.
NUM_SLOTS = 1
NUM_SLOTS_TYPE_1 = 1
SLOT_TYPE_1 = cpus=4
SLOT_TYPE_1_PARTITIONABLE = TRUE
and reconfigure
sudo condor_reconfig
Now with
condor_status
I get this output as expected. Now, I run the following command to check everything is fine
condor_status -af Name Slotype Cpus
and find slot1#ip-172-31-54-214.ec2.internal undefined 1 instead of slot1#ip-172-31-54-214.ec2.internal Partitionable 4 61295 that is what I would expect. Moreover, when I try to summit a job that asks for more than 1 cpu it does not allocate space for it (It stays waiting forever) as it should.
I don't know if I made some mistake during the installation process or what could be happening. I would really appreciate any help!
EXTRA INFO: If it can be of any help have have installed HTCondor with the command
curl -fsSL https://get.htcondor.org | sudo /bin/bash -s – –no-dry-run
on Ubuntu 18.04 running on an old p2.xlarge instance (it has 4 cores).
UPDATE: After rebooting the whole thing it seems to be working. I can now send jobs with different CPUs requests and it will start them properly.
The only issue I would say persists is that Memory allocation is not showing properly, for example:
But in reality it is allocating enough memory for the job (in this case around 12 GB).
If I run again
condor_status -af Name Slotype Cpus
I still get something I am not supposed to
But at least it is showing the correct number of CPUs (even if it just says undefined).
What is the output of condor_q -better when the job is idle?

Can't open a serial port in g++ on Ubuntu

I am trying to run the sample programs that came with a development lidar unit (RPLIDAR A1M8 360 Degree Laser Scanner Kit). The sample code for a Linux target compiles without error using g++
(Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 however when I run it, it stops with the message 'Error, cannot bind to the specified serial port /dev/ttyUSB0'. Using gdb I can trace the code down to the serial port open call to __libc_open64 where I don't have source anymore...
__libc_open64 (file=0x5555557832a9 "/dev/ttyUSB0", oflag=2306) at ../sysdeps/unix/sysv/linux/open64.c:36}
36 ../sysdeps/unix/sysv/linux/open64.c: No such file or directory.
Here is what I tried so far to eliminate obvious failure modes:
The serial port, a USB-to-serial converter on ttyUSB0, works just fine from Putty (115200, 8, none, 1, software flow control only). I connect it to a Raspberry Pi as the console to get a large amount of data without issue and can bidirectionally interact with the console. Therefore I conclude the port and converter work fine
The section of code that calls __libc_open64 is...
bool raw_serial::open(const char * portname, uint32_t baudrate, uint32_t flags)
{
if (isOpened()) close();
serial_fd = ::open(portname, O_RDWR | O_NOCTTY | O_NDELAY);
I looked up the constants that are ORed together and hard coded the value (04403) just in case there was some issue with the version of the header files. Oddly the value is off by 1 from the oflag value in the gdb line. Compiled and ran it, no difference
I verified the call to ::open returned -1 which is treated as a failure in the code immediately after
I can see in dmesg that ttyUSB0 is open and available
I am not a c++ guy. This looks to me like an issue with the g++ __libc_open64 code but that also seems very unlikely. I don't know where to go next. Any advice would be greatly appreciated.
The first comments received pointed to permissions. I chmoded /dev/ttyUSB0 wide open before starting this exercise.
I ran strace and see the line...
openat(AT_FDCWD, "/dev/ttyUSB0", O_ACCMODE|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
Well, that's embarrassing! It returns Permission Denied! Yes, I chmoded permissions wide open, then promptly forgot that being a USB device, it goes away and gets redefined when I unplug/plug it in again. Thank you for your help!
The prediction that strace would show "Permission denied" was correct. I was forgetting this is not a fixed serial port but rather a USB-to-serial converter. Even though I chmoded the permissions and verified it use with Putty, I forgot that as soon as I rebooted, or unplugged the USB, the /dev/ttyUSB0 device goes away and is recreated again when I rebooted or plugged it in, requiring that I set the permissions again.

Virtualbox: cannot start or recover saved machine

I'm running Virtualbox 5.1.14 r112924 on a Windows 7 Professional machine. I have installed a Debian Testing guest. Several days ago I tried to save the machine, unfortunately I do not recall the exact circumstances, but I think it had to do with the guest having no network any more after the host came back from suspend-to-RAM.
Anyway, I now have a saved machine with which I cannot do anything: I cannot start it, I cannot delete the saved state, I cannnot clone it and I cannot even delete the entire machine. All these options are greyed out in the VB Manager window. Also, I don't get any errors, so I'm rather clueless what to do.
I include below parts of the most recent log file which I thought are relevant, I didn't want to paste the whole thing.
What sort of witchcraft can bring my machine back to life?
Many thanks, and best regards,
Enno
02:37:32.316550 Changing the VM state from 'RUNNING' to 'SUSPENDING'
02:37:32.319680 AIOMgr: Endpoint for file 'D:\Users\EnnoMiddelberg\VirtualBox VMs\Debian_Testing\Debian_Testing.vdi' (flags 000c0781) created successfully
02:38:32.373466 PDMR3Suspend: 60 056 883 803 ns run time
02:38:32.373494 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
02:38:32.373520 Console: Machine state changed to 'Paused'
02:38:32.373700 VMR3Suspend:
02:38:32.393131 RUNNING -> SUSPENDING, RUNNING_LS -> SUSPENDING_EXT_LS failed, because the VM state is actually SUSPENDED
02:38:32.393177 VMSetError: F:\tinderbox\win-5.1\src\VBox\VMM\VMMR3\VM.cpp(3619) int __cdecl vmR3TrySetState(struct VM *,const char *,unsigned int,...); rc=VERR_VM_INVALID_VM_STATE
02:38:32.452926 VMSetError: VMR3Suspend failed because the current VM state, SUSPENDED, was not found in the state transition table (old state RUNNING_LS)
02:38:32.501235 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Could not suspend the machine execution (VERR_VM_INVALID_VM_STATE)}, preserve=false aResultDetail=0
02:38:32.605107 Console: Machine state changed to 'Saving'
02:38:32.635604 Changing the VM state from 'SUSPENDED' to 'SAVING'
02:38:32.747945 VUSB: Detached 'HidMouse' from port 1
02:38:40.213749 SSM: Footer at 0x23d179e4 (600930788), 34 directory entries.
02:38:40.213777 VUSB: Attached 'HidMouse' to port 1
02:38:40.231560 SSM: Successfully saved the VM state to 'D:\Users\EnnoMiddelberg\VirtualBox VMs\Debian_Testing\Snapshots\2017-05-23T14-48-18-411341300Z.sav'
02:38:40.231578 Changing the VM state from 'SAVING' to 'SUSPENDED'
02:38:40.316839 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Saving, InUninit=0)
02:38:40.342613 Display::handleDisplayResize: uScreenId=0 pvVRAM=000000000c0a0000 w=1920 h=1106 bpp=32 cbLine=0x1E00 flags=0x1
02:38:40.342664 GUI: UIFrameBufferPrivate::NotifyChange: Screen=0, Origin=0x0, Size=1920x1106, Sending to async-handler
02:38:40.350656 Changing the VM state from 'SUSPENDED' to 'POWERING_OFF'
02:38:40.356473 ****************** Guest state at power off for VCpu 0 ******************
...
...
...
02:38:40.406031 ************** End of Guest state at power off ***************
02:38:41.753488 PDMR3PowerOff: Driver 'AUDIO'/0 on LUN#0 of device 'ichac97'/0 took 1 344 979 632 ns to power off
02:38:41.753791 PDMR3PowerOff: 1 347 726 353 ns run time
02:38:41.762544 Changing the VM state from 'POWERING_OFF' to 'OFF'
02:38:41.983956 Changing the VM state from 'OFF' to 'DESTROYING'
02:38:41.984097 ************************* Statistics *************************
...
...
...
02:38:41.990221 ********************* End of statistics **********************
02:38:41.997747 VUSB: Detached 'HidMouse' from port 1
02:38:42.377555 NAT: Zone(nm:mbuf_cluster, used:90)
02:38:42.378711 NAT: Zone(nm:mbuf_packet, used:90)
02:38:42.378737 NAT: Zone(nm:mbuf, used:90)
02:38:42.378763 NAT: Zone(nm:mbuf_jumbo_pagesize, used:0)
02:38:42.379768 NAT: Zone(nm:mbuf_jumbo_9k, used:0)
02:38:42.380260 NAT: Zone(nm:mbuf_jumbo_16k, used:0)
02:38:42.380639 NAT: Zone(nm:mbuf_ext_refcnt, used:0)
02:39:42.706185 GIM: KVM: Resetting MSRs
02:39:42.720224 Changing the VM state from 'DESTROYING' to 'TERMINATED'
02:39:42.723143 Console: Machine state changed to 'Saved'
02:39:42.723504 GUI: Request to close Runtime UI because VM is powered off already.
02:39:42.888614 GUI: Passing request to close Runtime UI from machine-logic to UI session.
Ok, so I got the machine back up by removing the *.sav file in the guest's "Snapshots" subdirectory. It had to sort out its file system when booting, but everything is running as it should now.
Thanks for listening, anyway...

Failed isochronous start. Error: 0x2 ;When starting reading from 2 cameras PTGrey

I have a PTGrey FL3-U3-13E4C-C USB 3 camera. I am able to read and store images for a single camera from the default code provided by PTGrey.
But when I try to run the MultipleCameraEx for testing with 2 Cameras connected, I get the Failed isochronous start Error.
I tried manually setting the number of cameras to 2 and running the code without the for loop, I still get the same error for 2 Cameras.
I get the following error.
FlyCapture2 library version: 2.10.3.266
Application build date: Apr 8 2017 17:45:42
Number of cameras detected: 2
* CAMERA INFORMATION *
Serial number - 16362359
Camera model - Flea3 FL3-U3-13E4C
Camera vendor - Point Grey Research
Sensor - E2v EV76C560 (1/1.8" Color CMOS)
Resolution - 1280x1024
Firmware version - 2.15.3.3
Firmware build time - Wed Jul 29 16:41:55 2015
* CAMERA INFORMATION *
Serial number - 16362353
Camera model - Flea3 FL3-U3-13E4C
Camera vendor - Point Grey Research
Sensor - E2v EV76C560 (1/1.8" Color CMOS)
Resolution - 1280x1024
Firmware version - 2.15.3.3
Firmware build time - Wed Jul 29 16:41:55 2015
Error Trace:
Source: IidcCameraInternal.cpp(469) Built: Oct 20 2016 20:17:21 - Error starting isochronous stream.
+-> From: Iso.cpp(2046) Built: Oct 20 2016 20:16:34 - Failed isochronous start. Error: 0x2.
If your developing under Linux, your issue might be connected to the maximum available amount of memory allocated to the USB subsystem, being too small (that was the cause of my issue!).
To use multiple cameras the usbcore variable usbfs_memory_mb should be set suitably large (e.g. 1024). In my case, even with just one single Point Grey Blackfly BFLY-U3-23S6C camera, the default buffer allocated (16 on my machine running Ubuntu 16.04 LTS) was too small.
To do that use
$ sudo modprobe usbcore usbfs_memory_mb=1024
OR
$ sudo sh -c 'echo 1024 > /sys/module/usbcore/parameters/usbfs_memory_mb'
The change will be valid until the next restart.
To make the change permanent add options usbcore usbfs_memory_mb=1024 to an appropriate /etc/modprobe.d file (e.g. /etc/modprobe.d/usbcore.conf).
To check what is the current setting of usbfs_memory_mb use
$ sudo cat /sys/module/usbcore/parameters/usbfs_memory_mb

Redhat Kickstart Multiple Harddrive (Virtualbox Implementation)

I am setting up a kickstart server using Apache Server. I followed this tutorial and everything works fine there. However I am writing the ks.cfg file trying to mount separate disk into separate partitions beyond of that post scope. Say I have 10 disks, and I want to use the first disk maybe as /root, /boot, swap..etc. And /dev/sdb mount to /data1, /dev/sdc mount to /data2...
I am testing it using virtual box but it doesn't like my ks.cfg file.
My part part looks like below:
# Wipe all partitions and build them with the info below
clearpart --all --drives=sda,sdb,sdc,sdd --initlabel
# Create the bootloader in the MBR with drive sda being the drive to install it on
bootloader --location=mbr --driveorder=sda,sdb,sdc,sdd
part /boot --fstype ext3 --size=100 --onpart=sda
part / --fstype ext3 --size=3000 --onpart=sda
part swap --size=2000 --onpart=sda
part /home --fstype ext3 --size=100 --grow
part /data1 --fstype=ext4 --onpart=sdb --grow --asprimary --size=200
part /data2 --fstype=ext4 --onpart=sdc --grow --asprimary --size=200
part /data3 --fstype=ext4 --onpart=sdd --grow --asprimary --size=200
Can anyone tell me what is wrong with the part? Also, there is a sample ks.cfg that I reference.
I ran into a similar problem attempting to mount a second hard drive (sdb) during the install. What worked for me was to run the install the first time, then login to a root accessible account and format and partition the sdb drive. Afterwards, when re-installing the image, kickstart recognized and mounted sdb. Hope this helps.