Move hand-built VM (using 9p/virtFS) to PVE so can run standalone

dmason

New Member
Dec 2, 2024
1
0
1
Toronto, Canada
I am completely new to ProxMox as of a week ago. I am running it on a moderately-powered Ryzen with 64G of ECC memory and 8x 2TB NVME SSDs. One is faster and has boot on it; the other 7 are RAIDZ2, and I'll back up /etc to the RAID regularly (I don't know if there is anything else that I need to restore the system when the boot SSD fails (I'd appreciate any advice on that) but that's not my main point).

I came across this page to build a VM which uses virtFS/9p to let me have the actual files/directories from the VM be the ones from the host, which makes me much happier than just having an opaque n-GB block store.

I created this VM by hand, following the script in that page, and it works brilliantly. I've already used the fact that the guest files are available on the host! But I have 2 questions:
1) how do I move this hand-built VM so that ProxMox knows about it (so it can be run at boot time & managed from the GUI)?
2) how do I get VNC to work so I can access it from other computers on the network?

The command to start the VM (by an unprivileged member of group `kvm`) is:
#! /bin/sh
/usr/bin/qemu-system-x86_64 \
-machine pc,accel=kvm,usb=off,dump-guest-core=off -m 2048 \
-smp 4,sockets=4,cores=1,threads=1 \
-rtc base=utc \
-boot strict=on \
-kernel ~/vm/debian-12-bookworm/boot/vmlinuz-6.1.0-27-amd64 \
-initrd ~/vm/debian-12-bookworm/boot/initrd.img-6.1.0-27-amd64 \
-append 'root=fsRoot rw rootfstype=9p rootflags=trans=virtio,version=9p2000.L,msize=5000000,cache=mmap,p
-fsdev local,security_model=mapped,multidevs=remap,id=fsdev-fsRoot,path=$HOME/vm/debian-12-bookworm/ \
-device virtio-9p-pci,id=fsRoot,fsdev=fsdev-fsRoot,mount_tag=fsRoot \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
# -vnc 0.0.0.0:0
If I include the `-vnc` option, it stops telling me it's listening for VNC. But with or without it, it's not visible and I have to do ssh port sharing to get a VNC client to see it, and the built-into-MacOs VNC client (Screen Sharing) won't work (it asks for a password that I have no idea about). (I realize that `0.0.0.0` is a potential security risk but I will firewall it into safety.)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!