Examples of lockMachine()


Examples of org.virtualbox_4_0.IMachine.lockMachine()

      if (!oids.contains(m.getId())) {
        machine = m;
        break;
      }
    }
    machine.lockMachine(s, LockType.Write);
    IMachine mm = s.getMachine();
    mm.setName("iosgi-" + Long.toHexString(System.currentTimeMillis()));
    mm.getNetworkAdapter(0L).setMACAddress(getRandomMACAddress());
    IMedium medium = vbox.openMedium(image.getAbsolutePath(),
        DeviceType.DVD, AccessMode.ReadOnly);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      IMachine immutableMachine = manager.get().getVBox().findMachine(machineId);
      ISession session;
      while (true) {
         try {
            session = manager.get().getSessionObject();
            immutableMachine.lockMachine(session, type);
            break;
         } catch (VBoxException e) {
            VBoxException vbex = Throwables2.getFirstThrowableOfType(e, VBoxException.class);
            if (vbex != null && machineNotFoundException(vbex)) {
               return null;
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      vBox.registerMachine(createdMachine);

      expect(vBox.findMachine(vmName)).andReturn(createdMachine).anyTimes();
      expect(manager.getSessionObject()).andReturn(session);
      expect(session.getMachine()).andReturn(createdMachine);
      createdMachine.lockMachine(session, LockType.Write);
      createdMachine.setMemorySize(1024l);
      createdMachine.saveSettings();
      session.unlockMachine();

      // TODO: this mock test is not finished.
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      expect(oldAttachment.getDevice()).andReturn(oldAttachmentDevice);
      expect(oldAttachment.getPort()).andReturn(oldAttachmentPort);
      // TODO: is this ok that we searched by ID last time?
      expect(vBox.findMachine(oldMachineName)).andReturn(oldMachine);
      expect(manager.getSessionObject()).andReturn(detachSession);
      oldMachine.lockMachine(detachSession, LockType.Write);
      expect(detachSession.getMachine()).andReturn(oldMachine);
      oldMachine.detachDevice(oldAttachmentController, oldAttachmentPort, oldAttachmentDevice);
      oldMachine.saveSettings();

      expect(medium.deleteStorage()).andReturn(progress);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      expect(oldAttachment.getDevice()).andReturn(oldAttachmentDevice);
      expect(oldAttachment.getPort()).andReturn(oldAttachmentPort);
      // TODO: is this ok that we searched by ID last time?
      expect(vBox.findMachine(oldMachineName)).andReturn(oldMachine);
      expect(manager.getSessionObject()).andReturn(detachSession);
      oldMachine.lockMachine(detachSession, LockType.Write);
      expect(detachSession.getMachine()).andReturn(oldMachine);
      oldMachine.detachDevice(oldAttachmentController, oldAttachmentPort, oldAttachmentDevice);
      oldMachine.saveSettings();

      expect(medium.deleteStorage()).andReturn(progress);
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      vBox.registerMachine(createdMachine);

      expect(vBox.findMachine(vmName)).andReturn(createdMachine).anyTimes();
      expect(manager.getSessionObject()).andReturn(session);
      expect(session.getMachine()).andReturn(createdMachine);
      createdMachine.lockMachine(session, LockType.Write);
      createdMachine.setMemorySize(1024l);
      createdMachine.saveSettings();
      session.unlockMachine();

      // TODO: this mock test is not finished.
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      IMachine immutableMachine = manager.get().getVBox().findMachine(machineId);
      ISession session;
      while (true) {
         try {
            session = manager.get().getSessionObject();
            immutableMachine.lockMachine(session, type);
            break;
         } catch (VBoxException e) {
            VBoxException vbex = Throwables2.getFirstThrowableOfType(e, VBoxException.class);
            if (vbex != null && machineNotFoundException(vbex)) {
               return null;
View Full Code Here

Examples of org.virtualbox_4_2.IMachine.lockMachine()

      IMachine immutableMachine = manager.get().getVBox().findMachine(machineId);
      ISession session;
      while (true) {
         try {
            session = manager.get().getSessionObject();
            immutableMachine.lockMachine(session, type);
            break;
         } catch (VBoxException e) {
            VBoxException vbex = Throwables2.getFirstThrowableOfType(e, VBoxException.class);
            if (vbex != null && machineNotFoundException(vbex)) {
               return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.