Unable to create LXC container with specific imageLXC container templates?Assigning Processes to CPU CoresIs...

Is there any relevance to Thor getting his hair cut other than comedic value?

Do authors have to be politically correct in article-writing?

I can't die. Who am I?

What's the purpose of these copper coils with resistors inside them in A Yamaha RX-V396RDS amplifier?

What do the pedals on grand pianos do?

Second-rate spelling

Is there a German word for “analytics”?

Which aircraft had such a luxurious-looking navigator's station?

How to add multiple differently colored borders around a node?

What is a term for a function that when called repeatedly, has the same effect as calling once?

Is there a low-level alternative to Animate Objects?

CBP Reminds Travelers to Allow 72 Hours for ESTA. Why?

Most significant research articles for practical investors with research perspectives

How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider

Where was Karl Mordo in Infinity War?

How can I handle a player who pre-plans arguments about my rulings on RAW?

How to count words in a line

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

What is the difference between ashamed and shamed?

Where is the fallacy here?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

How to count occurrences of Friday 13th

Contradiction with Banach Fixed Point Theorem

Why is working on the same position for more than 15 years not a red flag?



Unable to create LXC container with specific image


LXC container templates?Assigning Processes to CPU CoresIs it possible to start LXC container inside LXC container?eth0 on lxc does not workWhy are applications in a memory-limited LXC container writing large files to disk being killed by the OOM?LXC container not startingUnprivileged lxc container as rootHow to migrate a regular LXC container to a Proxmox LXC container?How do I migrate Proxmox 3.x openVZ containers to Proxmox 4.x LXC?Unable to start lxc container with -f













0















I recently hit issue with the creation of LXC container:



tsenov@hometower:~$ createContainer.sh tester 1 256MB lxd_sp0 2
Creating tester
Error: Failed container creation: Create container from image: Failed to clone the filesystem: cannot open 'lxd_sp0/images/9a93b6bd640cee54bd052ea9b631de0a8dc49a8c0c73197879aee66e780aaca7@readonly': dataset does not exist

Failed to launch CentOS 7


I have other containers with CentOS 7, created before the issue which run without any issues:



tsenov@hometower:~$ lxc ls
+------------+---------+-----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------------+---------+-----------------------+------+------------+-----------+
| laravel | RUNNING | 10.113.186.60 (eth0) | | PERSISTENT | |
+------------+---------+-----------------------+------+------------+-----------+
| owncloud | RUNNING | 10.113.186.119 (eth0) | | PERSISTENT | |
+------------+---------+-----------------------+------+------------+-----------+
| prometheus | RUNNING | 10.113.186.174 (eth0) | | PERSISTENT | |
+------------+---------+-----------------------+------+------------+-----------+


Here is the createContainer.sh script:



tsenov@hometower:~$ cat bin/createContainer.sh 
#!/bin/bash
SCRIPT_NAME=$0
NAME=$1
CPU_COUNT=$2
RAM=$3
STORAGE_POOL=$4
DISK_SIZE=$5

function usage {
echo "usage: $SCRIPT_NAME <name> <cpu cores> <memory> <storage_pool> <disk size> "
echo " <name> <STR> name for the container"
echo " <cpu cores> <INT> count of CPU cores"
echo " <memory> <INT>[kMGPE]B amount of RAM with suffix. The supported suffixes are kB, MB, GB, TB, PB and EB"
echo " <storage_pool> one of the below ZFS storage pools"
echo " <disk size> <INT> GBs of Disk Space"
echo "================================================================"
sudo zpool list
exit 1
}

function createContainer {

NAME=$1
CPU_COUNT=$2
RAM=$3
STORAGE_POOL=$4
DISK_SIZE=$5

# Create the container
lxc launch images:centos/7 "$NAME" -s "$STORAGE_POOL" || { echo 'Failed to launch CentOS 7'; exit 1; }

# Set the Disk Size of the container
#lxc config device add $NAME root disk pool=$STORAGE_POOL path=/ size="$DISK_SIZE"GB
lxc config device set "$NAME" root size "$DISK_SIZE"GB || { echo 'Failed to set root size'; exit 1; }

# Set the CPU cores count for the container
lxc config set "$NAME" limits.cpu "$CPU_COUNT" || { echo 'Failed to set CPU limit'; exit 1; }

# Set the RAM for the container
lxc config set "$NAME" limits.memory "$RAM" || { echo 'Failed to set RAM limit'; exit 1; }

exit 0
}

if [ $# -ne 5 ]
then
usage
fi

# Main program
createContainer "$NAME" "$CPU_COUNT" "$RAM" "$STORAGE_POOL" "$DISK_SIZE"


There is no issue with other than the images:centos/7 image - tried with arch linux.



I tried:
- deleting the centos/7 image and re-downloading it
- lxd init to reinitialise the service



Seems like an issue with the zfs, which is quite odd considering that I re-download the image...



Any thoughts?










share|improve this question





























    0















    I recently hit issue with the creation of LXC container:



    tsenov@hometower:~$ createContainer.sh tester 1 256MB lxd_sp0 2
    Creating tester
    Error: Failed container creation: Create container from image: Failed to clone the filesystem: cannot open 'lxd_sp0/images/9a93b6bd640cee54bd052ea9b631de0a8dc49a8c0c73197879aee66e780aaca7@readonly': dataset does not exist

    Failed to launch CentOS 7


    I have other containers with CentOS 7, created before the issue which run without any issues:



    tsenov@hometower:~$ lxc ls
    +------------+---------+-----------------------+------+------------+-----------+
    | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
    +------------+---------+-----------------------+------+------------+-----------+
    | laravel | RUNNING | 10.113.186.60 (eth0) | | PERSISTENT | |
    +------------+---------+-----------------------+------+------------+-----------+
    | owncloud | RUNNING | 10.113.186.119 (eth0) | | PERSISTENT | |
    +------------+---------+-----------------------+------+------------+-----------+
    | prometheus | RUNNING | 10.113.186.174 (eth0) | | PERSISTENT | |
    +------------+---------+-----------------------+------+------------+-----------+


    Here is the createContainer.sh script:



    tsenov@hometower:~$ cat bin/createContainer.sh 
    #!/bin/bash
    SCRIPT_NAME=$0
    NAME=$1
    CPU_COUNT=$2
    RAM=$3
    STORAGE_POOL=$4
    DISK_SIZE=$5

    function usage {
    echo "usage: $SCRIPT_NAME <name> <cpu cores> <memory> <storage_pool> <disk size> "
    echo " <name> <STR> name for the container"
    echo " <cpu cores> <INT> count of CPU cores"
    echo " <memory> <INT>[kMGPE]B amount of RAM with suffix. The supported suffixes are kB, MB, GB, TB, PB and EB"
    echo " <storage_pool> one of the below ZFS storage pools"
    echo " <disk size> <INT> GBs of Disk Space"
    echo "================================================================"
    sudo zpool list
    exit 1
    }

    function createContainer {

    NAME=$1
    CPU_COUNT=$2
    RAM=$3
    STORAGE_POOL=$4
    DISK_SIZE=$5

    # Create the container
    lxc launch images:centos/7 "$NAME" -s "$STORAGE_POOL" || { echo 'Failed to launch CentOS 7'; exit 1; }

    # Set the Disk Size of the container
    #lxc config device add $NAME root disk pool=$STORAGE_POOL path=/ size="$DISK_SIZE"GB
    lxc config device set "$NAME" root size "$DISK_SIZE"GB || { echo 'Failed to set root size'; exit 1; }

    # Set the CPU cores count for the container
    lxc config set "$NAME" limits.cpu "$CPU_COUNT" || { echo 'Failed to set CPU limit'; exit 1; }

    # Set the RAM for the container
    lxc config set "$NAME" limits.memory "$RAM" || { echo 'Failed to set RAM limit'; exit 1; }

    exit 0
    }

    if [ $# -ne 5 ]
    then
    usage
    fi

    # Main program
    createContainer "$NAME" "$CPU_COUNT" "$RAM" "$STORAGE_POOL" "$DISK_SIZE"


    There is no issue with other than the images:centos/7 image - tried with arch linux.



    I tried:
    - deleting the centos/7 image and re-downloading it
    - lxd init to reinitialise the service



    Seems like an issue with the zfs, which is quite odd considering that I re-download the image...



    Any thoughts?










    share|improve this question



























      0












      0








      0








      I recently hit issue with the creation of LXC container:



      tsenov@hometower:~$ createContainer.sh tester 1 256MB lxd_sp0 2
      Creating tester
      Error: Failed container creation: Create container from image: Failed to clone the filesystem: cannot open 'lxd_sp0/images/9a93b6bd640cee54bd052ea9b631de0a8dc49a8c0c73197879aee66e780aaca7@readonly': dataset does not exist

      Failed to launch CentOS 7


      I have other containers with CentOS 7, created before the issue which run without any issues:



      tsenov@hometower:~$ lxc ls
      +------------+---------+-----------------------+------+------------+-----------+
      | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
      +------------+---------+-----------------------+------+------------+-----------+
      | laravel | RUNNING | 10.113.186.60 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+
      | owncloud | RUNNING | 10.113.186.119 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+
      | prometheus | RUNNING | 10.113.186.174 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+


      Here is the createContainer.sh script:



      tsenov@hometower:~$ cat bin/createContainer.sh 
      #!/bin/bash
      SCRIPT_NAME=$0
      NAME=$1
      CPU_COUNT=$2
      RAM=$3
      STORAGE_POOL=$4
      DISK_SIZE=$5

      function usage {
      echo "usage: $SCRIPT_NAME <name> <cpu cores> <memory> <storage_pool> <disk size> "
      echo " <name> <STR> name for the container"
      echo " <cpu cores> <INT> count of CPU cores"
      echo " <memory> <INT>[kMGPE]B amount of RAM with suffix. The supported suffixes are kB, MB, GB, TB, PB and EB"
      echo " <storage_pool> one of the below ZFS storage pools"
      echo " <disk size> <INT> GBs of Disk Space"
      echo "================================================================"
      sudo zpool list
      exit 1
      }

      function createContainer {

      NAME=$1
      CPU_COUNT=$2
      RAM=$3
      STORAGE_POOL=$4
      DISK_SIZE=$5

      # Create the container
      lxc launch images:centos/7 "$NAME" -s "$STORAGE_POOL" || { echo 'Failed to launch CentOS 7'; exit 1; }

      # Set the Disk Size of the container
      #lxc config device add $NAME root disk pool=$STORAGE_POOL path=/ size="$DISK_SIZE"GB
      lxc config device set "$NAME" root size "$DISK_SIZE"GB || { echo 'Failed to set root size'; exit 1; }

      # Set the CPU cores count for the container
      lxc config set "$NAME" limits.cpu "$CPU_COUNT" || { echo 'Failed to set CPU limit'; exit 1; }

      # Set the RAM for the container
      lxc config set "$NAME" limits.memory "$RAM" || { echo 'Failed to set RAM limit'; exit 1; }

      exit 0
      }

      if [ $# -ne 5 ]
      then
      usage
      fi

      # Main program
      createContainer "$NAME" "$CPU_COUNT" "$RAM" "$STORAGE_POOL" "$DISK_SIZE"


      There is no issue with other than the images:centos/7 image - tried with arch linux.



      I tried:
      - deleting the centos/7 image and re-downloading it
      - lxd init to reinitialise the service



      Seems like an issue with the zfs, which is quite odd considering that I re-download the image...



      Any thoughts?










      share|improve this question
















      I recently hit issue with the creation of LXC container:



      tsenov@hometower:~$ createContainer.sh tester 1 256MB lxd_sp0 2
      Creating tester
      Error: Failed container creation: Create container from image: Failed to clone the filesystem: cannot open 'lxd_sp0/images/9a93b6bd640cee54bd052ea9b631de0a8dc49a8c0c73197879aee66e780aaca7@readonly': dataset does not exist

      Failed to launch CentOS 7


      I have other containers with CentOS 7, created before the issue which run without any issues:



      tsenov@hometower:~$ lxc ls
      +------------+---------+-----------------------+------+------------+-----------+
      | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
      +------------+---------+-----------------------+------+------------+-----------+
      | laravel | RUNNING | 10.113.186.60 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+
      | owncloud | RUNNING | 10.113.186.119 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+
      | prometheus | RUNNING | 10.113.186.174 (eth0) | | PERSISTENT | |
      +------------+---------+-----------------------+------+------------+-----------+


      Here is the createContainer.sh script:



      tsenov@hometower:~$ cat bin/createContainer.sh 
      #!/bin/bash
      SCRIPT_NAME=$0
      NAME=$1
      CPU_COUNT=$2
      RAM=$3
      STORAGE_POOL=$4
      DISK_SIZE=$5

      function usage {
      echo "usage: $SCRIPT_NAME <name> <cpu cores> <memory> <storage_pool> <disk size> "
      echo " <name> <STR> name for the container"
      echo " <cpu cores> <INT> count of CPU cores"
      echo " <memory> <INT>[kMGPE]B amount of RAM with suffix. The supported suffixes are kB, MB, GB, TB, PB and EB"
      echo " <storage_pool> one of the below ZFS storage pools"
      echo " <disk size> <INT> GBs of Disk Space"
      echo "================================================================"
      sudo zpool list
      exit 1
      }

      function createContainer {

      NAME=$1
      CPU_COUNT=$2
      RAM=$3
      STORAGE_POOL=$4
      DISK_SIZE=$5

      # Create the container
      lxc launch images:centos/7 "$NAME" -s "$STORAGE_POOL" || { echo 'Failed to launch CentOS 7'; exit 1; }

      # Set the Disk Size of the container
      #lxc config device add $NAME root disk pool=$STORAGE_POOL path=/ size="$DISK_SIZE"GB
      lxc config device set "$NAME" root size "$DISK_SIZE"GB || { echo 'Failed to set root size'; exit 1; }

      # Set the CPU cores count for the container
      lxc config set "$NAME" limits.cpu "$CPU_COUNT" || { echo 'Failed to set CPU limit'; exit 1; }

      # Set the RAM for the container
      lxc config set "$NAME" limits.memory "$RAM" || { echo 'Failed to set RAM limit'; exit 1; }

      exit 0
      }

      if [ $# -ne 5 ]
      then
      usage
      fi

      # Main program
      createContainer "$NAME" "$CPU_COUNT" "$RAM" "$STORAGE_POOL" "$DISK_SIZE"


      There is no issue with other than the images:centos/7 image - tried with arch linux.



      I tried:
      - deleting the centos/7 image and re-downloading it
      - lxd init to reinitialise the service



      Seems like an issue with the zfs, which is quite odd considering that I re-download the image...



      Any thoughts?







      centos zfs lxc lxd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 6 hours ago







      Georgi Tsvetanov Tsenov

















      asked 6 hours ago









      Georgi Tsvetanov TsenovGeorgi Tsvetanov Tsenov

      3518




      3518






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956732%2funable-to-create-lxc-container-with-specific-image%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956732%2funable-to-create-lxc-container-with-specific-image%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Маріан Котлеба Зміст Життєпис | Політичні погляди |...