1
0
Fork 0

Fix VM management

This commit is contained in:
Florian RICHER 2023-05-04 09:01:43 +02:00
parent a4f981506f
commit 65e686409c
No known key found for this signature in database
GPG key ID: 6BF27BF8A1E71623
2 changed files with 5 additions and 3 deletions

View file

@ -10,10 +10,12 @@
echo "COPY BASE IMG"
cp work/base.qcow2 work/image.qcow2
sudo virt-install --name FedoraServer \
# sudo systemctl enable --now libvirtd
# sudo virsh --connect qemu:///session net-start default
virt-install --connect qemu:///session --name FedoraServer \
--memory 8192 --cpu host --vcpus 4 --graphics none \
--os-variant fedora-unknown \
--import \
--disk work/image.qcow2,format=qcow2,bus=virtio \
--network type=direct,source=enp8s0,source_mode=bridge,model=virtio \
--network bridge=virbr0,model=virtio

2
run.sh
View file

@ -1,4 +1,4 @@
#!/bin/sh
echo "START VM"
sudo virsh --connect qemu:///system start FedoraServer --console
virsh --connect qemu:///session start FedoraServer --console