warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

VMware: Installation Tools

Install open-vm-tools package
sudo apt-get install -y open-vm-tools

# Ubuntu Offline install
scp *.deb :/tmp/
ssh dpkg -i /tmp/open-vm-tools_*_amd64.deb /tmp/libdumbnet*_amd64.deb /tmp/libmspack0_*_amd64.deb

# FreeBSD

KVM Snapshot

virsh domblklist ${VM}
virsh blockcommit ${VM} vda --pivot
virsh domblklist ${VM}

# list snapshots
virsh snapshot-list ${VM}

# delete snapshot
virsh snapshot-delete ${VM} ${TIMESTAMP} --metadata

# fix "error: block copy still active: disk 'vda' already in active block job"
virsh blockjob ${VM} vda --abort
virsh blockcommit ${VM} vda --pivot
virsh snapshot-list ${VM}
virsh snapshot-delete ${VM} ${SNAP} --metadata

# list snapshots
for VM in $(virsh list --state-running --name); do
echo ${VM}
virsh domblklist ${VM}


lxc profile delete default
lxc profile device add default root disk path=/ pool=default

lxc profile create default
lxd init

# lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (dir, lvm, zfs) [default=zfs]:
Create a new ZFS pool? (yes/no) [default=yes]:
Would you like to use an existing block device? (yes/no) [default=no]:
Size in GB of the new loop device (1GB minimum) [default=45GB]:

VMware Player

wget -q --no-check-certificate -O - | bash -



# download
wget -q ${URL} -O /tmp/${URL##*/}

# install
sudo /tmp/${URL##*/} --console --required --eulas-agreed

sudo apt-get install -y open-vm-tools



# create image file
qemu-img create -f qcow2 /var/lib/libvirt/images/vm01.qcow2 25G

# create raw disk
chown libvirt-qemu.kvm /var/lib/libvirt/images/vm01.qcow2
chmod 600 /var/lib/libvirt/images/vm01.qcow2

# shrink qcow image
qemu-img convert -O qcow2 image.01.out.qcow

# shrink qcow image with compression
qemu-img convert -O qcow2 -c IN.qcow OUT.qcow

# convert
qemu-img convert -O qcow2 ubuntu-16.04-server-cloudimg-amd64-disk1.img ubuntu-16.04-server-cloudimg-amd64-disk1.qcow2

# create image
qemu-img create disk.img -f qcow2 4G



esxcli vm process list
esxcli network nic list
esxcli network ip interface list
esxcli network ip interface ipv4 get

esxcli hardware platform get


Shrink MsSQL Express DB

# Ignore insufficient storrage count

brctl: network bridges

# create bridge
brctl addbr br0
ifconfig eth0

brctl delif lxcbr0 eth0
brctl addif br0 eth0
dhclient br0

# move VM to other bridge
for IF in $(brctl show | grep veth | sed 's/^

*//'); do
    brctl delif lxcbr0 ${IF}
    brctl addif br0 ${IF}
# connect two bridges?
ip link add veth0 type veth peer name veth1
ifconfig veth0 up
ifconfig veth1 up
brctl delif br0 veth0
brctl delif lxcbr0 veth1
# renew ip in VM
lxc-attach -n vm1 -- dhclient
# /etc/network/interfaces
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp

Syndicate content