@@ -4,7 +4,12 @@ Example using 8GB of RAM and 8 CPU cores:
44$ qemu-system-x86_64 -m 8096 -enable-kvm -smp 8 -netdev user,id=mynet.0,hostfwd=tcp::18000-:18000,hostfwd=tcp::18010-:18010 -device virtio-net-pci,netdev=mynet.0 -hda devstack-bullseye.qcow2
55```
66
7+ If this doesn't work for you, consider the following options.
8+
79# GNOME Boxes
10+
11+ If you're in a GNOME environment, you can either use [ Boxes] ( https://wiki.gnome.org/Apps/Boxes ) or [ virt-manager] ( https://virt-manager.org/ ) . Both should be installable via your package manager of choice.
12+
813## Create the VM in Boxes
914### Create a new VM from file
1015![ create vm] ( media/boxes_create_vm.png )
@@ -15,8 +20,57 @@ $ qemu-system-x86_64 -m 8096 -enable-kvm -smp 8 -netdev user,id=mynet.0,hostfwd=
1520### Select 8+ GB of ram, create VM
1621![ create vm] ( media/boxes_add_ram.png )
1722
23+ ## Create the VM in virt-manager
24+
25+ Alternatively, you can create the VM in virt-manager. Open it up, click on new VM, and choose ` Import existing disk image ` .
26+
27+ ![ create vm] ( media/virtmanager_create_vm.png )
28+
29+ Then, browse to the location where you extracted from the zip file, and select it:
30+
31+ ![ import_image] ( media/virtmanager_import_image.png )
32+
33+ Now select "Debian 11" as the OS:
34+
35+ ![ select os] ( media/virtmanager_select_os.png )
36+
37+ Give the VM 8192 MiB or more of RAM and at least 2 CPU cores. 16384 MiB and 4 cores are recommended, if you have the hardware to spare.
38+
39+ ![ hardware] ( media/virtmanager_hardware.png )
40+
41+ Review settings and click "Finish."
42+
43+ ![ review settings] ( media/virtmanager_review_settings.png )
44+
45+ After a short while, a terminal window will pop up showing the operating system boot process.
46+
47+ ![ booted] ( media/virtmanager_booted.png )
48+
1849## Set up port forwarding
19- ### Find your VM with ` virsh `
50+
51+ There are two ways to do port forwarding. We'll start with the simplest one, using SSH.
52+
53+ ### SSH port forwarding
54+
55+ First, find the IP of your VM:
56+
57+ ``` bash
58+ $ virsh net-dhcp-leases default
59+ Expiry Time MAC address Protocol IP address Hostname Client ID or DUID
60+ ------------------------------------------------------------------------------------------------------------------...
61+ 2023-03-27 18:27:25 52:54:00:91:92:02 ipv4 192.168.122.77/24 devstack-bullseye ff:00:91:92:02:00:01...
62+ ```
63+ In this example, the IP address is ` 192.168.122.77 ` . In your case, it will be different. SSH into it using the following command, substituting ` 192.168.122.77 ` with the IP address you obtained above. The password is ` devstack ` .
64+
65+ ```
66+ $ ssh -L 18000:localhost:18000 -L 18010:localhost:18010 devstack@192.168.122.77
67+ ```
68+
69+ ### QEMU port forwarding
70+
71+ One can also use QEMU's [ native port forwarding] ( https://wiki.archlinux.org/title/QEMU#QEMU's_port_forwarding ) if SSH is not desirable.
72+
73+ #### Find your VM with ` virsh `
2074
2175` virsh list ` or ` virsh -c qemu:///session list --all `
2276
@@ -34,7 +88,7 @@ $ virsh -c qemu:///session list --all
3488 3 debian11 running
3589```
3690
37- ### Edit your VM config using ` virsh `
91+ #### Edit your VM config using ` virsh `
3892
3993```
4094$ virsh edit debian11
@@ -59,7 +113,3 @@ add command line stuff to the end
59113 <qemu : arg value =' virtio-net-pci,netdev=mynet.0,bus=pcie.0,addr=0x3' />
60114 </qemu : commandline >
61115```
62-
63- # ` virt-manager `
64- [ virt-manager] ( https://virt-manager.org/ ) is another GUI based option for Linux. Make sure ports ` 18000 ` and ` 18010 ` are forwarded.
65-
0 commit comments