[SOLVED] How to add a new virtual disk to VM?

Serhioromano

New Member
Jun 12, 2023
25
3
3
I know this question sounds trivial and redundant but I did not find exactly what I want. I added new virtual drive to my VM easy. Just go to Hardware, add disk and that is done. I try to add another disk to my Home Assistant VM with is Alpine linux. Now with lsblk I can see my new sdb disk is there but without partitions. What I cannot understand is how do I

1. Create a partition and format it
2. How to mount it to a particular folder in my HA OS?

Any operation I try to do gives me Operation not permitted. I try fdisk, cfdisk, ... of cause with sudo all the tools I know and same result. What could be the problem on the level of PVE I did not setup some access or on the level of OS? I know that whoami = root. Why cannot I access virtual disks?

My task is this. In Home assistant I have NVR add-on and I want to mount that disk to a folder where it saves videos. Sound like a simple task but whole day no result.
 
That has nothing to do with PVE. PVE is only providing the virtual hardware, which it did, as you see the sdb. Everything else, what to do with that new disk, completely depends on the guestOS running inside your VM.

I personally would create a new dedicated VM/LXC as your NVR, unless you already passed through a GPU to the HomeAssistant VM anyway.
 
Last edited:
That has nothing to do with PVE. PVE is only providing the virtual hardware, which it did, as you see the sdb. Everything else, what to do with that new disk, completely depends on the guestOS running inside your VM.

I personally would create a new dedicated VM/LXC as your NVR, unless you already passed through a GPU to the HomeAssistant VM anyway.
Once I'd seen a tutorial now to set ACL rules to allow access to disk in VM I thought may be that is a reason

As @Dunuin said, this question is for a "home assistant" forum. If I had to guess - you are not logged in as root, and need to preface your commands (if you are using cli) with "sudo", if HA provides this option.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I run with `sudo` too. the `whoami` command tells me that I am a root user.
 
That has nothing to do with PVE. PVE is only providing the virtual hardware, which it did, as you see the sdb. Everything else, what to do with that new disk, completely depends on the guestOS running inside your VM.

I personally would create a new dedicated VM/LXC as your NVR, unless you already passed through a GPU to the HomeAssistant VM anyway.
I thought about that. That would be an easy way as I can mount point ZFS dataset there. But I have spent whole day to configure it inside HA VM and have very little please to completely redo everything. Also I do not see any difference that Frigate NVR in docker container in Home assistant OF or in a different LXC. To me it will take same amount of CPU from Host machine and do not give me any advantage apart from more simple mount point.

But I agree that ideally it should be in a different LXC and if I would start over again from start, I would create a separate container.
 
Once I'd seen a tutorial now to set ACL rules to allow access to disk in VM I thought may be that is a reason
once the disk is given to VM by hypervisor - there are no ACLs or other restrictions enforced by hypervisor in 99% of cases. One percent being reserved for very special custom configs, which you would likely know if you had that. Its completely up to your VM OS.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Also I do not see any difference that Frigate NVR in docker container in Home assistant OF or in a different LXC. To me it will take same amount of CPU from Host machine and do not give me any advantage apart from more simple mount point.
Except better isolation and therefore better security, easier migrations, more granular backups and more flexible management? Basically all the points why you want your services in dedicated containers/VMs instead of just installing everything bare metal.
 
Last edited:
Except better isolation and therefore better security, easier migrations, more granular backups and more flexible management? Basically all the points why you want your services in dedicated containers/VMs instead of just installing everything bare metal.
I have more 15 containers. I try to isolate everything. But this NVR I do not plan to use outside of Home Assistant. SO I thought that it would be nice to group all HA related service to that VM. For instance I also use MQTT server there ass Add-on because it is only for HA no other service use it. For me logically it made sense to install Frigate inside HA OS.

But now I am in a sort of locked circle. I have no enough rights to partition disk, I cannot setup ssh with rights because it required USB flash with special label. Looks like there is no way to add that disk there and only option is to increase size of primary HA OS disk.
 

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!