packer: Error when building from source ova - vmware

I am trying to build an .ova file using another .ova as source:
My configuration is as follows:
"builders": [
{
"type": "vmware-vmx",
"source_path": "builds/my-base.ova",
"vmx_data": {
"memsize": "8192",
"numvcpus": "4"
},
(the template validates successfully btw)
I am using:
$ vmplayer --version
VMware Player 14.1.2 build-8497320
(although I have installed VMWare Workstation Pro in trial mode)
$ packer --version
1.2.4
When running packer build I get the following error:
... Build 'vmware-vmx' errored: Cloning is not supported with VMWare
Player version 5. Please use VMWare Player version 6, or greater.
==> Some builds didn't complete successfully and had errors:
--> vmware-vmx: Cloning is not supported with VMWare Player version 5. Please use VMWare Player version 6, or greater.
==> Builds finished but no artifacts were created.

Looking as some past issues on the Packer repo, it looks like the Trial license may cause this error. Example: https://github.com/hashicorp/packer/issues/972#issuecomment-48640599

Related

Oracle Virtual Box not starting on Mac

Host: Mac OS Ventura
Guest: Oracle VirutalBox 6.1
After the recent OS upgrade to the Ventura on Mac, I am not able to start my virtual box. It used to work perfectly before the upgrade. I have tried other versions of virtual box, such as 7.0, but I am still getting the following error.
Any help would be appreciated .
Thanks.
===================
The virtual machine 'Oracle Linux 9' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
=======================
Mac OSX Ventura doesn't work with VirtualBox 6.X
download latest 6.X and unpack virtual box 6.X
run the uninstall virtual box tool (you need to approve in System > Privacy and Security > allow run the uninstall tool.
Now You need to download the last version VirtualBox 7.x
after download unpack it
run installer
you need to authorize Oracle kernel extensions System > Privacy and Security > allow Oracle Kernel Extension
Restart
Now Run VirtualBox from Application folder.
Probably you will need to recreate your network adapter in VirtualBox > File > Tools > Network manager

How to add cuda drivers to gcp Ubuntu vm?

When I run a pytorch model on a google virtual machine using:
model.cuda()
I get this error:
AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
As of 2020-05-01, GCP default machines run 9.12. So it's hard to use the default repository :
ppa:graphics-drivers
I recommend just downloading the driver yourself and installing it :
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/440.82/NVIDIA-Linux-x86_64-440.82.run
Then run it in sudo mode :
sudo bash NVIDIA-Linux-x86_64-440.82.run
Accept everything and you should be okay to use your GPU

Installing RQuantLib on RStudio AWS AMI

there have been some similar questions (Installing RQuantLib on Linux), but none related to the AWS RStudio environment. After trying the usual rute
install.packages('RQuantLib');
library(devtools)
install_github("eddelbuettel/rquantlib")
I get the following error (in both cases):
configure: error: Please install QuantLib before trying to build RQuantLib.
ERROR: configuration failed for package ‘RQuantLib’.
Also, all of a sudden (after upgrading R on my local machine from 3.4.4 to 3.5.0) RQuantLib stopped working also on my local Windows machine:
Error in system(full, intern = TRUE, ignore.stderr = quiet, ...) :
running command '"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no- environ --no-save --no-restore --quiet CMD config CC' had status 1
After following the directions on the Github page I tried the following:
if (!require("drat")) install.packages("drat")
drat::addRepo("ghrr")
install.packages("RQuantLib", type="binary")
but got the follwoing error:
Warning in install.packages :
unable to access index for repository https://ghrr.github.io/drat/bin/windows/contrib/3.5:
cannot open URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES'
Warning in install.packages :
package ‘RQuantLib’ is not available (as a binary package for R version 3.5.0)
What else could I try? The AWS problem has a higher priority, although I would really like to be able to use RQuantLib on my local machine again, so any help would be really appreciated.
A small end note: The RQuantLib library compiles succesfully on the Debian 16.04 AWS AMI, but not on the RStudio AMI.
Windows builds, just like Unix builds, require QuantLib to be present which has its challenges.
The most recent upload restores this ability, utilising a GitHub repo with a prebuilt version of QuantLib. Try installing RQuantLib 0.4.5 now on Windows; you should get a binary from CRAN as can been on the CRAN page.

Installing default repos CentOS 7

All of the files were removed from /etc/yum.repos.d/ directory. How can I go about re-installing the default repos files that come with a fresh CentOS 7 install.
When I execute the following command "yum repolist all" I get the following result:
Loaded plugins: fastestmirror, landpacks
Loading mirror speeds from cached hostfile
repolist: 0
Thank you.
Rebuild your the default CentOS yum.repo.d folder
On a dev machine, somehow, I managed to erase my yum.repo.d contents. I wanted to rebuild the repo files back to their default. First you need to figure out what version you are using:
cat /etc/redhat-release
Then visit the correct release at : http://vault.centos.org/
navigate to the correct os/x86_64/CentOS/ directory (could be os/x86_64/CentOS/ i386/)
Download the following files to the server:
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-notes-5.x-0.x86_64.rpm
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-5-x.el5.centos.x86_64.rpm
Then install the two rpms:
rpm -Uivh *.rpm
Should be back to the original shipping repo files.
Credit: By jbmurphy on July 8, 2011 in Linux
Reference - http://www.jbmurphy.com/2011/07/08/rebuild-your-the-default-centos-yum-repo-d-folder/

Vagrant / Virtualbox, shared folder out of sync when there are many file-related operation

This is not about vagrant or virtualbox guest running slowly due to slow shared folder access, we know that can be resolved more or less by enabling nfs.
It's rather about mounted shared folder go out of sync when there are many file operations within the vm (enable nfs does not prevent it from happening) .
For example, when we are installing packages, like with php composer or node.js npm inside the vm, there is a certain probability that normal composer update or npm install will fail, and once it failed, only vagrant reload will help to restore the sync folder and allow the same command to pass without problem.
Such random failure only happens when executing on shared folder (nfs or not), so apt-get upgrade won't trigger the same problem as it runs within the vm folders.
Since the same sync problem does not appear when we run composer or npm from the host server, I am wondering what could have caused it and how do we go about debugging it?
Our vagrant setup and config:
if Vagrant::Util::Platform.windows?
config.vm.synced_folder "www", "/var/www", :extra => "dmode=777,fmode=777", :owner => "vagrant", :group => "vagrant"
else
config.vm.synced_folder "www", "/var/www", :extra => "dmode=777,fmode=777", :nfs => true
end
Guest: Ubuntu 12.04 LTS x64
Host: Windows 8, Mac OSX 10.8, Ubuntu 13 (yes, they all run into the same problem randomly)
Think we have more or less discover the source of problem:
Guest Addition version (4.1.x) that comes with our Ubuntu 12 LTS box does not match current Virtualbox version (4.2.x) installed on host machine. So file sync failed.
The easy fix:
run this command within vm sudo apt-get -y -q purge virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 to remove old guest addition
install vagrant vbguest plugin so future update is taken care of automatically during up: https://github.com/dotless-de/vagrant-vbguest