From ea435049b3a3f5057b3a894040df3cf4f3256d9e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 23 Apr 2023 22:33:49 +0200 Subject: Refactored syntax highlighting shortcodes into markdown --- content/blog/commands/qemu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'content/blog/commands/qemu.md') diff --git a/content/blog/commands/qemu.md b/content/blog/commands/qemu.md index 294c9a9..b4301a8 100644 --- a/content/blog/commands/qemu.md +++ b/content/blog/commands/qemu.md @@ -10,23 +10,23 @@ tags: ## Quickly launch a qemu vm with local qcow as hard drive In this example I am using the docker0 bridge because I do not want to have to modify my shorewall config, but any proper bridge would do : -{{< highlight sh >}} +```sh ip tuntap add tap0 mode tap brctl addif docker0 tap0 qemu-img create -f qcow2 obsd.qcow2 10G qemu-system-x86_64 -curses -drive file=install65.fs,format=raw -drive file=obsd.qcow2 \ -net nic,model=virtio,macaddr=00:00:00:00:00:01 -net tap,ifname=tap0 qemu-system-x86_64 -curses -drive file=obsd.qcow2 -net nic,model=virtio,macaddr=00:00:00:00:00:01 -net tap,ifname=tap0 -{{< /highlight >}} +``` The first qemu command runs the installer, the second one just runs the vm. ## Launch a qemu vm with your local hard drive My use case for this is to install openbsd on a server from a hosting provider that doesn't provide an openbsd installer : -{{< highlight sh >}} +```sh qemu-system-x86_64 -curses -drive file=miniroot65.fs -drive file=/dev/sda -net nic -net user -{{< /highlight >}} +``` ## Ressources -- cgit v1.2.3