| 1 | == VMs at hera == |
| 2 | |
| 3 | In order to create a new VM based on the template at hera: `cslab@hera:/store/vm/` |
| 4 | |
| 5 | 1. `cp -r template <new_vm_name>` |
| 6 | |
| 7 | 2. `cd <new_vm_name>` |
| 8 | |
| 9 | 3. Modify appropriately the define.xml file: |
| 10 | - Change the VM name |
| 11 | - Change the vcpus number and RAM size appropriately |
| 12 | - Delete the boot dev=cdrom attribute |
| 13 | - Delete the comments |
| 14 | - Change the MAC address |
| 15 | - Change the source file of the disks. |
| 16 | |
| 17 | 4. `virsh create define.xml` |
| 18 | |
| 19 | 5. `virsh console <new_vm_name>` |
| 20 | |
| 21 | 6. change the VM's hostname at `/etc/hostname` |
| 22 | |
| 23 | 7. modify entries in `/etc/hosts` |
| 24 | |
| 25 | 8. reboot |
| 26 | |
| 27 | 9. Setup DHCP for enp1s0: `vi /etc/network/interfaces` (under auto lo and iface): `auto enp1s0 iface enp1s0 inet dhcp` |
| 28 | |
| 29 | 10. (optional) setup static ip address if necessary |
| 30 | |
| 31 | 11. `apt update && apt upgrade` |
| 32 | |
| 33 | 12. `apt install openssh-server` |
| 34 | |
| 35 | 13. `mkdir -m 700 /root/.ssh/` |
| 36 | |
| 37 | 14. `touch -m 600 /root/.ssh/authorized_keys` |
| 38 | |
| 39 | 15. put the appropriate ssh keys inside |
| 40 | |
| 41 | 16. `ssh` and have fun!! |
| 42 | |
| 43 | |
| 44 | put the appropriate ssh keys inside |
| 45 | ssh and have fun!! |
| 46 | Give feedback |