How to create new screen in gcp console, which will keep running? - google-cloud-platform

I want to keep my console running of gcp vm.
how can I create new screen.
I know the command to
list of all screens is `screen -ls`
opening an existing screen is `screen -r nameofscreen`
closing the screen `ctrl ad`
but I don't know how to create new one?

To create a new screen window, press “Ctrl-A” and “c“

Related

Cannot create GCP VM, public images are empty

When attempting to create a new GCP VM on a new account, the list of public images is empty. If I try to launch an image from the public marketplace, the boot device will not be attached.
What am I doing wrong here?
Turns out the problem was caused by the security group in my organization which set a public image constraint and neglected to ensure my team was aware of it.
https://cloud.google.com/compute/docs/images/restricting-image-access
open cloud shell as per my comment (right upper corner square with ">" sign)
list images using
gcloud compute images list
Output will look like this:
try to create your VM with desired image via opened cloud shell using for example the following
gcloud compute instances create test --image-family ubuntu-1804-lts --image-project ubuntu-os-cloud
Output should look something like this:
If so, you will find your instance running under compute engine.
PS.
Dont forget to turn these VMs off when you are done.
If you want to select another image make sure to use image project and image family from output from step 2.
Either way at least this should give you some errors to resolve

How do I copy/paste in EC2 Connect AWS

I cannot use command+c/command+v on mac to copy paste text into my aws ec2 session window. How do I enable copy paste so that I can copy text from my local clipboard or from another window in ec2 session ?
I connected with "EC2 Instance Connect" from the console. Cmd-v just pastes a space.
To test this situation, I launched an Amazon EC2 Linux instance and connected via EC2 Instance Connect.
I had the same experience as you:
Highlighting text 'copies' it to the clipboard
Right-clicking 'pastes' the clipboard
However, copying to the clipboard outside of the window and then attempting to paste it didn't work
This was using Google Chrome.
I then tried again using Safari and it worked fine.
So, there seems to be some strange behaviour in some browsers.
In many terminals ctrl+c and ctrl+v will not work for copy & paste. In that case, you can use "ctrl+insert" for copy and "shift+insert" for paste, in some keyboard "insert" button won't work alone, in that time, you need to press "fn" also...
I had the same problem. When I would paste, it just added a space instead of the clipboard contents. Double-pasting didn't seem to work either.
This sounds weird but what worked for me was opening a new blank tab and pasting in the address bar. I had to re-copy the content (it seems like the clipboard had lost it?) But once it worked in the address bar, I switched tabs and it worked in my EC2 Connect Console.
YMMV.
I highlighted the text, then used my keyboard's menu button (located next to CTRL) to pop up the normal browser right-click menu... then clicked "copy"
I had the same problem.This is what I did:
ctrl+c the text or command you want to copy and then go to the terminal and press right click. it worked
I had the same issue with copying and pasting on my putty terminal (Mac M1). This is what I did:
Bring up the putty window.
On the left, you'll find list of categories to choose from. Click on "Selection" where you'll see list of selection settings you can modify.
Change the settings below from "No action" to "PRIMARY" and try opening the terminal.
Mouse Paste action: PRIMARY
{Ctrl,Shift} + Ins: PRIMARY
Ctrl+ +{C,V}: PRIMARY
Hope this helps!
I had the same issue. CTRL+V doesn't seem to work and double CTRL+V doesn't seem to work either.
What did work was right-click + paste
The below works for me on my Windows 10 with Chrome browser
To Copy highlighted text from EC2 console to Clipboard:
Fn + Ctrl + Insert
To Paste from Clipboard to EC2 console at the cursor:
Fn + Shift + Insert

AWS Sagemaker Cant train my Keras model - ErrorMemoryError: Unable to allocate 20 GiB for an array with shape and data type

it's my very first time using AWS Sagemaker, so I'm trying to fit my keras model and get this error the whole time. I don't know how can I solve it , I tried doing echo 1 > /proc/sys/vm/overcommit_memory but then kernel died. I was using the most basic and cheapest version for Sagemaker, I think it has 4GB ,may it be the problem?
But I dont really know with this configuration I can fit this model in my own computer, so that means that Sagemaker has less power than my computer?
Thanks.
For a model that requires a 20GB array to be stored, you'd probably want to use something like an ml.t3.2xlarge or ml.m5.8xlarge instance, which have 32GB of memory available.
There are two ways to solve this problem:
Method 1
You can select this from the SageMaker Studio environment if you're using the SM Studio IDE, via the "Switch instance type" button at the top of your notebook tab.
Once you've done this, the instance list will appear in a pop up, and you need to click on the "Fast launch only" selector button, so that you can see all available instance types.
Method 2
Alternatively, if you're using a "traditional" SageMaker Jupyter notebook without the SageMaker Studio IDE:
Goto the main SageMaker console.
Click on Notebook -> Notebook Instances.
Click on the hyperlink of the notebook you want to change the instance type for.
This will take you to the "Notebook instance settings" page.
Click on the "Edit" button (top right).
Select your new, larger instance type from the "Notebook instance type" drop down list.
Scroll down to the bottom of the page and click on the "Update notebook instance" button.
This will take you back to your list of notebook instances.
Note that the list will contain the word "Updating", with a clock icon next to it in the Status column.
If this hasn't refreshed after a few minute, click on your browser refresh button.
The instance should now show as being available/In Service, with the new instance size/type listed in the "Instance" column.
If it's not started, click on the "Start" link in the "Actions" column and it should start with the new instance type.

Create Instance Template based on an exported image

I have an image created from a VM and I want to create an Instance Template to use that image for boot disk. I cannot find any way to do this in Google Cloud Console. How can create an Instance Template, using an image for boot disk?
Thanks!
Go to Compute Engine -> Images. In Filter images, enter the tag that you used to create the image. If you did not use a tag or something descriptive, then you will have to look thru the entire list. If you do not find your image, then go back and figure out what went wrong with your import.
Once you know your image and its name, go to Compute Engine -> Instance tempates.
Click on Change in Boot disk. Select the tab Custom images. If you do not see your image, then go back again and figure what went wrong with your import.
If you see your image select it and press the Select button. Continue configuring your instance template.

How to restore an accidentally deleted GPO. Please advise

I have deleted one GPO from DC (Windows server 2012 R2). How do i restore it back. Domain Function level is 2008 R2. Is there any option.? Please advise. Thanks
To restore a deleted GPO:
In the Group Policy Management Console tree, click Change Control in
the forest and domain in which you want to manage GPOs.
On the Contents tab, click the Recycle Bin tab to display the deleted GPOs.
Right-click the GPO to restore, and then click Restore.
Type a comment to be displayed in the history of the GPO, and then click OK.
When the Progress window indicates that overall progress is
complete, click Close. The GPO is removed from the Recycle Bin tab
and is displayed on the Controlled tab.
Source: Restore a Deleted GPO