User Management in Proxmox

Proxmox VE authentication server
This is a unix like password store (/etc/pve/priv/shadow.cfg). Password are encrypted using the SHA-256 hash method. Users are allowed to change passwords.

Terms and Definitions

Users

A Proxmox VE user name consists of 2 parts: <userid>@<realm>. The login screen on the GUI shows them a separate items, but it is internally used as single string.

We store the following attribute for users (/etc/pve/user.cfg):

  • first name
  • last name
  • email address
  • expiration date
  • flag to enable/disable account
  • comment
  • Superuser

The traditional unix superuser account is called ‘root@pam’. All system mails are forwarded to the email assigned to that account. Continue reading “User Management in Proxmox” »

Share

Understanding Virtualbox network interfaces

To create and experiment with all kinds of networks without the risk (or taking the trouble) of creating an actual one. And here is where VirtualBox excels by providing several options for networking out of the box. VirtualBox installs an additional NIC (Network Interface Card) on your host computer to identify itself while communicating with the guest. By default the host gets an IP address of 192.168.56.1. You can change the network modes, IP and other network settings by right-clicking your virtual machine on the left and clicking Settings. These are the networking modes that work with VirtualBox guest computers:

NAT (Default)
Host-only Network (Most secure)
Bridged Network (Least secure)
Internal-Network (Betweeen guests only)
Not Attached (No connectivity, guest isolated)
NAT: By default, the networking mode for your virtual machine is NAT (Network Address Translation) mode. This works something like this: Continue reading “Understanding Virtualbox network interfaces” »

Share

Virtualbox Disk Reduce or Disk Compact

You have to do the following steps:

1. Run defrag in the guest (Windows only)

Nullify free space: With a Linux Guest run this:

sudo dd if=/dev/zero of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile

Or:

telinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1

Or

sudo apt-get install secure-delete
sfill -f -z -l -l -I -v /

Continue reading “Virtualbox Disk Reduce or Disk Compact” »

Share

Cloning Openvz Proxmox PVE container guest machine

  1. I first created a ‘template’ vm containing all stuff I need and using a temporarily ip adres.
  2. In the network config file of eth0 (/etc/sysconfig/network-scripts/ifcfg-eth0) I comment out the HWADDRESS line, else it will not come up with another mac address…
  3. Stop this ‘template’ vm as it is just used for cloning.
  4. Create a backup : vzdump –dumpdir /path/to/backupdir –snapshot 101
  5. Restore in new container : vzrestore /path/to/backupdir/backupfile_of_container_101 102 or vzrestore –storage ‘storagename’ /path/to/backupdir/backupfile_of_container_101 102
  6. Create a new mac for eth0 : vzctl set 102 –netif_add eth0
  7. Modify the hostname in the proxmox webinterface.
  8. Bootup the vm and open a vnc console.
  9. Change the ip address in /etc/sysconfig/network-scripts/ifcfg-eth0
  10. Go to /etc/ssh and remove all keys : rm -f /etc/ssh/*key*
  11. Restart the ssh server so it will regenerate keys : service sshd restart
Share

Allow NFS attachment on Proxmox OpenVZ containers

Prepare the container

To allow a container to use NFS filesystem, you will need to start it with “nfs” feature enabled. If the container is running while you set the –features nfs:on, you will need to reboot it.

# vzctl set 101 --features "nfs:on" --save
# vzctl start 101

After this you may see nfs in /proc/filesystems

# vzctl exec 101 cat /proc/filesystems
 ext3
 ext2
nodev rpc_pipefs
nodev proc
nodev nfs
nodev sysfs
nodev tmpfs
nodev devpts
Share