diff options
| author | Fonzie Huang <hxf.prc+web@gmail.com> | 2026-07-14 21:33:03 +0800 |
|---|---|---|
| committer | Gabriel Wicki <gabriel@erlikon.ch> | 2026-07-17 16:50:13 +0200 |
| commit | 1c262bf03b11cee757bbf597d265ad03996c53bf (patch) | |
| tree | 7f798ee148cc84642b07f4ff5f896706152cc4cc | |
| parent | 640d2ab8b34b791be157cc0d027d751c2a7f31cb (diff) | |
doc: Add a more complete Qemu example for new comers.
* doc/guix.texi (Running Guix in a VM): Update Qemu command example.
Signed-off-by: Gabriel Wicki <gabriel@erlikon.ch>
| -rw-r--r-- | doc/guix.texi | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 15f6adfdb08..11138951c6d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -51251,6 +51251,37 @@ name=com.redhat.spice.0 | |||
| 51251 | You'll also need to add the @code{(spice-vdagent-service)} to your | 51251 | You'll also need to add the @code{(spice-vdagent-service)} to your |
| 51252 | system definition (@pxref{Miscellaneous Services, Spice service}). | 51252 | system definition (@pxref{Miscellaneous Services, Spice service}). |
| 51253 | 51253 | ||
| 51254 | Here is a working example with QEMU @samp{10.0.8}: | ||
| 51255 | |||
| 51256 | @example | ||
| 51257 | qemu-system-x86_64 -nic user,model=virtio-net-pci -enable-kvm -m 2048 \ | ||
| 51258 | -device virtio-blk,drive=myhd \ | ||
| 51259 | -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5 \ | ||
| 51260 | -device virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0 \ | ||
| 51261 | -chardev spicevmc,name=vdagent,id=vdagent \ | ||
| 51262 | -spice addr=::1,port=5930,disable-ticketing=on \ | ||
| 51263 | -drive if=none,file=guix-system-vm-image-@value{VERSION}.x86_64-linux.qcow2,id=myhd | ||
| 51264 | @end example | ||
| 51265 | |||
| 51266 | @quotation Note | ||
| 51267 | Without the @samp{addr=::1} of the @samp{-spice} option, it will listen | ||
| 51268 | on any IPv4 address (that is @samp{0.0.0.0}) on your host. And one might | ||
| 51269 | be able to connect to the guix VM from other host on your network. | ||
| 51270 | @end quotation | ||
| 51271 | |||
| 51272 | @quotation Note | ||
| 51273 | QEMU will modify the .qcow2 image file while running. Back up the image | ||
| 51274 | file beforehand if you want to keep it untouched. | ||
| 51275 | @end quotation | ||
| 51276 | |||
| 51277 | After running the above command, the terminal will stay in a blocking | ||
| 51278 | state, and to connect to the virtual machine, you can run the following | ||
| 51279 | command on a different terminal: | ||
| 51280 | |||
| 51281 | @example | ||
| 51282 | remote-viewer spice://[::1]:5930 | ||
| 51283 | @end example | ||
| 51284 | |||
| 51254 | @node Defining Services | 51285 | @node Defining Services |
| 51255 | @section Defining Services | 51286 | @section Defining Services |
| 51256 | 51287 | ||
