escape description and vnc command

This commit is contained in:
Jordan Rodgers 2018-05-07 01:36:03 -04:00
parent 0bdced0865
commit 04d588d688

View file

@ -182,7 +182,7 @@ class VM(object):
proxmox = connect_proxmox() proxmox = connect_proxmox()
port = str(int(port) - 5900) port = str(int(port) - 5900)
proxmox.nodes(self.node).qemu(self.id).monitor.post( proxmox.nodes(self.node).qemu(self.id).monitor.post(
command="change vnc 127.0.0.1:{}".format(port)) command="change\ vnc\ 127.0.0.1:{}".format(port))
def eject_iso(self): def eject_iso(self):
proxmox = connect_proxmox() proxmox = connect_proxmox()
@ -230,7 +230,7 @@ def create_vm(proxmox, user, name, cores, memory, disk, iso):
ide2="{},media=cdrom".format(iso), ide2="{},media=cdrom".format(iso),
net0='virtio,bridge=vmbr0', net0='virtio,bridge=vmbr0',
pool=user, pool=user,
description='Managed by Proxstar') description='Managed\ by\ Proxstar')
retry = 0 retry = 0
while retry < 5: while retry < 5:
try: try: