Openstack recover orphaned instances - instance

I'm using Openstack Havana with one compute node based on kvm and a controller node running in a VM.
After a bad hardware failure I got into a situation where the controller is aware of a subset of the instances (preceding a certain date) and completely lost the newer instances. I suppose we had to restart from an older backup instance of the controller.
All the information about the instances is still available on the compute node (disk, xml) and they even still appear in virsh list --all.
Is there a way to just re-import them into the controller? Maybe by sql or some nova command line?
Thanks.

Ok. We solved the issue the rough way. Converting the disk file produced for OpenStack (OS) instances to VDI (thanks qemu-img) we then run the suitable glance command to import the VDI as an image into OS. From the dashboard we then created an instance on that image and reassigned our floating-ip.
Anyone has counter-indications to this?
Thanks.

Related

Google Cloud Deep Learning On Linux VM throws Unknown Cuda Error

I am trying to set up a deep learning VM on Google Cloud but I keep running into the same issue over and over again.
I will follow all the steps, set up a N1-highmem-8 (8 vCPU, 52gb Memory) instance, add a single T4 GPU and select the Deep Learning Image: TensorFlow 2.4 m69 CUDA 110 image. That's it.
After that, I will ssh into the vm, run the script that installs all the NVIDIA drivers and... when I begin using it, by simply running
from tensorflow.keras.layers import Input, Dense
i = Input((100,))
x = Dense(500)(i)
I keep getting failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error. By that point I haven't installed anything and haven't done anything custom, just the vanilla image from GCP.
What is more concerning is that, even if I delete the vm and then create a new one with the same config, some times the error won't happen immediately and sometimes it's present off the bat.
Has anyone encountered this? I've googled around to see if anyone has faced this issue and while I came across suggestions, all of them are old and have not worked for me. More over, suggestions on NVIDIA support forums tell me to re-install everything and the whole point of me using a pre-built GCP image specifically for deep learning is so that I don't have to enter the hell of installing and resolving issues with NVIDIA drivers.
The issue is fixed with the M74 image, but you are using M69. So follow one of the two fixes provided in the Google Cloud public forum.
we can mitigate the issue by:
Fix #1: Use the latest DLVM image (M74 or later) in a new VM instance: They have released a fix for the newest DLVM image in M74 so you will no longer be affected by this issue.
Fix #2: Patch your existing instance running images older than M74.
Run the following via an SSH session on the affected instance:
gsutil cp gs://dl-platform-public-nvidia/b191551132/restart_patch.sh /tmp/restart_patch.sh
chmod +x /tmp/restart_patch.sh
sudo /tmp/restart_patch.sh
sudo service jupyter restart
This only needs to be done once, and does not need to be rerun each time the instance is rebooted.

Hadoop name node fails to load in VirtualBox after sometime

I've configured and am running Hadoop v2.7.2 along with OpenJDK v7 u191. Once the configuration is done, all the process namely name node, data node, secondary name node, etc. runs perfectly (Checked with jps).
I'm running Ubuntu 14.0.4 LTS in Oracle VirtualBox (Currently VirtualBox is running in Windows10).
Once the system is halted (or shut down) for some time, then after restarting Hadoop, name node fails to start. All other processes other than name node is working fine, yet the name node is not.
I've tried reinstalling and reconfiguring the whole thing from the scratch, yet the problem is like it was. Also, I would like to add that there was no error when Hadoop was installed along with other software. I have also tried to reformat HDFS, but that doesn't work either.
I'm new to Big Data and Hadoop, so it would be very helpful if anyone could tell me what exactly is wrong and how to solve it step-by-step.
One more thing, someone previously advised me to configure SSH server to run hadoop properly, so I'd configured SSH server along with.
This is what Happens, when I restart my Ubuntu after sometimes
Image: Ubuntu

Automatic packing of server-side product as Docker and OVA image

We develop a server-side solution and to ease its deployment we would like to provide our cutomers with two options:
1. Docker image
2. VM image in OVA format
The images should be automatically created by our build machine.
As of today, we use packer for this purpose. First we create docker image and then update that image in preconfigured virtual machine image (using 'virtualbox-ovf' builder). This works pretty well, but there are some problems with this solution.
First, our vm includes docker framework and two OSes (host's and docker's), so our VM image is ~twice bigger than docker. Second, to base our solution on another linux distro, we should manually configure new VM machine.
We are looking for 'Dockerfile'-style solution to create and configure VM automatically and then export it in OVA format. 'virtualbox-iso' builder is the obvious way to do this, but the building process will be much longer.
If you are willing to use Debian as your base OS then you could look at TurnKey Linux's TKLDev. It's probably a bit of a learning curve initially but it's a pretty cool thing IMO (although I'm very biased - see below disclaimer). TKLDev will build you a TurnKey (Debian based) ISO with your software installed on top. Then using Buildtasks you can convert the ISO to OVA, VMDK, LXC, Docker, OpenStack, etc...
Unfortunately Buildtasks is not very well documented but significant chunks of it are in bash so if you are handy with a Linux commandline you could work it out. Otherwise ask on the TurnKey forums.
The initial development (from Packer to TKLDev) may take a little while, but once the heavy lifting is done the creation of an ISO (in a guest VM on a moderm multicore CPU PC) takes about 10-15 mins and the OVA probably another ~5; Docker another ~5.
If you wanted to make it build automatically then you could use a hook to trigger a fresh TKLDev build (including the buildtasks image creation) everytime a commit was made to a repo. I know that git supports this but I assume that other version control systems allow something similar.
Also if the appliance that you are making is open source then perhaps it could be added to the TurnKey Linux library?
Disclaimer: I work with TurnKey Linux. :)
FWIW this is essentially the process we use to create our library of appliances in most virtualisation formats known to human kind!

Redis Multiple Instance in FreeBSD

im trying to learn FreeBSD, and i like to install multiple instance of Redis on it. i know this is easy in linux by just running the ./install_server script.
i've tried running the script from utils but as expected it wont work in bsd. as it installs in /etc/init.d
is there anyone who could direct me where to learn doing multiple instance of redis under freeBSD or teach me how to do it?
im new in freeBSD, and i want to learn it. i came from linux and OS X.
thank you in advance!
The default install on FreeBSD only runs one instance, as usual for daemons.
But you can run multiple instances by hand. Of course you'd have to
write a different configuration file for each instance, using a separate port, and maybe a different directory where to dump databases.
Why not use multiple databases in one redis instance?

Does VirtualBox have any advantages over VMWare Player?

I've been using VMWare Player for ages now for both Windows development on my Linux box and (more importantly) automated testing of Windows applications.
Basically what I do is to:
have my development VM running and I build my code and automatically transfer the install package to Linux.
when this shows up at Linux, automatically copy a "known-state", snapshot VM to my test work area (I say snapshot but it's really just a backup copy of the whole directory, not a real VMWare snapshot).
also automatically start the VM in the work area once it's copied.
the VM has a single never-changing startup script which pulls a real startup script from Linux and runs it.
that startup script is responsible for getting down the install package and doing a silent install.
it then runs a test suite and uploads results back to Linux where I have automated scripts which check them.
So, it's basically a one-button test process.
Now I notice more and more people seem to be using VirtualBox.
First off, I'd like to confirm that it can also do a similar thing, primarily being able to backup and restore whole VMs and having shared folders between VirtualBox and Linux.
Secondly, and this is the crux: I'd like to know if that has any concrete advantages over VMWare Player, especially for the automated testing jobs.
I switched to VirtualBox because of one concrete advantage, I wasn't able to setup the network as I wanted to in player. I don't remember if it was bridging or port-forward or whatever that didn't work, but something didn't work the way I wanted it to with the network-setup (cause I needed the pay-version for that) and thus I switched. Personally I've found that both have good and bad sides, but I still use virtualbox cause of that network-thing.