vm:headless
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vm:headless [2019/02/22 15:20] – markpcohen | vm:headless [2020/04/25 20:16] (current) – borja | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Headless VM setup guide ====== | ====== Headless VM setup guide ====== | ||
- | 1. Clone your class repository to somewhere on your local machine. From now on in this guide, refer to this directory location | + | 1. Download the latest version of VirtualBox (https:// |
- | 2. Download | + | 2. From the same page, download |
- | 3. From the same page, download | + | 3. Install VirtualBox, then double-click on the Extension Pack, and VirtualBox will prompt you to install it. |
- | 4. Install | + | 4. Open VirtualBox, click the menu across from " |
- | 5. Open VirtualBox, click the menu across from "Tools", and select " | + | 5. Click "Create" |
- | 6. Click " | + | 6. Download |
- | 7. Download | + | 7. In VirtualBox, choose File -> Import Appliance, and then find and select |
- | 8. In VirtualBox, choose File -> Import Appliance, and then find and select the .ova file you downloaded in step 6. You can leave all the options at their defaults. | + | 8. Right click on the VM's entry in the VirtualBox |
- | 9. Right click on the VM's entry in the VirtualBox sidebar, and click "Settings..." | + | 9. Under " |
- | 10. Under " | + | 10. Since you will be running this VM in headless mode, we will be setting up a *shared folder* on your computer that you will be able to access from inside the VM. Select a directory on your computer |
- | 11. Under " | + | In VM's setting, under " |
- | 12. Start the VM and log in. The password is '' | + | 11. Start the VM and log in. The password is '' |
- | 13. In the VM, launch a terminal and run the following commands: | + | 12. In the VM, launch a terminal and run the following commands: |
$ sudo adduser student vboxsf | $ sudo adduser student vboxsf | ||
Line 39: | Line 39: | ||
$ nmcli con mod " | $ nmcli con mod " | ||
- | 14. Run the following command: | + | 13. Run the following command: |
$ sudo nano /etc/fstab | $ sudo nano /etc/fstab | ||
Line 45: | Line 45: | ||
This will open up your system' | This will open up your system' | ||
- | | + | |
- | + | ||
- | Be sure to replace '' | + | |
- | + | ||
- | cs233 / | + | |
Then, to quit nano, press '' | Then, to quit nano, press '' | ||
- | 15. Shut down the VM (click the gear icon in the top right, and click "Shut Down" | + | 14. Shut down the VM (click the gear icon in the top right, and click "Shut Down" |
- | 16. Launch a terminal on your local machine (i.e. not inside the VM). Run the following commands: | + | 15. Launch a terminal on your local machine (i.e. not inside the VM). Run the following commands: |
$ mkdir -p ~/.ssh | $ mkdir -p ~/.ssh | ||
Line 68: | Line 64: | ||
Then, to quit nano, press '' | Then, to quit nano, press '' | ||
- | 17. In VirtualBox, right click on the VM and choose " | + | 16. In VirtualBox, right click on the VM and choose " |
- | 18. Wait ~15s for the VM to start up fully. Then, in a terminal on your local machine, run: | + | 17. Wait ~15s for the VM to start up fully. Then, in a terminal on your local machine, run: |
| | ||
$ ssh cs-vm | $ ssh cs-vm | ||
- | 19. Once you're logged in, you'll see the prompt change to something like '' | + | 18. Once you're logged in, you'll see the prompt change to something like '' |
- | $ git config --global core.fileMode false | ||
- | $ ln -s / | ||
- | $ cd REPO_SHARED_NAME | ||
- | $ chisubmit init | ||
- | Be sure to replace '' | + | $ ln -s / |
- | $ ln -s / | ||
- | 20. Run the following commands: | + | 19. If you will be accessing a Git repository from inside the VM, you should also run the following commands: |
+ | $ git config --global core.fileMode false | ||
$ git config --global push.default simple | $ git config --global push.default simple | ||
$ git config --global credential.helper store | $ git config --global credential.helper store | ||
Line 97: | Line 89: | ||
* Edit code on your local machine in your preferred editor. For example, if you like using Sublime Text on your Mac, you can use that by opening '' | * Edit code on your local machine in your preferred editor. For example, if you like using Sublime Text on your Mac, you can use that by opening '' | ||
- | * Test code inside the VM, without launching the full GUI and suffering through its slowness. You'll do this by launching the VM in headless mode as described earlier, and running '' | + | * Test code inside the VM, without launching the full GUI and suffering through its slowness. You'll do this by launching the VM in headless mode as described earlier, and running '' |
/var/lib/dokuwiki/data/attic/vm/headless.1550870444.txt.gz · Last modified: 2019/02/22 15:20 by markpcohen