From 53145f425df48e6421984c5620d55f0d6f5c04b1 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 23 Feb 2024 21:07:03 -0700 Subject: [PATCH] Punt VBoxManage unattended install, and startvm headless. Start new machines on the default NAT and prepare them there, then move them to the simulated campus. --- README.org | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/README.org b/README.org index 6be2474..681fdc4 100644 --- a/README.org +++ b/README.org @@ -6818,22 +6818,16 @@ function create_vm { VBoxManage storageattach $NAME --storagectl "IDE Controller" \ --port 0 --device 0 --type dvddrive --medium $ISO VBoxManage modifyvm $NAME --boot1 dvd --boot2 disk - VBoxManage unattended install $NAME --iso=$ISO \ - --locale en_US --country US \ - --hostname $NAME.small.private \ - --user=sysadm --password=fubar \ - --full-user-name=System\ Administrator } #+END_SRC After this shell function creates a VM, its network interface is -typically attached to the NAT network ~premises~, simulating the -Internet connected network where actual hardware will be prepared. +attached to the default NAT network, simulating the Internet connected +network where actual hardware is prepared. Here are the commands needed to create the test machine ~front~ with 512MiB of RAM and 4GiB of disk and the Debian 11.3.0 release in its -CDROM drive, to put ~front~ on the Internet connected NAT network -~premises~, and to boot ~front~ into the Debian installer. +CDROM drive. #+BEGIN_SRC sh NAME=front @@ -6841,8 +6835,6 @@ RAM=512 DISK=4096 ISO=~/Downloads/debian-11.3.0-amd64-netinst.iso create_vm -VBoxManage modifyvm $NAME --nic1 natnetwork --natnetwork1 premises -VBoxManage startvm $NAME --type headless #+END_SRC The machine's console should soon show the installer's first prompt: @@ -6917,6 +6909,7 @@ it gets a second network interface attached to the host-only network ~vboxnet1~ and is given the local address ~192.168.57.3~. #+BEGIN_SRC sh +VBoxManage modifyvm front --nic1 natnetwork --natnetwork1 premises VBoxManage modifyvm front --nic2 hostonly --hostonlyadapter2 vboxnet1 #+END_SRC @@ -6946,14 +6939,11 @@ instructions in the final section: [[* Ansible Test Authorization][Ansible Test The ~gate~ machine is created with the same amount of RAM and disk as ~front~. Assuming the ~RAM~, ~DISK~, and ~ISO~ shell variables have -not changed, ~gate~ can be created with two commands, then connected -to NAT network ~premesis~ and booted with two more. +not changed, ~gate~ can be created with two commands. #+BEGIN_SRC sh NAME=gate create_vm -VBoxManage modifyvm gate --nic1 natnetwork --natnetwork1 premises -VBoxManage startvm gate --type headless #+END_SRC After Debian is installed (as detailed in [[*A Test Machine][A Test Machine]]) and the @@ -7017,8 +7007,6 @@ NAME=core RAM=2048 DISK=6144 create_vm -VBoxManage modifyvm core --nic1 natnetwork --natnetwork1 premises -VBoxManage startvm core --type headless #+END_SRC After Debian is installed (as detailed in [[*A Test Machine][A Test Machine]]) and the @@ -7192,9 +7180,8 @@ NAME=dick RAM=2048 DISK=8192 create_vm -VBoxManage modifyvm $NAME --nic1 hostonly --hostonlyadapter1 vboxnet1 VBoxManage modifyvm $NAME --macaddress1 080027dc54b5 -VBoxManage startvm $NAME --type headless +VBoxManage modifyvm $NAME --nic1 hostonly --hostonlyadapter1 vboxnet1 #+END_SRC Dick's notebook, ~dick~, is initially connected to the host-only -- 2.25.1