Using a single M.2 (that Proxmox is also in) to host multiple VMs. I need guidance on how exactly to do this.

Roguestratus

New Member
Nov 24, 2022
11
1
3
I'm relatively new to Proxmox.
I'm using an Optiplex 5060 w/ i7-8700 + 32gb DDR4.
The purpose of this is to create a homelab to experiment and host some of my own services and to learn.
Proxmox is installed in a 500gb M.2 NVME drive, and 2x 2tb enterprise 2.5" SSDs that will be RAID1 in TrueNAS. Because of what I have planned, I don't want to install VMS in these 2.5" drives and I only want to use my M.2 drive to host my vms.
I tried really hard to find a step by step guide on using the same host disk to create VMS, but couldn't find any.
Can anyone point me in the right direction what exactly to do to host multiple vms on the name M.2 host drive?

I also want to say that while I understand its a good idea to have my host disk be separate, its a risk i'm willing to take. Again, I only want my 2.5" drives to strictly be used in a NAS.
 
I would not recommend it as it this will lead to issues, but you could do the following;

1. ⁠Create a folder in your proxmox host eg mkdir /mnt/storage

2. ⁠On the gui click on Datacentre > Storage > Add > Directory

3. ⁠ID is a name/label, Directory is the path to the folder (/mnt/storage)

4. ⁠Click the content dropdown which allows you to select what content is stored and select everything

5. ⁠Click Add

6. Create VM/LVC and select ID name/label as storage location

I would recommend either proxmox on a USB and the NVme for your storage location, adding another drive or the NAS.
 
How exactly will it lead to issues? Just curious what are the consequences of doing that?
 
Last edited:
If the drive becomes corrupt it can be a challenge to get working and depending on how many VM/LVC you are running it can have reduced performance (however unlikely to be noticeable with NVme). The other reason if PVE does get corrupt and requires a fresh install it will ease the disk so ensure you backup your data. But it’s more a preference nothing stopping you from trying it out.
 
I would not recommend it as it this will lead to issues, but you could do the following;

1. ⁠Create a folder in your proxmox host eg mkdir /mnt/storage

2. ⁠On the gui click on Datacentre > Storage > Add > Directory

3. ⁠ID is a name/label, Directory is the path to the folder (/mnt/storage)

4. ⁠Click the content dropdown which allows you to select what content is stored and select everything

5. ⁠Click Add

6. Create VM/LVC and select ID name/label as storage location

I would recommend either proxmox on a USB and the NVme for your storage location, adding another drive or the NAS.
Also, I can't add another drive inside the computer but I would assume putting Proxmox on a decent 64-128gb SSD w/ enclosure and connecting through USB would suffice?
 
Last edited:
Also, I can't add another drive inside the computer but I would assume putting Proxmox on a decent 64gb SSD w/ enclosure and connecting through USB would suffice?
It should however this also depends on what VMs/LVC you plan to run. An alternative is a backup of the NVme to a USB.
 
I don't see your problem. When installing PVE it formats the disk by default to be used for system and as a VM/LXC storage.
When choosing LVM it creates a "local" storage for files/folder as well as the root filesystem and a "local-lvm" storage just for VMs (I think 1/4 of the capacity for "local" and 3/4 for "local-lvm" by default, but you could change that).
When choosing ZFS it will create a "local" storage for files/folder as well as root filesystem and a "local-zfs" storage to store your VMs/LXCs (both storages can make use of the full capacity but 20% should always be kept free for ZFS to work properly).
 
Last edited:
  • Like
Reactions: leesteken
I don't see your problem. When installing PVE it formats the disk by default to be used for system and as a VM/LXC storage.
When choosing LVM it creates a "local" storage for files/folder as well as the root filesystem and a "local-lvm" storage just for VMs (I think 1/4 of the capacity fpr "local" and 3/4 for "local-lvm" by default, but you could change that).
When choosing ZFS it will create a "local" storage for files/folder as well as root filesystem and a "local-zfs" storage to store your VMs/LXCs (both storages can make use of the full capacity but 20% should always be kept free for ZFS to work properly).
I guess the main thing is I just wanted to make sure if I'm installing vms on the same disk Proxmox is also in, I'm doing it right.
 
In my opinion your biggest problem is that you didn't mirrored all your disks. Lose that M.2 disk and all your services won't run and you won't be able to access the files on your TrueNAS for probably days. And you will lose all the data since your last backup. That can be really bad.
Lets say you selfhost a centralized password safe where you store all your passwords (and nowhere else like in the browser, which is the point of a backup safe ;)). You did a backup yesterday but today you changed the PIN of your online banking. Then your M.2 fails and you lose all your VMs, including the one hosting your password safe. Now you won't be able to log in on any webpage until you bought a new M.2 SSD, installed everything from scratch and restored all guests. After maybe 2 days or so, your server is working again and you can login at most websites, but you still won't be able to do any financial transactions, as your online banking password is lost forever, because that was changed after the last backup was made. So you have to call your bank and let them send a letter with a new online banking password which will takes even more days.
And this is the good case where you can ask your bank for a new password. You could also have lost your password of an encrypted 20TB HDD. Then all those 20TB of data would be lost forever with no way to ever access it again.

Would be so much less work, no data loss and less frustration with a mirrored system/VM storage disk. Then a failed SSD wouldn't care you (except the price for replacing it) but no data will be lost, no downtime and everything would continue working as it should. And SSDs will fail...its not about if...just how fast.
 
Last edited:
RUnning on 1 m2 drive is all ok. Just install and set ext4 , and rootvz put like 32g and for the thinvz lvm put 20g. So for a total of 50g you get prox fully working. When you did get the grub failure or issues, no problem, play a fix or just erase and put prox back. But all your vm will be into an extra partition that you created. No zfs stuff, a simple extra partition and you have full access to the vm and do backup to the hdd spinner drive.