[PLUGIN DEPRECATED] VM Manager (2015.02.24)


dmacias

Recommended Posts

  • Replies 566
  • Created
  • Last Reply

Top Posters In This Topic

Hi dmacias,

I posted this week (http://lime-technology.com/forum/index.php?topic=36004.0) asking for help to backup a vm.

I remember -or at least I think so- that webvirtmgr did offer the option to do a snapshot of the vm.

Is it possible to include this option too? I am not a linux expert so maybe I am asking for something that is very difficult to implement.

Rgds.

I added snapshots and a button to suspend to disk like hibernation.

Link to comment

 

And peter's resume problem.

 

Don't put any time into this, I changed the power settings to never let W8 put in power save mode, I will see if this solve this suspend issue.

 

//Peter

Ok, but I would still like to know what's different in win8 power management.  You should be able to suspend (pause), resume and hibernated from vmMan.

Link to comment

I added snapshots and a button to suspend to disk like hibernation.

 

I updated.  now, when I try to save changes to an existing XML, I'm getting the following message/error...

 

Error while saving domain: Requested operation is not valid: domain is not running

 

It seems it should only save changes when the domain is not running, so I'm not sure if this is my error, or a plugin error.

Link to comment

I added snapshots and a button to suspend to disk like hibernation.

 

I updated.  now, when I try to save changes to an existing XML, I'm getting the following message/error...

 

Error while saving domain: Requested operation is not valid: domain is not running

 

It seems it should only save changes when the domain is not running, so I'm not sure if this is my error, or a plugin error.

No my fault. I named the new domain managed save function to the same as xml save. fixed
Link to comment

so here's a weird one.  I have a windows 7 VM with passthru setup, and seems to be working well.

 

I want to setup a Windows 8 VM to see if I can get the CPU passthru working better on that one.  I currently have all passthtu items removed from this windows8 VM, and just want to use VNC for access until I get windows all installed and updated, then I'll stop the windows 7 VM and start the win8 VM with the stuff passed thru.

 

however, with the windows7 VM running, when I started the windows 8 VM, it started fine, but also killed/shutdown the windows 7 VM without warning.  I just see that it's now shutdown, unexplainably.

 

What might have caused this, and how can I prevent it from happening?

 

Windows 8 XML file...

 

<domain type='kvm' id='5'>
  <name>Windows8-VNC</name>
  <uuid>9c876340-7183-4a6e-87cc-26cbfe719fc2</uuid>
  <description>Windows8 on VNC</description>
  <memory unit='KiB'>1953792</memory>
  <currentMemory unit='KiB'>1953128</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <boot dev='cdrom'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/VM/Windows8.qcow2'/>
      <backingStore/>
      <target dev='vdc' bus='virtio'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/backup/Programs/WindowsISOs/en_windows_8_1_x64_dvd_2707217.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/backup/Programs/WindowsISOs/virtio-win-0.1-81.iso'/>
      <backingStore/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='00:16:3e:c7:c7:c7'/>
      <source bridge='br0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
</domain>

Link to comment

dmacias,

 

Can you explain 9P sharing?  Is this the bit that allows Linux VMs direct access to the host file system?

 

iQNRkxO.png

 

What is the purpose of the "Mount tag"?  Is this the name of the share as sen on the guest?  Where is it on the guest?  /mnt? /media? /?

 

John

Yes exactly. It allows you to passthrough your unRAID files directly. This was one thing that sold me on kvm over xen. No more problems with mounting network shares and other problems associated with that in xen.

I planned to add a way to create more than one 9p share but for now there is just one.  But you can edit the xml and make more.

 

Basically the unRAID share: is the path of the share in unRAID you want to passthrough.  e.g. /mnt/users/tv. And the mount tag can be a single name or whatever you want (like /mnt/users/tv) but inside the vm you'll have to use that tag to mount the share in fstab.  So I would suggest just using a single name like shares.  Then in your vm you would create the folder you wanted to mount to (I create the same as the path in unRAID) and then add this to the end of /etc/fstab

 shares   /mnt    9p  trans=virtio,version=9p2000.L,noauto,nobootwait,rw    0   0

 

So for me I passed though /mnt with a mount tag of shares and then in my apps vm I mount shares tag to the same location /mnt. So if I browse to /mnt in my vm I see the same directory structure I would in unRAID. I then created symlinks to my tv shares (ln /mnt/users/tv_shows /tv) and to my movies shares (ln /mnt/users/movies /movies), music etc.. for use in sickrage, couchpotato, headphones.

 

Hope I explained that clearly.

 

Edit: Once added to fstab you can restart or I would do mount /mnt to test cause your vm can hang if you mess up the fstab and you reboot.

Link to comment

 

Hope I explained that clearly.

 

 

Perfectly!!!  Thank you.  I can't wait to try this since I use XBMCBuntu for my HTPC VMs.  Of course, I still need to find an answer for multiple USB devices with the same vendor/product IDs.  Right now that is a showstopper for me.

 

John

Link to comment

Just updated to the latest version and it seems like the "shutdown" and "force shutdown" buttons are broken. Also, did you intend to make the text really small in Chrome? I have been messing around with creating test VM's over the last 3 days and this plugin is amazing! Just thought I would say that again...

 

force shutdown seems to be working for me, but shutdown doesn't seem to be working here for me.

 

It indicated the command has been sent, but it doesn't shutdown the windows VM.  I've have so many issues with so many different things, I assumed it was just my setup that wasn't working; and that may still be the case, but since you reported it's not working for you, i figured I'd chime in also.

Link to comment

Just updated to the latest version and it seems like the "shutdown" and "force shutdown" buttons are broken. Also, did you intend to make the text really small in Chrome? I have been messing around with creating test VM's over the last 3 days and this plugin is amazing! Just thought I would say that again...

Yeah sorry for the small font I pushed a css I was testing with dynamix. I can push the old one.  The shutdown buttons both work for me.  I just tried to make sure with a ubuntu and windows vm.  Right now I just have a refresh timer but if the vm doesn't shutdown before that it will show as running.  Did you check if it actually shutdown?  What does the console show? All os's or what os?

Link to comment

Hmm it shutdowns now. I was having issues right after I created a new ubuntu vm. It wouldn't shutdown. I had to "virsh destroy ubuntu" to get it to stop.

I can confirm force shutdown is broke.  I'll see what I did. 

 

Edit: it will destroy the domain from the domain info page. I'll update with a fix and the old css

Link to comment

this update seems to have made the XML box even more narrow.  most all the lines are wrapping, making it hard to read/follow.  If possible, allowing us to resize the box would be ideal, but if not, having it automatically use most/all of the window width would be great.

Sorry I was reformatting everything for dynamix and changed some css. I'll fix the textarea css.  Until then you should be able to drag the bottom right of the xml box to any size you want.

Link to comment

this update seems to have made the XML box even more narrow.  most all the lines are wrapping, making it hard to read/follow.  If possible, allowing us to resize the box would be ideal, but if not, having it automatically use most/all of the window width would be great.

Sorry I was reformatting everything for dynamix and changed some css. I'll fix the textarea css.  Until then you should be able to drag the bottom right of the xml box to any size you want.

 

Is it possible to make that window dynamically resizable (grab and stretch)?

Link to comment

I hoped I don't get flamed...REALLY new to KVM. Installed the VM manager and virtman....but from there...stumped. Tried to create a VM but don't have any idea where to start.

 

I have both a Windows 7 qcow2 from a Xen VM I was running before as well as a desktop Ubuntu ISO I want to run. Don't care much about the win 7 at the moment (next) but would like to get the desktop Ubuntu up and running.

 

Anyone point me to a step by step using the VM manager to do so. I understand a LITTLE bit about the XML stuff but can't figure out how it works (auto generated) or what.

 

Any help please :)

 

Thanks

 

Tony

Link to comment

I hoped I don't get flamed...REALLY new to KVM. Installed the VM manager and virtman....but from there...stumped. Tried to create a VM but don't have any idea where to start.

 

I have both a Windows 7 qcow2 from a Xen VM I was running before as well as a desktop Ubuntu ISO I want to run. Don't care much about the win 7 at the moment (next) but would like to get the desktop Ubuntu up and running.

 

Anyone point me to a step by step using the VM manager to do so. I understand a LITTLE bit about the XML stuff but can't figure out how it works (auto generated) or what.

 

Any help please :)

 

Thanks

 

Tony

I assume you were running xen so you have a network bridge setup in unRAID. 

Next you need to create a storage pool or pools (the green plus under storage) pointing to the location of your iso and/or where you want to store your vm images.  I have a pool for iso's and a pool for vm images. If on the cache drive make sure it's cache only. It can be an existing directory or a new one.  Once the pool is created you can create an image in the pool by clicking on the green plus under pool actions. For ubuntu I would create a 10G qcow2 image.

 

Next go to CREATE and select your  iso image for install image and PAE for 32bit or not, amount of memory, number of vcpus, and select your unbuntu.qcow2 for disk image then click create vm. Should create and auto start the vm.

 

From the main VM's page or the domain info page click on the eye to open a vnc connection to your new vm.

 

I think that's everything.  For ubuntu you can also setup 9p sharing which allows you to mount an unRAID share point inside your vm. I just share /mnt.

 

Link to comment
  • trurl unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.