Add your custom image to DigitalOcean with Vmware Fusion

I run my Chef cookbooks on DigitalOcean. Only problem is, when the OS isn’t supported anymore DO removes it from their supported images.

DO created something what they call: Custom Images.

I created this vm with Vmware Fusion, because i have it installed om my laptop.

    1. Start Fusion and choose to create a custom install.
    2. DO bills you for the amount of diskspace you use, so we will keep the image as small as possible. I managed to get it inside a 1GB image, 2GB would be easier. Click customtize settings before finishing. When choosing the size click on advanced options and deselect Split into multiple files

These are my options during the installer.

    1. Language → English
    2. Country → Other → Europe → Belgium
    3. Locales → United States
    4. Keymap → american English
    5. Hostname → debian
    6. Partitioning → Manual → Remove all partitions, and create only 1 partition

    7. package survery → no
    8. Grub boot loader → yes
      1. Grub boot loader → /dev/sda
    9. echo -e “/dev/vda1\t /\t ext4\t errors=remount-ro\t 0\t 1” > /etc/fstab
    10. reboot the server

Last steps before uploading.

  1. apt-get update
  2. apt-get upgrade
  3. apt-get dist-upgrade
  4. apt-get clean
  5. apt-get install sudo openssh-server
    1. Digitalocean uses cloud-init to configure the images. Cloud-init depends on some python packages. The latest version in debian jessie doesn’t support DO yet, which makes the initializing process slow. As the cloud-init package doesn’t have any wierd dependecies i just wget the package.
    2. apt-get install gdisk python3-configobj python3-configobj python3-jinja2 python3-jinja2 python3-jsonpatch  python3-jsonschema python3-oauthlib python3-requests python3-six python3-yaml python3-serial
    3. cd /tmp
    4. wget http://nl.archive.ubuntu.com/ubuntu/pool/main/c/cloud-init/cloud-init_18.5-45-g3554ffe8-0ubuntu1~18.04.1_all.deb
    5. wget http://ftp.nl.debian.org/debian/pool/main/c/cloud-utils/cloud-guest-utils_0.29-1_all.deb
    6. dpkg -i cloud-guest-utils_0.29-1_all.deb
    7. dpkg -i cloud-init_18.3-5_all.deb
Posted by Bram in chef, debian, digitalocean, opscode, vmware

Vmware passthrough nvidia gt 710

One of my customers needed a way to use 4 monitors on his vmware server.

There where 2 Geforce GT710’s available. We don’t need high end 3D stuff.

To get this working i had to put the 2 cards in passthrough mode.

To do this go to Host -> Manage -> Hardware, check both cards and click on Toggle passthrough.

Now the cards will show up when you edit the VM.

Shut down the vm, if it’s running, and go to edit settings, click on add other device, and choose the pci devices where you enabled the passthrough.

On the gt 710 devices you need to put some extra options, otherwise the passthrough doesn’t seem to work.

In the settings menu go to VM Options -> Advanced -> Configuration Parameters: Edit Configuration

Add these parameters:

hypervisor.cpuid.v0 = FALSE
pciPassthru.64bitMMIOSizeGB = “64”

I found this on the internet about the pciPassthru.64bitMMIOSizeGBs setting.

Specifying the 2nd entry requires a simple calculation. Count the number of high-end PCI devices(*) you intend to pass into the VM, multiply that number by 16 and then round up to the next power of two. For example, to use passthrough with two devices, the value would be: 2 * 16 = 32, rounded up to the next power of two to yield 64. For a single device, use 32. Use this value in the 2nd entry:

Posted by Bram in sysadmin, vmware