cant manage ram and core settings in docker - docker

I am using Docker for Windows last version.
Before a week I had an update which asked me if I want to switch between HYPER-V to WSL if I remember correctly.
Swapped it and everything worked well as it should be, today I added a ram (same ram as I had, corsair vengeance 2x8gb 3200mhz ddr4).
but everything works good. I have 32 gigabyte now so I wanted to change the limit I gave to docker which was 6/16 cores and 6/16 ram. wanted to switch it up for like 12/32 ram so I was searching for the advanced setting which I used to limit the ram and cores before and I didn't manage to find it.
seems like the option just disappear.
I have to give docker more ram because I want him to run 2 programs at the same time which take more than 6gb ram.
what I have and what did I try conclusion :
I'm using windows.
I have 32 gigabyte ram.
I tried to reinstall docker.
I tried to remove the image and containers and add them again.
still did not find the setting which I used before which is really annoying.
any ideas ?

apparently using WSL based engine removes the option "advanced" so Currently using hyper-v instead of wsl solved my problem.
thanks anyway

Related

MariaDB + .net core in linux or docker is failing for high load scenario. Works when from local Windows dev machine

I think that I've pinpointed my issue, and it looks like it is environmental.
Basically one of the apps that is doing a lot of data computation (ML) is having issue with accessing that data in a high load scenario.
I have .net core 3.0 app using Worker to connect to MySQL and retrieve data (~ 4000-5000 queries per second for ~ 60 seconds).
When I am running it locally via dotnet run it seems to be working fine (never saw an error). However when I try to run it via docker (microsoft 3.101 image or bionic 3.101 sdk/runtime) or directly from Ubuntu with 3.1 sdk, I will start getting number of weird random errors (i.e. table doesn't exist, operation cancelled, often app was freezing without an error (the thread on Hangfire, when running without it would stop acking to RabbitMQ etc. so weird state)).
Now I am running it without Hangfire, with specified threads that are started via worker.
Weird thing is that all errors will be having paths
".... in C:\projects\mysqlconnector\src\MySqlConnector\...\xxxxx.cs"
However this is happening on Linux / Docker linux image, so not sure how it can even know about existence of C:...
It is totally killing me for last 72 hours as this is a big new feature that is using ML to process huge amount of data on hourly basis, and basically MySQL is not working with it in either environment beside dev (local machine with windows).
Caused by a corrupted library built from a source. Developer somehow managed to use .net core / .net framework as a target corrupting whole project. However in Windows it worked fine.
There was also another similar library used by mistake in one of source libraries... That is why it worked in most cases...
Solved by removing corrupted library, using different build that would be free of corrupted target.

how to choose the base windows image when create windows docker image?

For some reason, we have to build windows based docker. from here, we know there are 4 types of base image we could build from.
windows/nanoserver
windows/servercore
windows
windows/iotcore
I am sure I am not IOT relevant, so windows/iotcore is excluded. while it is not sure about the remains three. it seems from size perspective (nanoserver < servercore < windows). I should try in this order. by now, my service will not start in 1 neither 2. i have to try 3.
what are the criteria to choose between them?
clearly, I am missing some dll to start the service, while dependencywalker seems also not work in the base image 1 and 2. do someone have experience on how to identify this missing DLL? in this way, it still is possible to use minimize base image with the missed dll.
Progress update:
My service succeed run with #3(windows base image). but the docker image size is very very large. see following. this makes the choice important.
mcr.microsoft.com/windows/nanoserver 10.0.14393.2430 9fd35fc2a361 15 months ago 1.14GB
mcr.microsoft.com/windows/servercore 1809-amd64 733821d00bd5 5 days ago 4.81GB
mcr.microsoft.com/windows 1809-amd64 57e56a07cc8a 6 days ago 12GB
Many Thanks.
you've probably moved on by now but essentially
IOT - tiny, for builders and maker boards.
Nanoserver = smallest. running netcore apps. you have to build it using multi stage builds. It's quite advanced from what I see to get working.
ServerCore = middle. GUIless windows server. Is the most common default base image. You've not said what service is not running but it's possible that including the App Compatability FOD might solve the problem without increasing the size as much. Use newest container. 1903 I think it is.
https://learn.microsoft.com/en-us/windows-server/get-started-19/install-fod-19
Windows = fattest, the whole shebang

Visual Studio Emulator for Android memory minimum?

I'm using the VS emulator for Android with Visual Studio 2015 Community (Update 3). When I run a Xamarin project this error displays:
The emulator is unable to verify that the virtual machine is running: Not enough memory is available to start an emulator that uses 3072 MB of startup RAM.
OK, from this page https://msdn.microsoft.com/en-us/library/mt228280.aspx we see the system requirements where we need Hyper-V support and 6 GB or more of RAM.
My laptop has 4GB 8GB RAM plus swap space. When I allocate 3072 MB to the virtual machine through the Hyper-V Manager, the emulator starts but running and debugging is slow, of course because now there's only 1GB of RAM for VS and whatever else is running. (Yes, I try to minimize other RAM usage...)
So I wanted to reduce the footprint of the VM. However, and this is the common mistake some people are making: Reducing the size of the VM doesn't reduce the amount of memory that VS wants, it only reduces the available memory. And if the available memory is less than what VS wants we get that error.
So my questions are:
1) Can we modify a config somewhere to reduce the amount of RAM that VS wants in a virtual machine?
2) Is there an XDE.exe command-line somewhere that gets used where we can set the memory?
3) And ultimately, can anyone provide a good reason why an emulator requires 3GB or more of RAM? I don't want to suffocate the execution of the environment but I don't want it to take a lot more than it really needs either.
C:\Users[YourUserName]\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices
Just head to this URL and you will find the files
Now you will just have to open each one of them and change this line content, replacing the value with “1024”:
I open "Hyper-V Manager" and edit it's memory in setting Pane. So easy

vmware player install hangs? vista 32bit

Hi
I am a noob trying to setup my computer so i can make a social networking website.
Sorry if its not kosher to ask here, but Hopefully one of you smart guys can help me.
I want to test some CMS (content management systems), firstly Elgg and then some others.
As far as ive read i can do this by using a virtual machine like VMware Player.
Now originally i wanted to try out Insoshi so i tried to use Cygwin and GitBash (also Putty tools) to download it (with no success). This involved me installing those programs and also trying to get an ssh environment variable working. So i gaveup on that (seeing that Elgg has more support anyhow i thought id try to try that). I uninstalled these programs, deleted leftover directories and deleted the added environment variable.
I also uninstalled DaemonTools (cos i thought it may be conflicting).
Im running Windows Vista 32bit and have always downloaded relevant installs for that system.
My problem is the VMware Player installer isn't doing anything. I launch it and it seems to hang straight away see pic
Am i missing something here?
Vmware page also suggests a virtual appliance (for cloud stuff) which i dont know much about yet. And i think that appliance is installed via the player else an image loader like Daemon Tools. Do i need this appliance first?
Why is the player not installing?
Ive tried both 3.14 and 3.13 build with same result?
I have about 4 gig of space left on my hd and have 3gig of ram.
I have looked at the programs installed on my computer and cant seem to find anything else that might conflict (but i am a n00b) and i also tried pausing my kapersky pure protection. Any help is severely appreciated, thanks.
As I recall there were a couple of conflicts with vmware
A quick look through the vmware forums I see:
visualsvn
virtualPC (no surprise)
nvidia 270.18 beta driver
avg
I also remember there being talk on the forums about a specific executable name which caused issues, but Im struggling to remember what it was.
start regedit.exe
Browse to the following sub-key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
You should see keys named 0, 1, 2, 3 and 4. In my case I had a folder named "L" before the 0.
Remove the key with "L" (actually it is "└", unicode #2514)
P.S. This is due to Microsoft screws up the registry Internet Zone settings in the registry. With the "└" key, it cause Javascript not to be called from an application.
Got it from here.

How can I easily add storage to a VirtualBox machine with XP installed?

When I installed Windows XP on a VirtualBox machine, I made the hard drive only 10 GB since and assumed it would expand in size (as do hard drives in VMWare as far as I can remember, isn't this true?).
In any case, I'm trying to install Visual Studio 2010 beta on this Virtual Box XP image and it has run out of disk space.
Googling for an answer, I'm finding complicated tutorials like this which show you how to increase the size of a VirtualBox hard drive "in just a couple hours".
But I can't imagine it would be that hard to either:
increase the size of a virtual disk (after all, it is virtual)
create a new hard drive of, say, 20 GB and just attach it in the virtual machine as the D: or E: drive
How can I easily add storage space to a VirtualBox machine with XP installed?
I found this nugget at the link following. It worked perfect for me and only took 5 seconds.
As of VirtualBox 4 they added support for expansion.
VBoxManage modifyhd filename.vdi --resize 46080
That will resize a virtual disk image to 45GB.
https://superuser.com/questions/172651/increasing-disk-space-on-virtualbox
Note: This applies to pre-4 VirtualBox. In VB4, HDD expansion has been introduced.
According to the VirtualBox documentation:
When creating an image, its size needs to be specified,
which determines this fixed geometry. It is therefore not possible to change the size of
the virtual hard disk later.
So, the easiest way to add additional space to an existing VM is to attach a second hard disk. Go to the VM Settings > Hard Disks > Add New. Then, click the "Select Hard Drive" button and click on "New". Follow the wizard to create a new virtual hard disk. It will then show up as D: or E: in your guest OS.
For Windows users there's an additional user friendly option: CloneVDI Tool by mpack. It's a GUI front-end to VBoxManage that makes things a little easier to work with.
http://forums.virtualbox.org/viewtopic.php?f=6&t=22422
As Alexander M. mentioned, you'll still have to use GParted, Partition Magic or a similar partition editor to grow your partition to the newly allocated physical drive. To do this just download the GParted iso, mount it as a bootable drive in the VirtualBox and boot from it.
http://gparted.sourceforge.net/download.php
Newer versions of VirtualBox add an option for VBoxManage clonehd that allows you to clone to an existing (larger) virtual disk.
The process is detailed here: Expanding VirtualBox Dynamic VDIs
Step 1 :
create new virtual disk as per #mhaller instruction
Step 2 :
Open Run dialog box type diskmgmt.msc and enter
Step 3 :
Select uninitialized partition, right click->initialize
Step 4 :
Select the partition again, right click and create extended partition, again right click create logical drive (adjust the partition size if you need in wizard)
Thats all
For windows users:
cd “C:\Program Files\Oracle\VirtualBox”
VBoxManage modifyhd “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi” --resize 81920
http://www.howtogeek.com/124622/how-to-enlarge-a-virtual-machines-disk-in-virtualbox-or-vmware/
Take a look at CloneVDI from the VirtualBox site... 100% painless!
I am glad you were able to get this done in this manner, but you can (and I did) use the GParted tool for my Windows XP host by following the helpful entry by Eric. To re-iterate/expand on his solution (don't be afraid of the # steps, I'm trying to help newbies here, so there are necessarily more detailed instructions!):
change the size of the virtual hard disk via the VBoxManage modifyhd command, which is well-documented here and in the VirtualBox documentation.
download the GParted-live (http://sourceforge.net/projects/gparted/files/latest/download?source=dlp) or search the internet for GParted-live ISO. The important part is to get the live (.iso) verison, which is in the form of a bootable .ISO (CD) image.
Mount this new .ISO to the CD virtual drive in the host machine's Storage settings
If necessary/desired, change the boot order in the System settings for the host machine, to boot from CD before Hard Disk (alternatively, you can press F12 when it's booting up, and select the device)
start your VM; if you changed the boot order, it will boot to the GParted-live ISO; otherwise press F12 to do this.
do not be afraid or get too confused/wrapped up in the initial options you are presented; I selected all the defaults (booting to GParted default, default key mapping, language (assuming English - sorry for my non-English friends!), display, etc.). Read it, but just press enter at each prompt. With a Windows VM you should be fine with all the defaults, and if you're not, you're not going to break anything, and the instructions are pretty good about what to do if the defaults don't work.
it will boot to a GUI environment and start the GParted utility. Highlight the c: drive (assuming that's the drive you want to increase the size on) and select resize/move.
change to the new size you want in MB (they abbreviate MiB) - just add the new amount available (represented in the bottom number - MiB following) to the middle number. E.g: I changed mine from like 4000 MiB (e.g., 4GB - my initial size) to 15000 MiB (15 GB) because I'd added 10 GB to my virtual disk. Then click OK.
Click Apply. Once it's done you'll have to reboot - for whatever reason my mouse did not work on the desktop icons on the GUI (I could not click exit) so I just closed the VM window and selected reboot. I did not even have to unmount the ISO, it apparently did it automatically.
Let Windows go through the disk check - remember, you just changed the size outside of Windows, so it has no record of this. This will presumably allow it to update itself with the new info. Once it completes and you log in, you'll likely be told that Windows needs to reboot to use your 'new device' (at least in XP it did for me). Just reboot and you are done!
These steps worked for me to increase the space on my windows VM:
Clone the current VM and select "Full Clone" when prompted:
Resize the VDI:
VBoxManage modifyhd Cloned.vdi --resize 45000
Run your cloned VM, go to Disk Management and extend the volume.
Adding a second drive is probably easiest. That would only take a few minutes, and it wouldn't require any configuration, really.
Alternatively, you could create the second, bigger drive, then run a disk imaging utility to copy all data on disk1 to disk2. That certainly shouldn't take a few hours, but it would take longer than just living with two drives.
i used following instructions, its so easy to increase virtual box disk size
http://blog.bhupen.me/1/post/2011/09/increase-virtualbox-disk-size.html
The problem is that the file system on that disk was created when the disk had a certain geometry and you must modify it (while your OS is running on it).
So yes, making the virtual hard disk bigger is not a big issue. The issue is to make the new space available to your OS. To do that, you need tools like parted (Linux) or Partition Magic (Windows).
Taked from here => forums.virtualbox.org/viewtopic.php?p=41118#p41118
You could try something like this (see also Tutorial - All about VDIs: How can I resize the partitions inside my VDI?):
Create a new VDI of the desired size.
Boot GParted Live in a VM with both old and new VDIs attached.
Check in the partition editor (opened automatically after booting) what your old and new disk locations are. (It'll be something like /dev/hda and /dev/hdb.)
Copy contents from old to new disk. This will take a fair amount of time. (Here /dev/hdX is your original disk and /dev/hdY the new one).
dd if=/dev/hdX of=/dev/hdY
Warning: Make sure you do not mix up your input and output disks or you'll wipe all information from your original disk! (if= specifies the input and of= specifies the output.)
Reboot (again with GParted-Live). Now you should be able to increase the Windows partition size on the new disk.
Once you've verified the larger VDI boots Windows fine (and disk size is as you'd expect) you can of course delete the old smaller VDI.
Edit: Instead of rebooting before you resize the partition you should be able to run partprobe and the hit CTRL+R in GParted instead.
After resizing and not being able to view the resizing on my windows XP guest machine, I had to
clone it
resize it with
"VBoxManage modifyhd winxppro\ Clone.vdi --resize 30720"
and everything worked
I saw in other forums that snapshots can interfere for resizing and not being able to remove all snapshots for different errors I got, the only found solution for me was to clone it to remove the snapshots and then resize it, and everything worked. For resizing outside windows, a gparted boot cd that can be found here can help
If you want to resize a fixed size disk, or want to USE the resized disk
VBoxManage modifyhd filename.vdi --resize 99999
won't work. It supports only dynamic disks. Even for a dynamic disk, you'll have to resize the partitions.
Make a backup copy of your VM.
you have to go to VirtualBox manager, File-VirtualMediaManager.
There copy your virtual disk to another one. Make it dynamic while copying.
Go to your machine, Settings - Storage. Link to the new disk.
Return to VirtualMediaManager. Release the old disk.
NOW make resize with the new disk, as
VBoxManage modifyhd filename.vdi --resize 99999.
Resize partitions on the new disk:
download live Linux or live GParted iso.
In VirtualBox manager - settings - Storage - CD's add this iso.
VirtualBox manager - settings - system set loading from CD
launch VM, launch sudo gparted.
right click swap partition, UNSWAP it.
Move right border of the extended partition with swap up to the right.
Move swap to the right
Move left border of the extended partition up to the right
Move right border of YOUR partition up to the right.
Close VM
Remove CD from VM
check how it works
Close VM
remove the old disk in VirtualMediaManager.
Here you are!

Resources