Work for root and upgrade osinfo
This commit is contained in:
parent
581a78c236
commit
c57cd85ca4
1 changed files with 11 additions and 3 deletions
|
@ -1,6 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
_acp_vm_root="$HOME/virt/images"
|
if [ $(id -u) -eq 0 ]
|
||||||
_acp_vm_session=qemu:///session
|
then
|
||||||
|
_acp_vm_root=/srv/virt/images
|
||||||
|
_acp_vm_session=qemu:///system
|
||||||
|
else
|
||||||
|
_acp_vm_root="$HOME/virt/images"
|
||||||
|
_acp_vm_session=qemu:///session
|
||||||
|
fi
|
||||||
_acp_vm_name=${1:---help}
|
_acp_vm_name=${1:---help}
|
||||||
|
|
||||||
case "$_acp_vm_name" in
|
case "$_acp_vm_name" in
|
||||||
|
@ -18,8 +24,10 @@ then
|
||||||
mkdir -p "$_acp_vm_root"
|
mkdir -p "$_acp_vm_root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# To get a list of valid osinfo options, run:
|
||||||
|
# virt-install --osinfo list
|
||||||
virt-install --connect $_acp_vm_session \
|
virt-install --connect $_acp_vm_session \
|
||||||
--osinfo linux2020 \
|
--osinfo linux2022 \
|
||||||
--boot uefi \
|
--boot uefi \
|
||||||
--cpu host-passthrough \
|
--cpu host-passthrough \
|
||||||
--disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \
|
--disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \
|
||||||
|
|
Loading…
Reference in a new issue