Archive

Posts Tagged ‘vm’

Easy SSH Login

March 30th, 2017 No comments

Here is a simple way to setup key (password-less) login on Unix-like systems.

Once you’ve configured SSH locally, add your public key to remote hosts using the following command:

**NB** in the next line, be very careful to use cat >> (append) and not cat > (overwrite), or you will trash your remote authorized_keys2 file, leaving your remote inaccessible to everyone but you. Not cool.

cat ~/.ssh/id_rsa.pub | ssh remote_machine 'cat >> .ssh/authorized_keys2'

Replace .ssh/id_rsa.pub with your public key.

Also make sure remote folder ~/.ssh has mode 0700 and ~/.ssh/authorized_keys2 has 0600.

 

Categories: Linux Tags: , , , , ,

Proxmox: Adding Existing Logical Volumes

February 11th, 2014 No comments

Adding existing logical volumes to the list of virtual disks is non-obvious.
First add the VG to Proxmox using the “Storage|Add” UI. Once done, adding existing LV to Proxmox must be done via LVM command line tools.
A logical volume needs to have the correct naming, and (surprise!) an LVM tag set. For the correct tag (and LV name) format, use the UI to create a sample volume (VM|Hardware|Add|Hard Disk).
Note: LV names must fit a certain pattern. However, names like this seem to work: vm-110-timemachine.
The example below shows a pre-existing LV (vg1/vm-110-disk-2) without the “pve-vm-110” tag Proxmox requires.
Subsequent steps add the tag, after which the volume appears in Proxmox.

# lvs -o vg_name,lv_name,lv_tags
VG     LV              LV Tags
pve    data
pve    root
pve    swap
vg0    vm-110-disk-1   pve-vm-110
vg0    vm-110-disk-2   pve-vm-110
vg1    vm-110-disk-1   pve-vm-110
vg1    vm-110-disk-2

To see LV tags:

# lvs @pve-vm-110
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
vm-110-disk-1 vg0 -wi-ao--- 500.00g
vm-110-disk-2 vg0 -wi-ao--- 750.00g
vm-110-disk-1 vg1 -wi-ao--- 750.00g

To add missing tags:

# lvchange --addtag pve-vm-110 /dev/vg1/vm-110-disk-2

Refresh the Proxmox Storage UI to see the new LV.

Categories: Linux Tags: , , , , , ,

/private/var/vm Disk Usage on OS X

January 16th, 2013 No comments

It seems this is filled with multiple (roughly) 1GB swap files, allocated as required.
Problem is they don’t go away (until reboot?).
One article suggested this:

sudo dynamic_pager -L 1073741824

Seemed to work: before running vm used 8GB, afterwards 4GB

Categories: OS X Tags: , , , ,

Headless Parallels

November 12th, 2012 No comments

Generally I like to run servers headless, as in with no display or console. In Parallels this is a little tricky, but doable from Terminal. However, Parallels Desktop must not be running. If you do launch Parallels while a Terminal-spawned VM is running, a console will automatically be created.

To see a list of available VM:

prlctl list -a

To launch a VM:

prlctl start vm_name