Using a VMWare installation as a development webserver - linux

Can anyone point me into the right direction to use a VMWare installation of Ubuntu or another Linux distro as a development server on my local machine?
I'm on a Windows 7 32bit machine and currently using WAMP.
I'm noticing some differences between developing on a windows machine and my deployment server and additionaly I'd like to expand my knowledge on working on linux using the command line.
Follow-up question, what would be the best way to develop on my local installation and push that development to my VPS that I'm renting?

I'd suggesting downloading a LAMP appliance from http://www.vmware.com/appliances/directory/cat/0?k=lamp if you don't want to get into building your own, and running that on VMWare Player.
If you want to build your own, you could use VMWare Server, Oracle VirtualBox or any other Virtualization software. Create a New VM, with 512MB or RAM, and 4GB (+ the requirements of your tools + a buffer of 2GB) of disk. I recommend 10GB, or you could set it up for maybe 50GB and let the virtual disk grow as needed rather than allocating all the space up front.
Then, download the Ubuntu Server 12.04 ISO file from http://www.ubuntu.com/download/server , and use it as the CD Drive to boot your VM. Follow the on-screen instructions to install. And at the end, select the options to install the LAMP configuration.
Note: Using Ubuntu's server edition means you don't get any GUI.

Related

In Docker Desktop for windows 10 with WSL2, where does docker containers live & how Linux containers can run a java app, but not windows nanoserver?

I have Windows 10 Enterprise Version and I have installed Docker Desktop, enabled WSL2 backend, and downloaded and installed the Linux kernel update package.
I am learning Docker and I have some doubts about how Docker works behind the scenes.
I have drawn a basic architecture diagram of Docker on windows with
WSL2, is this correct?
Whenever we create a new Linux container it gets created in the same lightweight utility VM provided
by WSL2?
And if we create a windows container it gets created on windows os?
Can these containers access windows and Linux kernels both when
required? Like when running a java app in a Linux container it requires windows kernel, right?
So, by default docker runs Linux containers, when do we need windows containers? I can containerize a java application by using
openjdk:8, but I am not able to pull windows nanoserver image when I
run Linux containers, it works only when I switch to Windows
Containers. What is going on here? Does this mean the openjdk:8 image is a Linux image(i do not know how to say it), and windows nanoserver a windows image?
How Linux Containers can run my java application? It must need the
windows kernel, right?
If the docker containers reside within the lightweight utility VM
created by WSL2, can it access both the Linux kernel that it ships
with and the Windows Kernel?
I have the default Linux container mode and I tried these two
commands.
docker run --platform=linux -d ubuntu /bin/sh -c "while true; do echo
hello world; sleep 1; done"
docker pull mcr.microsoft.com/windows/nanoserver:1903
The first one worked for the second one I got the following error.
1903: Pulling from windows/nanoserver no matching manifest for Linux/amd64 in the manifest list entries
But when I switch to windows containers it works.
So what is the difference between my java app on openjdk:8 image and windows nanoserver?
Do these not require windows kernel to run?
How is the java thing running on Linux containers then?
Edits :- Need more clarification on this-
Copying the question from comment section.
And one more thing, the containers do not access windows and Linux kernels simultaneously in WSL2 right? After all they are just isolated spaces in an OS, so either they can be in windows or Linux? Please correct me if I am wrong. The Linux images are built in such a way that it has everything to run my java and as java is a cross platform language so it can run on Linux kernel, is this the concept?
About the architecture diagram that I have made here- the containers(isolated processes in an operating system with app files) , in case of Linux containers all of them(multiple containers) runs on the same WSL2 VM, right?
Firstly, good question.
I hope I can answer it as best as possible.
So, by default docker runs Linux containers, when do we need windows containers?
you don't need windows containers. You should always consider what your application needs. For instance, if you are working on a java app, you would pull a java image and not an entire host OS. The only time I ever pulled a windows image was when I dockerized an ASP.NET application that can only be run on windows.
How Linux Containers can run my java application? It must need the windows kernel, right?
In the context of docker:
Docker for Windows allows you to simulate running Linux containers on Windows, but under the hood a Linux VM is created, so still Linux containers are running on Linux, and Windows containers are running on Windows.
if the docker containers reside within the lightweight utility VM created by WSL2, can it access both the Linux kernel that it ships with and the Windows Kernel?
Containers are using the underlying Operating System resources and drivers, so Windows containers can run on Windows only, and Linux containers can run on Linux only. Docker for Windows allows you to simulate running Linux containers on Windows, but under the hood a Linux VM is created, so still Linux containers are running on Linux, and Windows containers are running on Windows.
So what is the difference between my java app on openjdk:8 image and windows nanoserver?
The openJdk image and windows nano server core difference is the very base image that they use. openJdk is probably using some very bare unix os as the base where as the nanoserver is an entire os which is windows.
Do these not require windows kernel to run?
The openjdk image does not require windows to run as it is built from linux. Docker for windows will use the WsL to run. The nanoserver will only run on windows (as windows images can only run on windows).
How is the java thing running on Linux containers then?
I understand this question to be "How does the openjdk image run on linux and windows?"
if so, because it uses a linux os as its base image, it can run by default on linux. But because the WsL2 exists, a VM is created and simulates a linux OS in windows. That is why we can run windows images and linux images on Docker for windows.
I hope this helped, here are some extra tips from the questions for you to consider.
The images will always perform best when the image is the same type as the OS. This is because docker will utilise resources of the host and performance is better when the host and container are of the same os.
Use images that are best fit for purpose. Don't use an entire os image just to run a java app. Rather use the java image. This applies to a wide range of frameworks and languages.
Read this This is the crediting article if you want to read more.
The diagram is not quite correct. Both the Windows Kernel and a lightweight VM that hosts WSL2 KVM sit on top of the Hyper-V hypervisor. In other words, WSL2 leverages Hyper-V. (An alternative would be to use only Hyper-V, but with WSL2 it is more seamless.) WSL2 uses docker-desktop as the main bootstrap VM and docker-desktop-data for storing images and containers data. 9p network protocol is used for seamless host-to-guest and guest-to-host file access:
https://wiki.qemu.org/File:9pfs_topology.png
This way, docker commands can be run from both Windows and from within a distro installed under WSL2 such as Ubuntu etc. In both cases, containers run under Linux. A rationale for this architecture is that Linux Docker cannot be installed on Hyper-V VM nor inside a WSL2 Linux.
Hi,
In practice exist two great use-cases/types of hypervisors:
a)Hyper-V is hypervisor(software which controls the containers=VMs) which is type-1 so it worked directly(bare-metal) on machine=PC=hardware:
Hyper-V(hypervisor type-1) <---->PC-machine
In this first type The Hypervisor take control over hardware directly(it avoid using of the Host-OS because the control taken from machine's BIOS)
That means that not use Host-OS but not means that Host-OS not exist!!!!
b)Virtual Box(VB) is hypervisor type 2(heavy software). So VB worked with machine via Host-OperationSystem(Host-OS):
VB(hypervisor type2) <---> Host-OS <----> PC-machine
So in this last case the control of hardware(PC-machine) is heavy because the control over machine=PC=hardware is exercised via supplemental or tertial-part=component which is Host-OS
Also need to know that the containers=VMs(regardless of type 1 or 2) have each the OS one but it is named OS-guest(fr. invite).
So in both case(type 1 and type 2) the Hypervisor work as backend for containers/VMs(which are frontends).
For more details read about in this tutorial/article:
https://www.nakivo.com/blog/hyper-v-virtualbox-one-choose-infrastructure/
PS: One Virtual-Machine (VM) can controls many Containers like in the image
Thanks
or use this google images search(firstly 3 images)
Another explanation about communication from VM and its isolated-Containers can be fount in this article.

installing sap on ubuntu

My laptop is running ubuntu 8g ram, I'd like to know if it's possible to install SAP express hana or ASE suit on it, localhost, without using virtual machines or a remote server.
All tutorials I've seen require either a VM or a server, I'd just like to install SAP locally to learn how to use it. Is there a simple way to install and run SAP on ubuntu?
The server install that you mentioned is simply a linux system where you can install the binaries. So it actually does not matter if the system is a "server" or your laptop.
The "Server Only" version of SAP HANA express is the core database layer and provides all the text analytics, geo spatial, predictive, etc and will run as a VM on 8GB of memory. If you take the same binaries that are provided and are used to create the VM to begin with you will find that it only takes somewhere between 2GB and 4GB of memory to start with.
But with only 8GB of available memory on your system that means that you will quickly hit limitations based on what else is running on your system and of course how much you try to do with the SAP HANA express system.
Last night I actually did the Docker install version and have HXE running on my 8GB laptop without a problem. I did give Docker 6GB of the system memory and my HXE system has 1GB of available free memory upon startup.
Now this was Docker on a Mac. If you take the binaries and follow the install instructions on your 8GB Ubuntu laptop you should see better performance.
So long worded answer in short terms means "YES you can install SAP HANA express on your 8GB laptop"
Now interpreting your question "if it's possible to install SAP express hana or ASE suit[e]" the above answers "SAP express hana" for "ASE suit[e]" the assumption is you mean "the ABAP stack running on ASE or HANA" in which case the answer is also yes but again with limitations coming sooner than later.

Install KaiOS on VMWare

I recently found this OS: http://www.kaios.org/. I was wondering how I can install it on VMWare Fusion. There is no .iso or .vmx that it comes with.
Please understand, I'm still learning about Linux and how it works. I'm using Mac if it makes any difference. Thank you!
KaiOS is a small operating system which isn't typically like a Linux distro which you are probably more familiar with. As a result it won't come with an installer or come on an .iso which you could load as an image into VMWare.
The KaiOS site documentation shows you how to boot the OS via PXE, which you could do with VMWare although would need to set up a PXE server VM as well as another VM which you would boot via PXE from the server you set up.
You won't be able to traditionally install this OS via loading an image unfortunately.
There is some documentation on PXE with VMWare here.

More efficient use of VirtualBox?

I'm looking to make the switch from windows 7 to linux mint, but I'm still in school so I still want to be able to use some of my windows features. I plan to use Mint more often than windows.
Which would be a more "efficient" use of the virtualbox:
Putting VBox on Windows 7 and running Mint from it or
Putting VBox on Mint and running a system image of my Windows 7?
I have tried dual booting in the past but it was honestly just a nightmare, and twice I almost wiped my hard drive, so I'm very hesitant to try that again.
In terms of your preferences for "efficiency", i would say:
Native install of Windows 7 and run Linux via VirtualBox. Because Linux has a much lower resource footprint than Windows running on VirtualBox and would run quicker than windows.
If it were my preference, and this is what I setup to transition from Windows 7 to Linux Mint, I would run dual boot. As they both run natively, they both run fast. Also just setup a generic NTFS "shared" partition that you can access on both Linux and Windows for the purposes of using documents on both systems.
I actually found the Mint dual boot install quite painless and automatic. I still swap back and forth for convenience but use Mint primarily now.
It's really hard to predict performance wise which setting would be more "efficient". The best way to be sure is to try both settings and measure.
Installing VirtualBox on Windows would be the easiest step from your current setup.
In my honest opinion, because you want to get used to Linux Mint environment, so you have to use Linux Mint as your host machine, and then install virtual box in it.
It will make you to do more on Linux Mint instead of windows.

VMWare ESX image to run on VMWare workstation

I've an linux image(debian) running on VMWare ESX 3.1.
Is it possible to copy that image and run it locally on my local VMWare workstation?
how?
Just open up the VI client, shut down the VM, browse to the datastore and then download the image. Pretty straightforward really, I do it from ESXi 3.5 -> Workstation 6.5 all the time.
I believe that while ESX (commercial) is reverse-compatible to Server (free), Server is NOT forward-compatible to ESX.
Therefore, you can import Server images to ESX, but not the other way around.
You may be able to go from an ESX host to an ESXi (free) host, however.
As far as I remember that was exactly what I did a few weeks ago. I exported the image (export facility is included in the ESX, but you'll have to power off the image while you export it). Once the image was exported I ran it through the VMware converter (free tool) and converted it to run on a workstationr/player.
However my laptop always crashes when I install VMWorkstation so I run it om a VMPlayer.
We also have such an environment and are working on it since past 5 years. We have ESXi 3.5 virtualized environment running Centos OS virtual machines amongst others. To use the virtual machine from ESXi on our local machine, we have installed VMWare Workstation (also VMWare Player). We take a complete mondo backup using mondoarchive. We then transfer these images on our local machine. From these images, we restore the ESXi based virtual machine in our local VMWare Workstation environment. It has been a great success for last five years and we have never faced any problem with it.
Kasper, what version of ESX are you running? Trying to export an image from our ESX server always ends in a I/O error (don't have access to the server right now so I cannot remember the exact error message).
Would love to get this feature working but I not found anything on the web that might help with this specific error.
You can also user Vizioncore vConverter or FastSCP for your migration.
This is a nice article describes how to convert different images: Please go throught it.
http://www.dedoimedo.com/computers/vmware-converter.html

Resources