-
Notifications
You must be signed in to change notification settings - Fork 1
enables make vm-create in gentoo linux #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
enables make vm-create in gentoo linux #1
Conversation
60e7c66
to
4ebc4fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I think spliting everything in little bash functions enhances the readability. I added some comments regarding required changes to make everthing in the same standard I'm using and removing unneeded commands.
if is_gentoo; then | ||
mkdir -p /var/lib/libvirt/images | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not required by Gentoo only and also could be improved to reuse the variable where the image path is stored. I prefer changing it to:
if is_gentoo; then | |
mkdir -p /var/lib/libvirt/images | |
fi | |
mkdir -p $(dirname "$DEBIAN_QCOW2") |
fi | ||
} | ||
|
||
function qemu_connect() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function name does not describe what it does (all virsh
commands connect to qemu in a way or another). I suggest config_virsh_network
.
function qemu_connect() { | |
function config_virsh_network() { |
wget -c -t 0 -O "$DEBIAN_QCOW2" "$DEBIAN_QCOW2_URL" | ||
install_libs | ||
config_permissions | ||
qemu_connect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qemu_connect | |
config_virsh_network |
|
||
if is_gentoo; then | ||
mkdir /var/lib/libvirt/shared/debian12-pydokku | ||
mkdir /var/lib/libvirt/boot | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand why those lines are needed, since there's mkdir -p "$SHARED_FOLDER"
inside create_shared_folder
already (which does the same as the first line inside the if
) and /var/lib/libvirt/boot
is not used at all.
I suggest you trying to completely remove this if
, completely remove the VM (virt-manager
could help) and running the make vm-create
without them to check if this is really required.
if is_gentoo; then | |
mkdir /var/lib/libvirt/shared/debian12-pydokku | |
mkdir /var/lib/libvirt/boot | |
fi |
No description provided.