Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

issues capturing customized ubuntu 18.04 LTS server image

$
0
0

I have made several failed attempts to capture an image of my custom Ubuntu 18.04 LTS server using the guidelines found below. I have not been able to find a solution. I am a molecular biologist with a minimum knowledge when it comes to Azure and Linux (learning phase).

So, in the simplest case (immediately after having set up the Ubuntu 18.04 LTS server through the Azure portal) I can easily create an image and use this image to construct a new VM (from the Azure portal).

However, what I want to do is to construct an image of my personalized/customized ubuntu 18.04 LTS server with the mate-desktop, X2Go server, programs/packages etc installed. Basically, I want to be able to deploy this later without having to re-install everything. But...when I attempt to deploy it, it simply can´t provision it or deploy it. 

This is how I do it: 

1. I deprovision it (through puTTy)

sudo waagent -deprovision+user

- I guess I could remove the +user if I want to keep my user account (and everything in the Home directory)?

2. Then I shut down my VM /deallocate it (using the Azure Cli)

az vm deallocate \
   --resource-group myResourceGroup \
   --name myVM

3. Then I generalize it (using the Azure Cli)

az vm generalize \
   --resource-group myResourceGroup \
   --name myVM

4. Then I create the image (using the Azure Cli or through the Azure portal)

- Note: For the "simple" case mentioned above, I could only make it work if I specified --OS-type (and --storage-sku; entered both and then it worked).

az image create \
   --resource-group myResourceGroup \
   --name myImage --source myVM --OS-type Linux --storage-sku Premium_LRS 

What am I doing wrong? 

Thanks



Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>