diff --git a/distros/void/void-background.sh b/distros/void/void-background.sh new file mode 100755 index 0000000..83f4e86 --- /dev/null +++ b/distros/void/void-background.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# get the void linux logo from wikipedia +wget https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Void_Linux_logo.svg/256px-Void_Linux_logo.svg.png?20170131170632 +# rename it, and resize it (the standard size is too small for most wallpapers) +convert -resize 200% '256px-Void_Linux_logo.svg.png?20170131170632' void-logo.png +# download a pretty wallpaper +wget http://wallpapercave.com/wp/Wlm9Gv0.jpg + +# put the void logo on all *jpg and *png images +for x in *.jpg + do + composite -compose multiply -gravity Center void-logo.png "$x" "$x" +done diff --git a/new.sh b/new.sh new file mode 100755 index 0000000..16867d0 --- /dev/null +++ b/new.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +echo Select a category + +category="$(find . -type d -printf '%P\n' | fzy)" + +[ ! -d "$category" ] && mkdir "$category" + +echo Select a name + +read name + +filePath="$category/$name.md" + +tagsList="$(echo \"$category | sed 's#\/#", "#g')\"" + +[ -e "$filePath" ] && $EDITOR $filePath && exit 0 + +echo "--- +title: \"$name\" +tags: [ $tagsList ] +--- + +" > "$filePath" + +$EDITOR "$filePath" + diff --git a/virtualization/xen/xe.md b/virtualization/xen/xe.md index fc27de8..43b96da 100644 --- a/virtualization/xen/xe.md +++ b/virtualization/xen/xe.md @@ -8,22 +8,24 @@ tags: [ "documentation", "virtualization", "xen" ] xe vm-list ``` -Start, stop, et c. all done with `xe`: +Start, stop, et c. with `xe`: ```bash -xe vm-start vm=*TTS* +xe vm-start vm=$TARGET_VM ``` ```bash -xe vm-shutdown vm=*Bob* +xe vm-shutdown vm=$TARGET_VM ``` Destruction requires the uuid. ```bash -xe vm-destroy uuid=*243b1165-14aa-37f6-496f-44879d05b3f2* +xe vm-destroy uuid=$TARGET_UUID ``` +Autocompletion works well with all of these commands. + # Shut Down VM List VMs. @@ -33,17 +35,17 @@ xe host-list ``` ```bash -xe vm-list resident-on=** +xe vm-list resident-on=$HOST_UUID ``` ```bash -xe vm-shutdown uuid=** force=true +xe vm-shutdown uuid=TARGET_VM force=true ``` If this doesn't work, try: ```bash -xe vm-reset-powerstate uuid=** force=true +xe vm-reset-powerstate uuid=TARGET_VM force=true ``` Get the id: @@ -55,16 +57,14 @@ list_domains And destroy the domain: ```bash -/opt/xensource/debug/xenops destroy_domain -domid ** +/opt/xensource/debug/xenops destroy_domain -domid $DOM_ID ``` -# Error: `Internal error:xenopsd internal error: Storage_interface.Illegal_transition` in XenServer +# Problem Solving -## Symptoms or Error +> Error: `Internal error:xenopsd internal error: Storage_interface.Illegal_transition` in XenServer -After a failed “Move VM”, “Copy VM”, or “Export VM” operation, the Virtual Machine (VM) being operated cannot start. Following is the error message displayed: - -`User-added image` +After a failed “Move VM”, “Copy VM”, or “Export VM” operation, the Virtual Machine (VM) being operated cannot start. ## Solution @@ -85,32 +85,34 @@ This is the UUID of the Control Domain. The Control Domain is a privileged Virtu Run the following command to obtain the UUID of the VBD (Virtual Block Device) object linking the Control Domain: ```bash -xe vbd-list vm-uuid=** +xe vbd-list vm-uuid=$CONTROL_DOMAIN_UUID ``` Run the following commands to unplug and destroy the VBD: ```bash -xe vbd-unplug uuid=** +xe vbd-unplug uuid=$VBD_UUID ``` ```bash -xe vbd-destroy uuid=** +xe vbd-destroy uuid=$VBD_UUID ``` -## Make a local iso repository +# Make a local iso repository ```bash xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso ``` -This creates a UUID for the new directory: +This creates a UUID for the new directory, e.g.: -`e94e25bb-bcdc-801b-b62a-b51b686a3bdc` +> e94e25bb-bcdc-801b-b62a-b51b686a3bdc # Import -xe vm-import filename=*/mnt/blah.xva* +```bash +xe vm-import filename="$FILENAME".xva +``` # USB @@ -151,11 +153,10 @@ xe sr-list # Exporting and Exporting VMs ```bash -xe vm-export vm=** filename=*/full/path.xva* +xe vm-export vm=$VM_NAME filename="$FULL_PATH".xva ``` ```bash -xe vm-import vm=** filename=*/full/path.xva* +xe vm-import vm=** filename="$FULL_PATH".xva ``` - diff --git a/virtualization/xen/xen_basics.md b/virtualization/xen/xen_basics.md index 8ab361a..58a5a4b 100644 --- a/virtualization/xen/xen_basics.md +++ b/virtualization/xen/xen_basics.md @@ -4,17 +4,22 @@ tags: [ "Documentation", "xe", "virtualization", "volume" ] --- # Make a local iso repository + ```bash -mkdir -p */var/opt/xen/ISO_Store* +STORE_PATH=/var/opt/xen/ISO_Store ``` ```bash -xe sr-create name-label=*LocalISO* type=iso device-config:location=*/var/opt/xen/ISO_Store* device-config:legacy_mode=true content-type=iso +mkdir -p $STORE_PATH +``` + +```bash +xe sr-create name-label="$STORAGE_NAME" type=iso device-config:location=$STORE_PATH device-config:legacy_mode=true content-type=iso ``` This creates a UUID for the new directory: -`e94e25bb-bcdc-801b-b62a-b51b686a3bdc` +> e94e25bb-bcdc-801b-b62a-b51b686a3bdc # Main Console