Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs225
vm
Commits
12ab7595
Commit
12ab7595
authored
8 years ago
by
Jeffrey Tolar
Browse files
Options
Downloads
Patches
Plain Diff
Use systemd-networkd; work around VirtualBox issues
parent
e57f2639
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
create_vm.sh
+16
-7
16 additions, 7 deletions
create_vm.sh
with
16 additions
and
7 deletions
create_vm.sh
+
16
−
7
View file @
12ab7595
...
...
@@ -13,7 +13,6 @@ PACKAGES=(# Core packages
base-devel
linux-lts
{
,-headers
}
# use lts because current VirtualBox (~5.1.2) doesn't play nicely with the new (4.7) kernel
grub
ifplugd
# X things
virtualbox-guest-dkms
virtualbox-guest-utils
...
...
@@ -52,6 +51,10 @@ PACKAGES=(# Core packages
valgrind
iverilog
# cs233
)
IGNORE_PACKAGES
=(
linux
# using linux-lts
netctl dhcpcd
# using systemd-networkd
)
set
-e
-x
...
...
@@ -108,8 +111,7 @@ else
fi
sudo
arch-chroot root/
<<
chrootEOF
# Remove the non-lts kernel
pacman -R --noconfirm linux
pacman -Rs --noconfirm
${
IGNORE_PACKAGES
[@]
}
# random setup - hostname, timezone, locales
echo cs2xx-vm > /etc/hostname
...
...
@@ -122,10 +124,16 @@ echo LANG=en_US.UTF-8 > /etc/locale.conf
# networking
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/wired
netctl enable wired
systemctl enable netctl-sleep.service
systemctl enable netctl-ifplugd@eth0.service
ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
sed -i '/^hosts:/ s/
\<
dns
\>
/resolve/' /etc/nsswitch.conf
systemctl enable systemd-networkd systemd-resolved.service
cat > /etc/systemd/network/wired.network <<"networkEOF"
[Match]
Name=eth0
[Network]
DHCP=ipv4
networkEOF
# setup pacman keyring
...
...
@@ -307,6 +315,7 @@ VBoxManage modifyvm "$uuid" \
--biosbootmenu
disabled
\
--rtcuseutc
on
\
--nic1
nat
\
--cableconnected1
on
\
--clipboard
bidirectional
\
--draganddrop
bidirectional
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment