Support #6317

Antlet disappeared from AntMan

Added by [email protected] about 6 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
Mario Kaack
% Done:

0%


Description

I was importing an ISO, but didn't want 100GB of storage to be used for it.
I created the Blank antlet, and before I imported the ISO, I attempted to
change the "Blankqcow2" virtual size to 20GB. It said no. So I attempted to
delete the 100GB and try to recreate it with 20GB. Didn't like either. I
was going to clean it up, delete the Antlet and start over.

I checked antMan and my Antlet is no longer listed. When I try to create a
new antlet with the same name, I get the error: "1 Could not ZFS clone for
antlet PopOS".

But in using the virsh dumpxml command, it looks like it is still there.
(See below). What is the best way to clean this up.

# virsh dumpxml PopOS
<domain type='kvm'>
<name>PopOS</name>
<uuid>6f21ac06-cbea-44bc-8aa6-27761f5c7c4c</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.4'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='custom' match='exact' check='partial'>
<model fallback='allow'>Westmere</model>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='network'>
<mac address='b2:61:6e:73:6c:11'/>
<source network='bblv'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
</memballoon>
</devices>
</domain>

History

#1 Updated by Mario Kaack about 6 years ago

Kirk,

The resize drive function does not allow to resize smaller. This is a good point.. maybe we should have a smaller default size. I will bring it up with the developers.

It seems the antlet's file system and directory still exists.
Here is some info on dealing with antlets on the command line:

An antlet is made of three basic parts: an xml definition, a zfs file system, and its directory and files.

To view your antlets and status run

virsh list --all
or
virsh -c lxc:/// list --all

for lxc antlets use the '-c lxc:///' option
So to stop an antlet you can use

virsh shutdown ANTLET_NAME
or
virsh -c lxc:/// shutdown ANTLET_NAME

'shutdown' is a graceful shutdown. Use 'destroy' to force the shutdown (like pulling the plug).

To remove the antlet xml use

virsh undefine ANTLET_NAME --managed-save
or
virsh -c lxc:/// undefine ANTLET_NAME --managed-save

And remove zfs file system:
find the zfs path with

zfs list

The path should mimic the directory path.
Remove the file system with

zfs destroy path/ANTLET_NAME

Note: there is no leading '/' in the zfs path

If you get a 'Data set busy' error, then you may need to remove the directory first

rm -rf  /antlets/ANTLET_NAME

If the antlet was created on the 'hdd' zpool then the path would be /hdd/ANTLET_NAME/

#2 Updated by [email protected] about 6 years ago

This is awesome! Thank you for these commands, and I was able to
successfully remove the Antlet.

Please read and pass on to anyone interested in knowing: I am working the
asset management piece of the IT KASM http://itkasm.com (http://itkasm.com),
and building orchestration around various cloud technologies to integrate
with IT KASM http://itkasm.com. I'm at least trying to collect
information on what is running/shutdown and collect VM configurations for
displaying. This will automate the asset manager to always have the latest
information on VM's for an environment. Our ULTIMATE vision is to allow our
customers the ability to automatically name (based on a naming-standard)
and select an OS. We will automate everything else for our customers to
spin up and shutdown servers or antlets based on policies that we define.

These commands are a great start.

Thank you! Any help towards this goal would be greatly Appreciated!

-Kirk

On Thu, Mar 15, 2018 at 11:19 AM, [email protected] wrote:

Hi there and thank you for contacting antsle support!

Kirk,

The resize drive function does not allow to resize smaller. This is a good
point.. maybe we should have a smaller default size. I will bring it up
with the developers.

It seems the antlet's file system and directory still exists.
Here is some info on dealing with antlets on the command line:

An antlet is made of three basic parts: an xml definition, a zfs file
system, and its directory and files.

To view your antlets and status run

virsh list --all
or
virsh -c lxc:/// list --all

for lxc antlets use the '-c lxc:///' option
So to stop an antlet you can use

virsh shutdown ANTLET_NAME
or
virsh -c lxc:/// shutdown ANTLET_NAME

'shutdown' is a graceful shutdown. Use 'destroy' to force the shutdown
(like pulling the plug).

To remove the antlet xml use

virsh undefine ANTLET_NAME --managed-save
or
virsh -c lxc:/// undefine ANTLET_NAME --managed-save

And remove zfs file system:
find the zfs path with

zfs list

The path should mimic the directory path.
Remove the file system with

zfs destroy path/ANTLET_NAME

Note: there is no leading '/' in the zfs path

If you get a 'Data set busy' error, then you may need to remove the
directory first

rm -rf /antlets/ANTLET_NAME

If the antlet was created on the 'hdd' zpool then the path would be
/hdd/ANTLET_NAME/

https://brainosaur.hau.to/tickets/2280/e4d9169e4e2bbaebb8590eb0b317c22b

Thanks for being another great antsle user!

antsle, Inc.
Customer Support Team

#3 Updated by Mario Kaack about 6 years ago

Kirk,

You are very welcome.

Add a comment