Common Tasks
Getting Cluster Access
Download a kubeconfig from the Palette UI:
- Navigate to the cluster in Palette.
- Click Download Kubeconfig.
- Set the
KUBECONFIGenvironment variable:
```bash copy export KUBECONFIG=~/Downloads/admin.edge-vmo.kubeconfig
!!! warning "Token Expiry"
Palette proxy kubeconfigs use tokens that expire regularly. Download a fresh kubeconfig if you get authentication errors.
---
## VM Lifecycle
### Start a VM
```bash copy
virtctl start <vm-name> -n virtual-machines
Stop a VM
```bash copy
virtctl stop
Pause a VM
```bash copy
virtctl pause vm
Console Access
Serial Console
```bash copy
virtctl console
SSH Access
```bash copy
virtctl ssh ---
## Hotplug Disk
Attach additional storage to a running VM without restarting:
1. Create a PVC:
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: extra-disk
namespace: virtual-machines
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: portworx-block
```
2. Hotplug it to the running VM:
```bash copy
virtctl addvolume <vm-name> --volume-name=extra-disk -n virtual-machines
```
3. To remove a hotplugged disk:
```bash copy
virtctl removevolume <vm-name> --volume-name=extra-disk -n virtual-machines
```
---
## Check VM Health
List all running VM instances with node placement and IPs:
```bash copy
kubectl get vmi -n virtual-machines -o wide
Check VM conditions and detailed status:
```bash copy
kubectl get vm
Info
VMs with outdated launchers need a virtctl restart to pick up the new version. Live migration will fail with version skew errors.
Golden Images
Golden images are stored as PVCs in the vmo-golden-images namespace. They are used as clone sources in dataVolumeTemplates when creating new VMs.
List available golden images:
```bash copy kubectl get pvc -n vmo-golden-images
Example `dataVolumeTemplate` referencing a golden image:
```yaml
dataVolumeTemplates:
- metadata:
name: my-vm-rootdisk
spec:
source:
pvc:
namespace: vmo-golden-images
name: ubuntu-22.04-golden
pvc:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: portworx-block
Portworx Status
Check overall Portworx cluster health and available storage:
```bash copy PX_POD=$(kubectl get pods -l name=portworx -n portworx -o jsonpath='{.items[0].metadata.name}') && \ kubectl exec $PX_POD -n portworx -- /opt/pwx/bin/pxctl status
List Portworx volumes:
```bash copy
PX_POD=$(kubectl get pods -l name=portworx -n portworx -o jsonpath='{.items[0].metadata.name}') && \
kubectl exec $PX_POD -n portworx -- /opt/pwx/bin/pxctl volume list
Inspect a specific volume:
bash copy
PX_POD=$(kubectl get pods -l name=portworx -n portworx -o jsonpath='{.items[0].metadata.name}') && \
kubectl exec $PX_POD -n portworx -- /opt/pwx/bin/pxctl volume inspect <volume-id>