![]() So, for a 10G disk, you will have a 10G file. Now wait until Ubuntu 20.04 is installed and the VM reboots.If you create a fixed-size image, an image file will be created on your host system which has roughly the same size as the virtual disk's capacity. Soon a prompt stating: Continue with autoinstall? (yes|no) The virtual machine will boot and validate the Autoinstallation configuration. Now, start the virtual machine that was created previously. Set this drive to “IDE Primary Slave” and select the seed.iso file created earlier. Set the new optical drive to “IDE Primary Master” and select the Ubuntu 20.04 live-server ISO.Īdd another optical drive. This will make it easier to SSH into the VM later without havingįinally, go to “Storage.” To the right of “Controller: IDE,” add an optical drive. ![]() Change “Attached to” from “NAT” to “Bridged Adapter” and leave the default values. Next, navigate to “Network -> Adapter 1”. This isn’t required but helps speed up the process. Under “System -> Processor,” I provided 4 CPUs. ![]() Once the VM is created, click “Settings” on the new VM. I left the defaults and clicked through the wizard. I named mine ubuntu and allocated 4GB of RAM. Open VirtualBox and click “New” to create a new VM. cloud-localds createsĪn ISO with a cidata volume, which is what autoinstall and cloud-init both look for. It’s common to see this file named seed, but not aĬloud-localds is focused on cloud-init but works for Autoinstallation too. To create an ISO with autoinstall configuration, navigate to the directory where the user-data file exists and run: This will enable logging in via SSH once the VM is created. Note: replace the ssh_authorized_keys content with the content of your public SSH key. This network configuration will set a static IP address of 192.168.0.137 for the server. I’m using match.name: en* to prevent having to know the ethernet interface name in advance. The network section matches the Netplan configuration. The network block is a little wonky and the duplicate network is intentional and required due to a bug. Within the user-data, we’reĬreating the dustin user that may only login via SSH. I’m using this to prevent having to set a password for a default user. The user-data key allows us to use cloud-init configuration. The Autoinstallation documentation describes other available configuration options. ![]() add a public SSH key to later SSH in as dustin.prevent logging in as dustin with a password.set the server’s hostname to ubuntu-server.#cloud-config autoinstall : version : 1 user-data : hostname : ubuntu-server users : - name : dustin lock_passwd : true ssh_authorized_keys : - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC9bAo+yzhzI/+FaeBj0i+HNy7O5BQ/mCMEHghvuAtH8XMJxGjikTPiC0t3YZ28XCyP+laRTVY6kdaWMCB5j40FE+UGco6YgXjW+dI0P/b0Idq+V9xTEJnPG元M1uurQQuBClPs3Ns8aYUiNKxniQqFf4XrmGzqmNxtbtgrjXhrpApqx2u196iPf6/ZJtvZ0+VdwyEO5hNgHUbsDBSN7zicFfzCcbrDFCZ4d2N圜7gD76dh3/cmRSTYPS23UNfZi9eBj85bzG7CM0+eeHa4NbWWZR2iJcfgQ/EKb5TtYIHf4d6G7uGZ9dLbn3fyaxsTUA9LsMEOhjePV4IRrltsfXIXrR5+oQAJsUHxo0bOUQTP4h3sm55BRoZHJqfMmKQ42jAYK1ESuQi036hyocf+brTnkSTgo03XzHc3hGFtwNANa7pSBT/KMALzdJn6OBurrexB5tbLplb88R2R5INFuvzYEjiZ42YkfR3JJMWgU/YRbSTo+WBJeyI1eIpeTOGciis= sudo : ALL=(ALL) NOPASSWD:ALL ssh : install-server : true network : network : version : 2 ethernets : enwild : match : name : en* addresses : - 192.168.0.137 /24 dhcp4 : false gateway4 : 192.168.0.1 nameservers : addresses : - 192.168.0.1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |