This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
box:qemu [2024/09/05 23:50] manu |
box:qemu [2024/09/06 21:03] (current) manu |
||
---|---|---|---|
Line 57: | Line 57: | ||
qemu-system-x86_64 -k fr -m 512 -drive file=/Virtual_srv/qemu/rocky9_01_disk.img,format=qcow2 -boot d -cdrom /home/manu/Downloads/Rocky-9.4-x86_64-minimal.iso -nographic -netdev user,id=mynet0 -device e1000,netdev=mynet0 | qemu-system-x86_64 -k fr -m 512 -drive file=/Virtual_srv/qemu/rocky9_01_disk.img,format=qcow2 -boot d -cdrom /home/manu/Downloads/Rocky-9.4-x86_64-minimal.iso -nographic -netdev user,id=mynet0 -device e1000,netdev=mynet0 | ||
+ | <code> | ||
virt-install \ | virt-install \ | ||
--memory 1024 \ | --memory 1024 \ | ||
Line 74: | Line 74: | ||
--graphics none \ | --graphics none \ | ||
--import | --import | ||
+ | </code> | ||
+ | |||
+ | <cli prompt='$'> | ||
+ | manu@manu:~$ virsh domiflist rocky9 | ||
+ | Interface Type Source Model MAC | ||
+ | ------------------------------------------------------------- | ||
+ | vnet0 network default virtio 52:54:00:56:fe:1e | ||
+ | |||
+ | manu@manu:~$ virsh list | ||
+ | Id Name State | ||
+ | ------------------------ | ||
+ | 1 rocky9 running | ||
+ | |||
+ | manu@manu:~$ virsh shutdown rocky9 | ||
+ | Domain 'rocky9' is being shutdown | ||
+ | |||
+ | manu@manu:~$ virsh list | ||
+ | Id Name State | ||
+ | -------------------- | ||
+ | |||
+ | manu@manu:~$ virsh start rocky9 | ||
+ | Domain 'rocky9' started | ||
+ | |||
+ | manu@manu:~$ virsh list | ||
+ | Id Name State | ||
+ | ------------------------ | ||
+ | 2 rocky9 running | ||
+ | </cli> | ||
+ | |||
+ | Review the provision from the Host OS. | ||
+ | <cli prompt='$'> | ||
+ | manu@manu:~$ virsh domblklist FMGinternal | ||
+ | |||
+ | Target Source | ||
+ | ---------------------------------------- | ||
+ | |||
+ | hda /srv/VMs/fmg.qcow2 | ||
+ | hdb /srv/VMs/fortimanager.qcow2 | ||
+ | vdb /srv/VMs/fortimanager2.qcow2 | ||
+ | |||
+ | |||
+ | manu@manu:~$ virsh domblkinfo FMGinternal vdb --human | ||
+ | |||
+ | Capacity: 80.000 GiB | ||
+ | Allocation: 196.000 KiB | ||
+ | Physical: 193.250 KiB | ||
+ | </cli> | ||
+ | |||
+ | **In the Host OS:** | ||
+ | |||
+ | If the 'virsh' command hangs during some operations, restart it. If it still hangs, review the rights of the user and the logs for more clues. | ||
+ | systemctl restart libvirtd | ||
+ | |||
+ | Review the logs with 'journalctl' and press G to go to the latest ones. | ||
+ | journalctl -b 0 |